Read More Link on Blog Index Pages

Hi -

I can’t seem to find a solution to this anywhere that worked for me. I need a “Read More” link to show up on by “Press” and “Blog” pages, but right now it only shows three dots. We don’t want an excerpt - just the words “Read More” under the photos.

Is there a way that I can do this?
http://taylordblu.com/category/press/

Thank you
Katie

Hello Katie,

Thanks for writing in!

Since your child theme is set up, please add the following code in your child theme’s functions.php file

// Custom Read More String
// =============================================================================

if ( ! function_exists( 'x_excerpt_string' ) ) :
  function x_excerpt_string( $more ) {

    $stack = x_get_stack();

    if ( $stack == 'integrity' ) {
      return ' ... <div><a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a></div>';
    } else if ( $stack == 'renew' ) {
      return ' ... <a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a>';
    } else if ( $stack == 'icon' ) {
      return '<a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a>';
    } else if ( $stack == 'ethos' ) {
      return ' ...';
    }

  }
  add_filter( 'excerpt_more', 'x_excerpt_string' );
endif;

We would loved to know if this has work for you. Thank you.

Thank you. This doesn’t seem to have worked. Do you have any other suggestions?

Hi Katie,

I tried that code in my test sites and it works as intended.

Did you add the code in your child theme’s functions.php file?

Would you mind providing us with login credentials so we can take a closer look?
Please provide following information:

Set it as Secure Note

  • Link to your site
  • WordPress Admin username / password

Thanks

Thank you, Paul. Yes, I added that to the functions.php in my child theme. I’m posting my log-in credentials to a secure note now.

Hi Katie,

I have tried to login to your WordPress dashboard, but it redirects back to your My Account page /my-account/ so I could not check your WordPress backend.

Could you please provide us with your FTP credentials, so that we can check your child theme. Also provide the direct URL to your WordPress backend as well.

Thanks!

Apologies - I forgot to set the user as admin. It should work now. I’ll add the FTP credentials.

Well, I guess I’ve accidentally found a way to fix it. I just went to edit a post and not everything shows up on the page to edit the title, featured image, etc. I realized they just updated to Wordpress 5.0. so I was looking through settings and found an excerpt setting in the WP dashboard that I never noticed before. Now, I just have to find out if I can’t edit any of my existing posts with this new update. Will X Theme have a corresponding update that might solve that issue?

Hello Katie,

After I have investigated your site, the code did not work because you have installed Advance Excerpt plugin. I have temporarily disabled the plugin now so that you can see that the code we gave is working.

With the WordPress 5.0 update, please use Cornerstone when editing the page or post especially if the page/post were originally built with Cornerstone.

Hope this helps.

Thank you. That looks much better. I will get rid of that plug-in. It must have been left from a previous version of this site.

When I click on edit page for any of my existing pages and posts, none of the Wordpress options show outside cornerstone, so I won’t be able to edit things like date, feature image, etc. I clicked the “Edit with Wordpress” button on one of the posts and now I can’t edit that one in Cornerstone.

Should I start a new thread?

Hello Rena,

This is a confirmed bug between the recent X/Pro version against WordPress 5.0. Our developers were already informed about this issue and working on a fix for this. We will be rolling out a release update cycle which will cover this issue. The update will be available anytime soon.

Please bear with us. Thank you.

Thank you, I will watch for that update.

You are most welcome!

Hi there, I’m having the same problem and this isn’t working for me - there still is no Read More link/button on my blog posts…

I tried changing all the x_ strings to pro_ but it gave me an error warning so that’s not it I think?

Hi,

Please try this code instead.

function x_excerpt_string( $more ) {

    $stack = x_get_stack();

    if ( $stack == 'integrity' ) {
      return ' ... <div><a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a></div>';
    } else if ( $stack == 'renew' ) {
      return ' ... <a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a>';
    } else if ( $stack == 'icon' ) {
      return ' ... <div><a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a></div>';
    } else if ( $stack == 'ethos' ) {
       return ' ... <div><a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a></div>';
    }

  }
  add_filter( 'excerpt_more', 'x_excerpt_string' );

If that doesn’t help, please create a new topic and provide us your wordpress admin login in Secure Note

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.