• In my options, I’ve selected to only show the summaries on the homepage instead of the full post, but this did not seem to do anything – the full text is still be shown.

    I tried replacing the_content() with the_excerpt() and that kind of worked – it replaced the full text with a summary, but that had 2 problems. One, it didn’t add a link for the user to follow to the full text at the end of the summary and two, it replaced the full text of the post with a summary on the page that is SUPPOSED to have the full post.

    Finally, I tried using the excerpt_reloaded plugin as suggested here: https://www.ads-software.com/support/topic/35635, but that has the same problem with the full text being replaced with the summary on wrong page and in addition, it strips out all formatting of my posts.

    Surely this cannot be that difficult. I just want a summary of my recent articles on my homepage and the full text of the articles on the actual article pages…does anyone know how this can be accomplished?

    Thank you very much in advance!

Viewing 13 replies - 1 through 13 (of 13 total)
  • You are having some problems, huh? For starters, the option in the admin section is for feeds only. Replacing the_content() with the_excerpt() is most often for the “main” page only. Clicking on the post title should bring up the single post page which has the_content()

    Thread Starter jimday1982

    (@jimday1982)

    Ah, ok, that explains the option in the admin section. What doesn’t make sense though is that when I go to index.php and replace the_content() with the_excerpt(), it creates the excerpt on BOTH index.php and the post page (where it should be the full post). Perhaps I’m editing the wrong file? Any ideas?

    You can see what’s happening at: https://jimday.net/

    Don’t need to see it. Evidently your theme does not have a single.php file and uses the index page to display both the main page and single posts. You could either make a single.php (probably the best option) or make a conditional to show the content if the index is displaying a single post or the excerpt if it is displaying the main page.

    Thread Starter jimday1982

    (@jimday1982)

    You were right on! I simply added a single.php file in my new theme directory, modified it a little, and now it’s working as it should.

    My only other question is, which file do I have to edit to create a link to the full post on my index.php page instead of just the elipses? I searched all the include files, but I’m not seeing anything…

    Thank you for your help by the way, it’s much appreciated.

    Not sure what you mean. The post title is the link to the full post. If you want another link you can copy that permalink anywhere you want it within the loop of the index page.

    Edit: I understand now. You can place it right after the_excerpt()

    Thread Starter jimday1982

    (@jimday1982)

    Yes, I know about that, but I’m trying to replace the elipses immediately after the excerpt. I’m guessing that the only way to do this is to edit the function that creates the excerpt…I just can’t find it…

    functions-formatting.php adds the […] in wp_trim_excerpt()

    Thread Starter jimday1982

    (@jimday1982)

    Man, I am not doing good here. I went to edit that file, I uploaded it, and got an error…so I undid the change, reuploaded it, and now I keep getting this error:

    Parse error: parse error, unexpected T_LNUMBER in /home/jimday/public_html/wp-includes/functions-formatting.php on line 84

    I’m not understanding this because I uploaded the file unaltered…is there something out of the ordinary that I need to do to this file or something?

    EDIT: Well, I deleted that function alltogether, so at least my site is back up : /

    Thread Starter jimday1982

    (@jimday1982)

    Ok, I’m almost there. In function-formatting.php, I have the following line (I put the period in the href below so the code displays):

    array_push($words, '[<a h.ref="' . the_permalink() . '">read more...</a>]');

    But the link is not being generated correctly…if you look on my homepage (https://www.jimday.net), you’ll see the url appears above the excerpt. Not sure why, the code looks correct to me. Any thoughts?

    You are probably using the wrong code there. what do you have?

    Thread Starter jimday1982

    (@jimday1982)

    The code I’m using is in the post above.

    This seems to work perfectly if I replace the_permalink() with a hardcoded url…does the the_permalink() function not work in this file or something?

    That function echoes the permalink, try get_permalink()

    Please tell me you edited the above post or I just might be losing my mind ??

    Thread Starter jimday1982

    (@jimday1982)

    YES! I can’t thank you enough for your help – this was driving me insane.

    Problem solved!

    And nope, you’re not going crazy…I edited it.

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