• I’m currently working on the following website: https://www.woodburymensshop.com/blog-1/

    I’m trying to make the blog show an exerpt but I’m running into issues. I’ve tried changing the reading settings to Summary, adding an exerpt in the actual post, and adding the following php code into my theme’s functions file to no avail.

    function excerpt_read_more_link($output) {
     global $post;
     return $output . '<a href="'. get_permalink($post->ID) . '"> Read More...</a>';
    }
    add_filter('the_excerpt', 'excerpt_read_more_link');

    Is there anything else I could do to make the summary work on this theme?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Look on the code of the page (index.php probably if you’re on the front page). Is it calling for the_content() in the loop or the_excerpt()?

    Thread Starter mangledlolli

    (@mangledlolli)

    Wouldn’t it be in the blog page? If so, neither one is there.

    On the index page, it calls for the_content, but my home page is a static page.

    Sorry but what page are you trying to show the excerpt on exactly?

    Sorry, I think I understand now. /blog-1/ is a page that you created that is showing your current blog roll? How did you get /blog-1/ to show your current blog posts? Page-template? Or is it an archive page that has been customized?

    If none of your efforts are showing an excerpt it means that the php page that is being loaded isn’t calling for the the_excerpt in the loop; it is calling for the the_content. I’m just trying to help you find the right php page to edit.

    Thread Starter mangledlolli

    (@mangledlolli)

    Thank you so much for helping!

    blog-1 is the current blog roll page. It’s just a normal blog where we put the content under the “Posts” section. They do show up there, but the excerpt and summary are not working properly.

    In the Reading section, I put the posts page as “Blog 1” and listed it as Summary instead of Full Text.

    Would I have to edit the blog.php or index.php?

    Be aware that if you modify theme files, your changes will be overwritten and erased when the theme is updated — instead you should be using a Child Theme – https://codex.www.ads-software.com/Child_Themes

    Yep, WPyogi is correct. You will have to follow his link to create a excerpt. It looks like your theme is from themeforest. Before creating a child theme (which you should have before making changes to functions.php) and then finding which page is being loaded I would see if your theme has the functionality in it already. You should ask at themeforest.

    If there isn’t I would follow WPyogi’s link, create a child then create a custom template for your blog page where you can make changes to the loop that will only affect blog-1

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Summary not working’ is closed to new replies.