• Michael
    April 22, 2014 at 4:04 am #32427

    I have the Featured Restaurants on the main page, but they don’t change. The 1st 4 get shown.
    How can I make them random, so a selection of 4 out of all Featured Restaurants get shown.
    an the same for new entries, how to show 4 out of the last 20 entries???

    Thanks for your help

    Michael
    PS: Restaurants = properties!!! I changed everything to a restaurant review site!

    crerem
    April 23, 2014 at 11:46 am #32734

    Hello,

    I assume you use the latest listings shortcode for the first page. This shortcode shows the featured listings first.

    To change go to libs/shortcodes.php and at line 1103 change

    $args = array(
    ‘post_type’ => $type,
    ‘post_status’ => ‘publish’,
    ‘paged’ => 0,
    ‘posts_per_page’ => $post_number_total,
    ‘meta_key’ => ‘prop_featured’,
    ‘orderby’ => ‘meta_value ‘,
    ‘order’ => ‘DESC’,
    ‘tax_query’ => array(
    $category_array,
    $action_array,
    $city_array,
    $area_array
    )

    into

    $args = array(
    ‘post_type’ => $type,
    ‘post_status’ => ‘publish’,
    ‘paged’ => 0,
    ‘posts_per_page’ => $post_number_total,
    ‘orderby’ => ‘rand’,
    ‘tax_query’ => array(
    $category_array,
    $action_array,
    $city_array,
    $area_array
    )

    Attention – this will change ALL of these shortcode instances.

    Come back with a link – would love to see how you turn wpestate into a restauran review site πŸ™‚

    Good luck

    Michael
    April 24, 2014 at 4:12 am #32860

    Hi Crerem
    Thanks for your answer, but I can see a difference. When I refresh the page, the restaurants are still the same. I want to show X NR of Featured venues and a X NR of all venues. (each group random) so that the user doesn’t see always the same restaurants.
    ——————–
    The Site is online: http://www.dinnerclub.co.za (looks great as a restaurant site!)
    ——————–
    There is a bug with the GPS! When you add 2 Venues with the same GPS, you have no chance to see the venues. When they are to close and you reach the max zoom level, you cant say what venue is under the Nr on the map!
    (Is there a max. of Venues to show on the Google map? I want to add ~8000 Venues!)
    ——————–
    The Theme is great!!!
    ——————–

    Here is what I changed!!!

    $args = array(
    ‘post_type’ => $type,
    ‘post_status’ => ‘publish’,
    ‘paged’ => 0,
    ‘posts_per_page’ => $post_number_total,
    ‘meta_key’ => ‘prop_featured’,
    ‘orderby’ => ‘rand ‘,
    ‘order’ => ‘DESC’,
    ‘tax_query’ => array(
    array(
    ‘taxonomy’ => ‘property_category’,
    ‘field’ => ‘term_id’,
    ‘terms’ => $category_of_tax
    )
    )

    );
    }else{
    $args = array(
    ‘post_type’ => $type,
    ‘post_status’ => ‘publish’,
    ‘paged’ => 0,
    ‘posts_per_page’ => $post_number_total,
    ‘meta_key’ => ‘prop_featured’,
    ‘orderby’ => ‘rand’,
    ‘order’ => ‘DESC’,

    );
    }

    Michael
    April 25, 2014 at 3:02 am #33058

    Rand still doesn’t work! but:
    +++There is a bug with the GPS! When you add 2 Venues with the same GPS, you have no chance to see the venues. When they are to close and you reach the max zoom level, you cant say what venue is under the Nr on the map!+++
    Problem solved= Maximum zoom level for Cloud Cluster to appear!
    ——————

    Patsak
    April 25, 2014 at 1:47 pm #33170

    Hi Michael

    I have been struggling with the same random problem like you, but when I comment in libs/shortcodes.php line 1142

    add_filter( ‘posts_orderby’, ‘my_order’ );

    It works for me, now my properties are random

    πŸ˜€

    Anna
    April 25, 2014 at 2:33 pm #33181

    Hi Michael,

    The Cluster Zoom control is the solution I would have recommended as well. I’m happy it worked for you.

    For random lists, please see Patsak’s idea. If you need more help, please let me know.

    Thank you
    Anna

    costaricamulitmedia
    April 26, 2014 at 4:09 pm #33393

    you could use a plugin to pull the list and sort randomly or however the plugin options allow control, as personally go with widgets, like ultimate or flexi posts widget and then shortcode the widget into the page, if needed and/or use in a sidebar as a widget

    javierh
    April 26, 2014 at 5:02 pm #33402

    Could you set it Random finally?
    thank you !

You must be logged in to reply to this topic.

'
Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.