Show Random Post On Theme Specific Widget (PRO)

Home Forums WordPress Theme Support BresponZive Mag Show Random Post On Theme Specific Widget (PRO)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1981
    Raja CRN
    Keymaster

    Hi,

    Here, I’ll show you the sample code to get Random posts in Magazine style widget. Just follow the below code, and add the lines in the widget file.

    $magazine_doub_posts = new WP_Query(array(
    'showposts' => $posts,
    'cat' => $get_catego,
    'orderby'=> 'rand' //the code you need to add
    ));

    Thanks.

    #1992
    VioAdmin
    Member

    Thanks a lot! It worked perfectly!

    #2048
    samirsoccer
    Member

    VioAdmin Can you explain it, what file you actually edited I’m bit confused 😀

    thank you

    #2049
    VioAdmin
    Member

    Hi Samirsoccer,

    You just have to edit the right widget file(s) located here: /public_html/wp-content/themes/bresponzive_pro/admin/widgets/

    1.) Inside that folder you will find: homepage_singlet_widget.php

    2.) You will also find: homepage_doublet_widget.php

    Edit either one of them(or both) by using the code Raja gave us and it should work perfectly. 🙂

    Let me know if this works out!

Viewing 4 posts - 1 through 4 (of 4 total)

Only Verified Customer of this Theme Can post reply to this Support Topic! .