• Resolved DanielFHC

    (@danielfhc)


    I’m currently using a theme with a slideshow (not a plugin).

    The slideshow is set up to pull the last 5 articles from ONE category, but I would like it to pull images from the latest 5 articles in any and all categories.

    I’m new to wordpress (from blogger) and am looking for a helpful answer. Thank you to anyone that can help me!

    Here is the featured.php file that controls the slideshow

    [Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter DanielFHC

    (@danielfhc)

    Ok, I didn’t understand the pastebin, but I’m clear on posting code now.

    Here is pastebin url:
    http://wordpress.pastebin.com/qhfxsdcQ

    Moderator cubecolour

    (@numeeja)

    Posts can be in more than one category, so rather than hacking up your theme files, just make a new category called ‘All’ or ‘slideshow’, assign every post that category in addition to the existing category each is in. Then set that as the category for the slideshow to grab its content from. Easy!

    If you’re using a category widget to output a list of categories, you can use an alternative category widget plugin which will enable you to exclude the catch-all category from displaying in your widget area.

    Thread Starter DanielFHC

    (@danielfhc)

    Cube,

    Thanks so much for giving me your advice. I didn’t realize that a post could have more than one category.

    For anyone else looking for this fix, I found this code in my template
    wp_list_categories('exclude=1,21&title_li='); ?>

    and inserted the category number (in my case, 21) that I wanted to hide after “exclude”. Now I can use the category to pull images from, but hide it so it’s not showing on my navigation bar.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Theme Slideshow’ is closed to new replies.