Codeless
  • Support Home
  • Themes
  • Support
  • WordPress Tutorials
    • How to Start a Blog
    • Best Website Builders
    • Best Small Business Hosting
    • Email Marketing Services
    • Cheap WordPress Hosting
  • Video Tutorials

Community Forums

Read more and links in the excerpts

    • 9 years, 8 months ago rock
      Participant

      Expired

      Hello,

      I have two observation and if you could help that would be great.

      1) How to make that button “Read more” would not appear if the text in the excerpt is not longer than in the post. Because otherwise usually people click “Read more” and get the same text they saw in short description of the post.

      2) Is it possible to make links active in the excerpt?

       

      Thank you.

    • 9 years, 8 months ago Mirela
      Participant

      Hello,

      Can you please be more specific? In what element are you using the read more? Please send us a link where are you using it, or a screenshot.

      Best regards!

    • 9 years, 7 months ago rock
      Participant

      Expired

      Hello,

      “Read more” buttons are standard feature in blog page. My sites blog: https://www.aku.lt/blog/

      To the same: How to justify text in the blog post excerpt.

      thank you in advance

    • 9 years, 7 months ago Mirela
      Participant

      Hello,

      1-For your request you will have to edit theme files. Please go to file: \includes\view\blog\loop-index.php and add these lines:

      $words_excerpt = explode(' ', get_the_excerpt() );
       $words_content = explode(' ', get_the_content() );

      right after this line(21):
      $content = str_replace(']]>', ']]>', apply_filters('the_content', $content ));
      Now in the same file, find these lines:

      <?php if(!is_single()): ?>
       <a href="<?php echo get_permalink() ?>" class="btn-bt <?php echo esc_attr($cl_redata['overall_button_style'][0]) ?>"><span><?php _e('Read More', 'codeless') ?></span><i class="moon-arrow-right-5"></i></a>
      <?php endif; ?>

      And replace with these:

      <?php if(!is_single() && (count($words_excerpt) < count($words_content))): ?>
       <a href="<?php echo get_permalink() ?>" class="btn-bt <?php echo esc_attr($cl_redata['overall_button_style'][0]) ?>"><span><?php _e('Read More', 'codeless') ?></span><i class="moon-arrow-right-5"></i></a>
       <?php endif; ?>

      Save file and refresh page. It will hide the “Read more..” from posts which have the excerpt text equal or larger than the content.
      2- To justify text, please add this code into your custom css box:

      .blog-article.alternate-style .content .text {
          text-align: justify;
      }

      Best regards!

Viewing 3 reply threads

You must be logged in to reply to this topic.

Login

Log In
Register

Renew Support

  • Renew Specular Support
  • Renew Tower Support
  • Renew Folie Support
  • Renew Handel Support
  • Renew June Support
  • Renew Picante Support
  • Renew Thype Support
  • Renew Regn Support

Search Forums

Forums

  • Bygge – Construction Theme
  • Converta – Software Theme
  • Folie – The WordPress Website Builder
  • Handel – Responsive Multi-Purpose Business Theme
  • June WooCommerce WordPress Theme
  • Livecast – Podcast Theme
  • Picante – Restaurant & Food WordPress Theme
  • Regn | Agency & Business WordPress Theme
  • Remake – Minimal Portfolio & Agency Theme
  • Specular – Multi-Purpose WordPress Theme
  • Suggest us Features
  • Tower – Business-Driven Multipurpose WP Theme
  • Vibrance – Photography Theme

Site Links

  • Support Policy
  • Specular Support Forum
  • Video Tutorials
  • Knowledge Base
  • Guides and Reviews

Useful Articles

  • Build a Website
  • Web Design & Development
  • Hosting
  • WordPress

Login

Log In
Register Lost Password