WordPress.org

Ready to get started?Download WordPress

Forums

Boot Store
Displaying blog posts of category in Carousel? (6 posts)

  1. RustyWriter
    Member
    Posted 9 months ago #

    Hello,

    I have simulated 4 different blogs by using categories. I wish to display the latest post of specific categories in the carousal. How would I do this?

    BTW, right now, just trying to get the latest post with no category specification (checking show in carousel on the generic blog page) shows the image but no blog post. Any thoughts on what I'm doing wrong?

    Thanks!
    Rusty
    http://www.rustywilliamson.com

  2. Karen
    Member
    Posted 9 months ago #

    It appears from reading other posts here that you have to be using the TheCartPress ecommerce plugin in order to get the post text to display in the carousel. following is a copy of the theme author's response to a similar question.

    "Hi,
    The excerpt carousel uses a TheCartPress function. If you activate TheCartPress plugin you will see the excerpt.
    Anyway I´m going to fix it using default WordPress function when TheCartPress is deactivated. (next version)"

    Personally, I am using TheCartPress plugin with Boot Store, and when I create a post, the title, text, picture, and background show up as I anticipated in the carousel.

    The large text on the carousel comes from the Title of the post.
    The small text on the carousel comes from the text of the post.
    The picture on the carousel comes from the "Featured Image" setting on the Edit Post page.
    The background image comes from the "Carousel" settings on the Edit Post page.

    Good luck!

  3. sur
    Member
    Theme Author

    Posted 7 months ago #

    Hi @rustywriter

    by default carousel displays last 5 posts.
    but when you check "Add to carousel" in one post type, then only checked post types will be visible in carousel.

    To display posts from a taxonomy (eg category) you must customize your header.php (better create a child theme so upgrades doesn´t overwrite your changes)

    Cutom code to display post or any post type in certain category:
    header.php from line 158 (version 1.6):

    Replace:

    $carousel_args = array(
    		'post_type' => get_post_types( array( 'public' => true ) ),
    		'posts_per_page' => -1,
    		'post_status' => 'publish',
    		'order' => 'DESC',
    		'meta_query' => array(
    			array(
    				'key' => 'bre_add_to_home_carousel',
    				'value' => true,
    				'compare' => '=',
    			),
    		),
    		'fields' => 'ids'
    	);

    With (replace people and bob with your values):

    $carousel_args = array(
    		'post_type' => get_post_types( array( 'public' => true ) ),
    		'posts_per_page' => -1,
    		'post_status' => 'publish',
    		'order' => 'DESC',
    		'tax_query' => array(
    				array(
    					'taxonomy' => 'people',
    					'field' => 'slug',
    					'terms' => 'bob'
    				)
    			),
    		'fields' => 'ids'
    	);

    Thanks Karen
    Best Regards

  4. absolutelyliterate
    Member
    Posted 7 months ago #

    What would the syntax be if I wanted to display just the title and the image of the post but not the text?

  5. sur
    Member
    Theme Author

    Posted 7 months ago #

    Hi,

    .slide-summary  {
        display:none;
    }

    Best regards

  6. absolutelyliterate
    Member
    Posted 7 months ago #

    Thank you!

Reply

You must log in to post.

About this Theme

About this Topic