Random Posts Widget

Support Area Forums Agency Random Posts Widget

Viewing 10 posts - 1 through 10 (of 10 total)
URL to the page in question:
  • Author
    Posts
  • #4480
    Erdem Senocak
    Participant

    Hi Bill,

    I would like to ask you if you were thinking of an Agency Theme Random Posts Widget in the updated version.

    I uploaded some plugins. They worked but I am not happy with the design. Agency Theme’s featured post and featured video looks quite well. Is there sth. I can do to make the widgets that I uploaded look the same way or do i have to wait for the updated Agency Theme version?

    Best
    Erdem

    #4481
    Bill Robbins
    Moderator

    You can edit the widget that comes with the theme to display a random post from the selected category. Here’s what you’ll need to do:

    1. Go to the appearance section and select edit to open up the theme editor
    2. From the list of files on your right, choose widget-featured-post.php and look for this spot:

      showposts=1&cat=” . $instance[“cat”]

      and replace it with this:

      showposts=1& orderby =rand&cat=” . $instance[“cat”]

    3. Save your changes

    That should cause a random post from the selected category to be displayed in the widget.

    Hope that helps out.

    #4482
    Erdem Senocak
    Participant

    thanks bill,

    but something unexpected happened. maybe i did sth wrong. i wrote an e-mail to support@organizedthemes.com about it.

    best
    erdem

    #4483
    Erdem Senocak
    Participant

    bill,

    it seems that it does not work. maybe i made a mistake with space, comma or sth else.

    but now i have an extra problem. you know i was editing “widget-featured-post.php” and the site collapsed. then i reached my ftp folder and cut that file and pasted to my desktop. then the site started to work again. now i am trying to restore the original”widget-featured-post.php” file but although i think i do the right corrections and upload it to my ftp folder; the site collapses again till i delete the “widget-featured-post.php” file.

    could you please send me the original php file to my e-mail? senocake@gmail.com. maybe after then i can try again for the random posts widget.

    thanks.

    #4484
    Erdem Senocak
    Participant

    i find the original file from the agency theme folder which i kept in my hard drive. (i should have thought that before!) i uploaded the original file then the site worked properly with the “widget-featured-post.php” file.

    then i tried again your suggestion of code change thinking that i had made a mistake before BUT and it made the site collapse again.

    briefly, i mean changing the codes in the widget-featured-post.php file causes the site to collapse.

    could you please check it? do u tinhk its sth about my hosting company?

    thanks.

    #4485
    Bill Robbins
    Moderator

    I emailed you a copy of the complete widget set to display a random post. If you have trouble let me know.

    #4486
    Erdem Senocak
    Participant

    thx bill, now it works! now i have a last question. is there any chance that i can have both have a featured post widget (last post) and another widget that is featuring random posts?

    #4487
    Bill Robbins
    Moderator

    Here’s what you’ll need to do. Restore the original version of the featured post widget that came with the theme.

    For the random version, I changed the function name and turned it into a plugin. You can download it from https://support.organizedthemes.com/samples/organized-themes-random-post-widget.zip

    Just install and activate it and you should have a additional widget for random posts now.

    #4495
    Erdem Senocak
    Participant

    thank you very much bill. it works. it very much helps to design my website as i wanted.

    thank you again for being so helpful. i hope i did not bother you so much.

    erdem

    #4496
    Bill Robbins
    Moderator

    I’m glad to hear it worked for you. Always glad to help.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Random Posts Widget’ is closed to new replies.