• Resolved FramiDev

    (@framidev)


    Hi,
    I’m trying to set the carrousel to display the lastest posts, but only the latest posts marked with a specific category marker. How is it possible ?
    Cheers

Viewing 6 replies - 1 through 6 (of 6 total)
  • hannah

    (@hannahritner)

    Hey,
    In theme options > home layout make sure you haven’t selected a specific category to display. If that wasn’t the issue please post a link.

    Hannah

    Thread Starter FramiDev

    (@framidev)

    Hey Hannah,
    thanks for your reply.
    I actually want a specific category to be displayed, but the only category option I can find in “Theme Option -> Home Layout” is the under the Blog section, and doesn’t seem to apply on my carrousel.

    carrousel : https://framiral.fr/2015/fr/
    blog : https://framiral.fr/2015/fr/evenements/

    As you will see, I have 2 items running in the carrousel, and 1 in my blog page. That is because I manage to display only the item categorized “news” in my blog page, but not in the carrousel. In my carrousel I don’t want the other one, as it is not categorized news, I want to keep it hidden.

    I hope this is understandable ??

    Thanks !

    hannah

    (@hannahritner)

    Oh sorry, I thought you were referring to something else. There actually isn’t a built in option to choose a specific category for the latest posts carousel. In the premium theme you could use a shortcode, but this doesn’t work in the free version. If you wanted to only show a specific category on your homepage you could use the homepage layout manager (theme options > home layout), but it would display as a grid, not a carousel.

    Hannah

    Thread Starter FramiDev

    (@framidev)

    No problem Hannah,
    I understand there is no built-in option for that, and that’s too bad… But, don’t you think there would be a simple way to modify a template to get what I want ? (I’m quite a newbie :S). Thanks anyway,

    Antoine.

    Theme Author Ben Ritner – Kadence WP

    (@britner)

    If you wanted to use the theme slider you could edit that but you will need a child theme. You would have to edit templates/home/latest-slider.php There you would have to change the query on line 39 to only pull from a specific category.

    Another option is to look for a plugin. Might find one that can use your posts in a carousel.

    Kadence Themes

    Thread Starter FramiDev

    (@framidev)

    Thank you very much for that, here is the line I changed to make it work :

    line 44 : if (has_post_thumbnail( $post->ID ) && in_category( ‘news’ )) {

    Antoine.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Sort post by Category in the Carrousel’ is closed to new replies.