New Landing How can we help? Themeforest Theme Support Uplift Excerpt & Read More Link on category pages

Viewing 3 posts - 1 through 3 (of 3 total)
  • Posted in: Uplift
  • #274398
    lcregister
    Member
    Post count: 1

    I choosed a standard display on Category/Archive page, but it appears that the excerpt of posts show only the first line and the Read More button is not visible.

    I would like the category pages to display as the home page with full excerpt and read more link. How can I do this ?

    File Untitled 1 shows what I get on category page
    File Untitled 2 what I get on the Home Page

    Attachments:
    You must be logged in to view attached files.
    #274409
    lcregister
    Member
    Post count: 1

    Found the solution.
    You can duplicate in the child them swift-framework > layout > archive.php

    and copy paste this code
    <?php
    $sf_options = sf_get_theme_opts();

    $blog_type = $sf_options[‘archive_display_type’];
    $blog_classes = sf_blog_classes( $blog_type );
    $columns = 2;
    $pagination = “standard”;
    $pagination_output = “”;
    if ( isset($sf_options[‘archive_display_columns’]) ) {
    $columns = $sf_options[‘archive_display_columns’];
    }
    if ( isset($sf_options[‘archive_display_pagination’]) ) {
    $pagination = $sf_options[‘archive_display_pagination’];
    }
    $content_output = $sf_options[‘archive_content_output’];
    $item_class = $blog_classes[‘item’];
    $show_read_more = “yes”; //——————CUSTOM CHANGE
    $excerptLength = “80” ; //——————CUSTOM CHANGE

    if ( $blog_type == “masonry” ) {
    if ( $columns == “5” ) {
    $item_class = “col-sm-sf-5”;
    } else if ( $columns == “4” ) {
    $item_class = “col-sm-3”;
    } else if ( $columns == “3” ) {
    $item_class = “col-sm-4”;
    } else if ( $columns == “2” ) {
    $item_class = “col-sm-6”;
    } else if ( $columns == “1” ) {
    $item_class = “col-sm-12”;
    }

    if ( $content_output == “excerpt” ) {
    $show_read_more = “yes”;
    }
    }
    ?>

    <div class=”blog-wrap blog-items-wrap blog-<?php echo esc_attr($blog_type); ?>”>

    <?php if ( have_posts() ) : ?>

    <?php if ( $blog_type == “timeline” ) { ?>
    <div class=”timeline”></div>
    <?php } ?>

    <!– OPEN .blog-items –>
    <ul class=”blog-items row <?php echo esc_attr($blog_classes[‘list’]); ?> clearfix”
    data-blog-type=”<?php echo esc_attr($blog_type); ?>”>

    <?php while ( have_posts() ) : the_post(); ?>

    <?php
    $post_format = get_post_format( $post->ID );
    if ( $post_format == “” ) {
    $post_format = ‘standard’;
    }
    ?>
    <li <?php post_class( ‘blog-item ‘ . $item_class . ‘ format-‘ . $post_format ); ?> itemscope itemtype=”http://schema.org/BlogPosting”&gt;
    <?php echo sf_get_post_item( $post->ID, $blog_type, “yes”, “yes”, “yes”, $excerptLength, $content_output, $show_read_more ); //CUSTOM CHANGE
    ?>

    <?php endwhile; ?>

    <!– CLOSE .blog-items –>

    <?php else: ?>

    <h3><?php _e( ‘Sorry, there are no posts to display.’, ‘uplift’ ); ?></h3>

    <?php endif; ?>

    <?php if ( $pagination == “infinite-scroll” ) {

    $pagination_output .= ‘<div class=”pagination-wrap hidden infinite-scroll-enabled”>’;
    $pagination_output .= pagenavi( $wp_query );
    $pagination_output .= ‘</div>’;

    } else if ( $pagination == “load-more” ) {

    $pagination_output .= ‘‘ . __( ‘Load More’, ‘uplift’ ) . ‘‘;

    $pagination_output .= ‘<div class=”pagination-wrap load-more hidden infinite-scroll-enabled”>’;
    $pagination_output .= pagenavi( $wp_query );
    $pagination_output .= ‘</div>’;

    } else if ( $pagination == “standard” ) {
    if ( $blog_type == “masonry” ) {
    $pagination_output .= ‘<div class=”pagination-wrap masonry-pagination”>’;
    } else {
    $pagination_output .= ‘<div class=”pagination-wrap”>’;
    }
    $pagination_output .= pagenavi( $wp_query );
    $pagination_output .= ‘</div>’;
    }
    echo $pagination_output;
    ?>

    </div>

    #274736
    David Martin – Support
    Moderator
    Post count: 20834

    Glad you got this sorted.

    Thanks.

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register