• The Read More tab is not creating an oopprtunity for readers to have to click the Read More link to go to a brand new page. As a result, our page looks sloppy, and we have long posts on the front page, instead of an option for readers to have to go to a new page to read all of the article. Please help! ??

Viewing 15 replies - 1 through 15 (of 20 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please provide a link to your site! Thanks.

    Thread Starter danzcwk

    (@danzcwk)

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    It appears you’re using the twentyeleven theme. As you’re not using a child theme, any changes you might have made to its code got blown away in the WP 4.7 update.

    Read this about the read more tag and if you need to make changes, make a child theme before making any modifications.

    because your front page uses the custom page template ‘showcase’, the ‘featured‘ posts on it are probably treated as content of static page which does not apply the ‘more’ tag;

    to change that, review https://codex.www.ads-software.com/Customizing_the_Read_More#How_to_use_Read_More_in_Pages

    Thread Starter danzcwk

    (@danzcwk)

    The thing is, I’ve been using this button on posts for 3 1/2 years, and this has never happened before. The Child Theme is unclear to me. Any thoughts?

    Thread Starter danzcwk

    (@danzcwk)

    Michael,
    I have been using that option for a long time, and it is coded correctly on all posts. It still is not working as designed. I hope someone can log in and check this specifically.

    Thanks,
    Dan

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    No one here can login to your site, nor should you ask anyone to.

    Thread Starter danzcwk

    (@danzcwk)

    Fair enough. My apologies.

    Here’s the tag I use. It is consistently not working, and it has for years.

    <!–more–>

    Thoughts?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Point me to one post that has the tag so I can see where it’s not working.

    Thread Starter danzcwk

    (@danzcwk)

    https://www.coffeewithkenobi.com/coffee-with-kenobi-show-60-the-nature-of-the-force-featuring-a-mystery-guest-231/

    The front page shows where it is posted (it’s marked as sticky); the break should be right before “Listen to the show here”. As you can see, it’s not there.

    because you seem to have made edits to it, could you post the full code of the showcase.php file here?
    so that possibly somebody can integrate that into a Twenty Eleven theme to test what is going on.

    https://codex.www.ads-software.com/Forum_Welcome#Posting_Large_Excerpt_of_Code

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I agree with Michael. I can see the <!--more--> in the page source, so there’s something wrong with your code.

    Thread Starter danzcwk

    (@danzcwk)

    Will this help?

    <span style=”font-weight: 400;”>In today’s show, our first ever mystery guest joins us as we discuss our topic for Show # 60, the nature of the Force. We also look at where we will be for the premiere of Rogue One, discuss Dan’s adventures over the past month, talk with members of the CWK family about Rancho Obi-Wan, Jason Brame shares the latest updates to the canon, and Nick DiCo gives us some exciting updates in the world of </span><i><span style=”font-weight: 400;”>Star Wars</span></i><span style=”font-weight: 400;”> video games.</span>

    <span style=”font-weight: 400;”>In Collector News, we look at the CWK Holiday gift guide and talk about the Nissan Rogue One Limited edition. This is the podcast you’re looking for!</span>

    <!–more–>
    Listen to the Show here!

    the content of your posts is ok;

    what we need to see is the full code of the showcase.php template file of your theme.

    Thread Starter danzcwk

    (@danzcwk)

    Here it is:

    <?php
    /**
    * Template Name: Showcase Template
    *
    * Description: A Page Template that showcases Sticky Posts, Asides, and Blog Posts.
    *
    * The showcase template in Twenty Eleven consists of a featured posts section using sticky posts,
    * another recent posts area (with the latest post shown in full and the rest as a list)
    * and a left sidebar holding aside posts.
    *
    * We are creating two queries to fetch the proper posts and a custom widget for the sidebar.
    *
    * @package WordPress
    * @subpackage Twenty_Eleven
    * @since Twenty Eleven 1.0
    */

    // Enqueue showcase script for the slider
    wp_enqueue_script( ‘twentyeleven-showcase’, get_template_directory_uri() . ‘/js/showcase.js’, array( ‘jquery’ ), ‘2011-04-28’ );

    get_header(); ?>

    <div id=”primary” class=”showcase”>
    <div id=”content” role=”main”>

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

    <?php
    /*
    * We are using a heading by rendering the_content
    * If we have content for this page, let’s display it.
    */
    if ( ” != get_the_content() )
    get_template_part( ‘content’, ‘intro’ );
    ?>

    <?php endwhile; ?>

    <?php
    /*
    * Begin the featured posts section.
    *
    * See if we have any sticky posts and use them to create our featured posts.
    * We limit the featured posts at ten.
    */
    $sticky = get_option( ‘sticky_posts’ );

    // Proceed only if sticky posts exist.
    if ( ! empty( $sticky ) ) :

    $featured_args = array(
    ‘post__in’ => $sticky,
    ‘post_status’ => ‘publish’,
    ‘posts_per_page’ => 10,
    ‘no_found_rows’ => true,
    );

    // The Featured Posts query.
    $featured = new WP_Query( $featured_args );

    // Proceed only if published posts exist
    if ( $featured->have_posts() ) :

    /*
    * We will need to count featured posts starting from zero
    * to create the slider navigation.
    */
    $counter_slider = 0;

    // Compatibility with versions of WordPress prior to 3.4.
    if ( function_exists( ‘get_custom_header’ ) )
    $header_image_width = get_theme_support( ‘custom-header’, ‘width’ );
    else
    $header_image_width = HEADER_IMAGE_WIDTH;
    ?>

    <div class=”featured-posts”>
    <h1 class=”showcase-heading”><?php _e( ‘Featured Post’, ‘twentyeleven’ ); ?></h1>

    <?php
    // Let’s roll.
    while ( $featured->have_posts() ) : $featured->the_post();

    // Increase the counter.
    $counter_slider++;

    /*
    * We’re going to add a class to our featured post for featured images
    * by default it’ll have the feature-text class.
    */
    $feature_class = ‘feature-text’;

    if ( has_post_thumbnail() ) {
    // … but if it has a featured image let’s add some class
    $feature_class = ‘feature-image small’;

    // Hang on. Let’s check this here image out.
    $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( $header_image_width, $header_image_width ) );

    // Is it bigger than or equal to our header?
    if ( $image[1] >= $header_image_width ) {
    // If bigger, let’s add a BIGGER class. It’s EXTRA classy now.
    $feature_class = ‘feature-image large’;
    }
    }
    ?>

    <section class=”featured-post <?php echo esc_attr( $feature_class ); ?>” id=”featured-post-<?php echo esc_attr( $counter_slider ); ?>”>

    <?php
    /*
    * If the thumbnail is as big as the header image
    * make it a large featured post, otherwise render it small
    */
    if ( has_post_thumbnail() ) {
    if ( $image[1] >= $header_image_width )
    $thumbnail_size = ‘large-feature’;
    else
    $thumbnail_size = ‘small-feature’;
    ?>
    ” title=”<?php echo esc_attr( sprintf( __( ‘Permalink to %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ) ); ?>” rel=”bookmark”><?php the_post_thumbnail( $thumbnail_size ); ?>
    <?php
    }
    ?>
    <?php get_template_part( ‘content’, ‘featured’ ); ?>
    </section>
    <?php endwhile; ?>

    <?php
    // Show slider only if we have more than one featured post.
    if ( $featured->post_count > 1 ) :
    ?>
    <nav class=”feature-slider”>

    </nav>
    <?php endif; // End check for more than one sticky post. ?>
    </div><!– .featured-posts –>
    <?php endif; // End check for published posts. ?>
    <?php endif; // End check for sticky posts. ?>

    <section class=”recent-posts”>
    <h1 class=”showcase-heading”><?php _e( ‘Recent Posts’, ‘twentyeleven’ ); ?></h1>

    <?php

    // Display our recent posts, showing full content for the very latest, ignoring Aside posts.
    $recent_args = array(
    ‘order’ => ‘DESC’,
    ‘post__not_in’ => get_option( ‘sticky_posts’ ),
    ‘tax_query’ => array(
    array(
    ‘taxonomy’ => ‘post_format’,
    ‘terms’ => array( ‘post-format-aside’, ‘post-format-link’, ‘post-format-quote’, ‘post-format-status’ ),
    ‘field’ => ‘slug’,
    ‘operator’ => ‘NOT IN’,
    ),
    ),
    ‘no_found_rows’ => true,
    );

    // Our new query for the Recent Posts section.
    $recent = new WP_Query( $recent_args );

    // The first Recent post is displayed normally
    if ( $recent->have_posts() ) : $recent->the_post();

    // Set $more to 0 in order to only get the first part of the post.
    global $more;
    $more = 0;

    get_template_part( ‘content’, get_post_format() );

    echo ‘

      ‘;

      endif;

      // For all other recent posts, just display the title and comment status.
      while ( $recent->have_posts() ) : $recent->the_post(); ?>

      <li class=”entry-title”>
      ” rel=”bookmark”><?php the_title(); ?>
      <span class=”comments-link”>
      <?php comments_popup_link( ‘<span class=”leave-reply”>’ . __( ‘Leave a reply’, ‘twentyeleven’ ) . ‘</span>’, __( ‘<b>1</b> Reply’, ‘twentyeleven’ ), __( ‘<b>%</b> Replies’, ‘twentyeleven’ ) ); ?>
      </span>

      <?php
      endwhile;

      // If we had some posts, close the

      if ( $recent->post_count > 0 )
      echo ‘

    ‘;
    ?>
    </section><!– .recent-posts –>

    <div class=”widget-area” role=”complementary”>
    <?php if ( ! dynamic_sidebar( ‘sidebar-2’ ) ) : ?>

    <?php
    the_widget( ‘Twenty_Eleven_Ephemera_Widget’, ”, array( ‘before_title’ => ‘<h3 class=”widget-title”>’, ‘after_title’ => ‘</h3>’ ) );
    ?>

    <?php endif; // end sidebar widget area ?>
    </div><!– .widget-area –>

    </div><!– #content –>
    </div><!– #primary –>

    <?php get_footer(); ?>

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Read More option not working’ is closed to new replies.