Your Time:
Our Time:
← Back to discussions

How do I make the Blog Carousel only show one post at a time?

Need help with a different issue? Search the forums or open a new ticket.
Open a support ticket

This topic has 8 replies, 2 voices, and was last updated 12 years, 10 months ago by Fem.

Tagged: 

  • 2013-10-28 at 9:24 pm
    Support Expired
    #462
    Intelligent-Design
    Participant
    • Topics: 1
    • Replies: 4
    • Total posts: 5
    • Post count: 8

    “Style1” shows 4 columns of posts at a time, “style2” shows nothing at all, but I want to show 1 post at a time with the same ability to navigate through them as style1.

    2013-10-28 at 9:31 pm
    #464
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    You need to use the following shortcode for the blog to show only 1 post

    [blog cat="blog,demo" limit="1" pagination="false" postmeta="true"]
    
    2013-10-28 at 9:45 pm
    Support Expired
    #466
    Intelligent-Design
    Participant
    • Topics: 1
    • Replies: 4
    • Total posts: 5
    • Post count: 8

    That only shows one post with non-working navigation. I need it to show one post at a time with working navigation.

    2013-10-29 at 12:42 am
    #469
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    I understood that you are looking for carousel with 1 item list with scroll, but isn’t there in the theme. I will see the code tomorrow and let you about where to edit the code.

    2013-10-30 at 10:09 pm
    Support Expired
    #513
    Intelligent-Design
    Participant
    • Topics: 1
    • Replies: 4
    • Total posts: 5
    • Post count: 8

    Hi Maqk,
    Are you still looking into a solution for me?

    2013-10-31 at 3:02 pm
    #520
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    We have checked with the current design its not possible to have 1 column carousel. It will work but still it will not be 100% perfect.

    Regarding the style2 is not display anything becoz style2 will display only posts that has post thumbnail (Featured Thumbnail)

    2013-11-15 at 12:19 am
    Support Expired
    #732
    Intelligent-Design
    Participant
    • Topics: 1
    • Replies: 4
    • Total posts: 5
    • Post count: 8

    FYI the carousel_blog.php has this line:
    $args = array ( 'cat' => $cat, 'paged' => $paged, 'posts_per_page' => $limit);

    but the shortcode editor is sending in the category’s slug, not the ID, as ‘cat’ calls for.

    I changed that line to this just to make it work, but ideally the shortcode editor would send in the ID’s.
    $args = array ( 'category_name' => $cat, 'paged' => $paged, 'posts_per_page' => $limit);

    Also, it should allow ‘exclusions’ of categories the same way.

    To change the number of visible items, I just changed the javascript at the top of this file:
    From
    var visibleItems = (win_width > 767 ? 4 : 1);
    to
    var visibleItems = (win_width > 767 ? 1 : 1);

    Same with the other similar line: from
    scroll: (jQuery(window).width() > 767 ? 4 : 1),
    to
    scroll: (jQuery(window).width() > 767 ? 1 : 1),

    It does what I needed it to do now.

    2013-11-15 at 3:26 am
    Support Expired
    #734
    Intelligent-Design
    Participant
    • Topics: 1
    • Replies: 4
    • Total posts: 5
    • Post count: 8

    While I’m at it, this is really annoying: “0 COMMENT” is written on the top of every post I have, but comments are disabled on the site through HOSTMEv2’s settings. Not only are they disabled, but the proper way to say that in English is “0 COMMENTS”, so it looks like it was designed by a foreigner FYI.

    I cracked open atp_generator.php and changed

    // P O S T M E T A D A T A
    //——————————————————–
    function postmetaStyle() {
    global $format;
    ob_start();
    $out = ‘<div class=”post-metadata”>’;
    echo ‘<span>’;
    the_time(“M j, Y”);
    echo ‘</span><span>’;
    the_author_posts_link();
    echo ‘</span><span>’;
    the_category(‘, ‘) ;
    echo ‘</span><span>’;
    comments_popup_link( __( ‘0 Comment’, ‘THEME_FRONT_SITE’ ), __( ‘1 Comment’, ‘THEME_FRONT_SITE’ ), __( ‘% Comments’, ‘THEME_FRONT_SITE’ ) );
    echo ‘</span>’;
    $out .= ob_get_clean();
    $out .= ‘</div>’;
    return $out;;
    }

    to
    // P O S T M E T A D A T A
    //——————————————————–
    function postmetaStyle() {
    global $format;
    ob_start();
    $out = ‘<div class=”post-metadata”>’;
    echo ‘<span>’;
    the_time(“M j, Y”);
    echo ‘</span><span>’;
    the_author_posts_link();
    echo ‘</span><span>’;
    the_category(‘, ‘) ;
    echo ‘</span>’;
    if ( get_option( ‘atp_commentstemplate’ ) == “posts” || get_option( ‘atp_commentstemplate’ ) == “both” ):
    echo ‘<span>’;
    comments_popup_link( __( ‘0 Comments’, ‘THEME_FRONT_SITE’ ), __( ‘1 Comment’, ‘THEME_FRONT_SITE’ ), __( ‘% Comments’, ‘THEME_FRONT_SITE’ ) );
    echo ‘</span>’;
    endif;
    $out .= ob_get_clean();
    $out .= ‘</div>’;
    return $out;;
    }

    so if the option is set to disable comments, it won’t show that junk.

    • This reply was modified 12 years, 10 months ago by Intelligent-Design. Reason: Stupid htmlentities conversion with 'code' posting
    2013-11-15 at 3:04 pm
    #748
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    Thanks for the heads-up Intelligent-Design, I will fix this in the next update. Is your blog issue coming with the changes what you have done?

You must be logged in to reply to this topic.