WordPress.org

Ready to get started?Download WordPress

Forums

Remove "Read the full article" (15 posts)

  1. marketbeing
    Member
    Posted 4 years ago #

    I have installed an excerpt plugin and find the "Read the full article" link redundant. In addition, it comes up after short posts that are showing completely on the Category Archives screen (and that is true with or without the plugin)... Anyway, is there a way to get rid of the "Read the full article" box?

  2. stvwlf
    Member
    Posted 4 years ago #

    Remove the excerpt plugin and change your template page to display the_excerpt, which ends with [...] rather than the_content

    http://codex.wordpress.org/Template_Tags/the_excerpt

  3. marketbeing
    Member
    Posted 4 years ago #

    I actually started with trying to do that, but I'm new to all this, and I was soon lost. For example, my index.php file does not contain <?php get_the_content; ?>, which everybody seems to refer to. Where would I put this piece of code, <?php the_excerpt(); ?>, go? FYI, I am using WP 2.8.4.

    If you have time for this and could walk me through the process, I would greatly appreciate it.

  4. stvwlf
    Member
    Posted 4 years ago #

    hi -

    the_excerpt() would typically replace the_content() not get_the_content(). In a theme it looks something like this
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    The exact wording varies by theme. (you can not put a message in between the parentheses in the_excerpt() ).

    Some of the more recent highly user-configurable WordPress themes have taken parts of the loop code out of index.php and placed it in included files. The needed change is completely theme dependent, meaning each theme can be coded as the author chooses so generic instructions don't fit all themes. If you can't find the appropriate place, post back the name of the theme you are using. If its not a paid theme someone can access the theme and locate where the code you need to change is located.

  5. marketbeing
    Member
    Posted 4 years ago #

    Thank you, stvwlf!

    The theme I am working with is Headway. Perhaps someone familiar with it could direct me to the right file(s). I could open each of them, but I'm afraid I'd screw something up, and I'd hate to go through all the tweaking I've done again...

  6. stvwlf
    Member
    Posted 4 years ago #

    Hi

    I've not worked with the Headway theme. I just looked at their website. Seems like they might have a way to choose between full text and post summary on different pages, as part of the theme options. If you can't find a setting for that, I suggest asking on the support forum. Ask how you should accomplish that if the option to set it is not built into the theme's control panel.

    The issue with modifying the theme code of themes like this is they have frequent theme updates. Unless your code changes are made in a way they suggest, your changes will get overwritten each time you do a theme update.

  7. marketbeing
    Member
    Posted 4 years ago #

    Thank you very much, stvwlf. There is an option to Enable Small Excerpts in Headway. However, with that I face the same problem: the "Read the full article" box shows after the "full article" is already showing - I mean those short posts I mentioned before...

    I did post the question on the Headway forum, we'll see what develops. I will let you, and whoever else might be interested, know.

    Thanks again,
    Alex

  8. stvwlf
    Member
    Posted 4 years ago #

    Hi

    There are ways in WP to filter the output of certain functions and change the text output to the browser. Usually with excerpts its used to replace [...] with a read more link, but it could work the other way around also. First see if you get any suggestions on the Headway forum.

  9. marketbeing
    Member
    Posted 4 years ago #

    Hi,

    I guess I couldn't get across the idea of getting rid of the"Read the full article" statement - not the excerpts! - to the fellow who runs the show at Headway. After a few back-and-forths, his reply was: "You can increase the number of featured posts in the post tab under the Headway Design Panel. However, you cannot get rid of excerpts for category archives at this time."

  10. stvwlf
    Member
    Posted 4 years ago #

    Can you post a URL of a page that displays the "Read the full article message" that you don't want?

  11. marketbeing
    Member
    Posted 4 years ago #

    I will post part of my post at the Headway forum that explains the issue and has the URLs:

    Look at my blog page at http://www.self-cure.com/blog.html. You can see the whole first little post on top (Textbox Test) as well as the second one (Hello world!), which has the "Read the full article" line added. That's how it should be.

    Now click on "Curing self" under CATEGORIES. You'll see this: http://www.self-cure.com/category/curing-self. Now the first little post got the "Read the full article" as well - and it shouldn't cause it's shown in its entirety.

  12. stvwlf
    Member
    Posted 4 years ago #

    Oh, I see. All along I thought you were asking for something different, to remove the link button altogether, and just have the [...] in all cases.

    Removing it entirely only when the full post content has been displayed requires modifying the template code, because a test has to be set up to check if the displayed text ended in [...] and only display the button if it did.

    I want to point out the reason you are having this issue is because you are using a test post that is one line long. Wouldn't it be unusual for a real post to be less than 55 words long? Anything over 55 words displays with the [...] and thus needs a button.

    If you must hide the button only on short posts, that will require a template modification.

  13. marketbeing
    Member
    Posted 4 years ago #

    You were right, I was asking about removing the button altogether. Sorry for the confusion - the above was just to illustrate the problem. If I were able to remove the button altogether, I could have used an excerpt plugin.

    In fact, I've just re-activated the plugin, so you could take a look at how I could do without the "Read the full article" button at all - the "Read on..." link is where it's supposed to be! (plus, I can use different options for its text, for the length of the excerpt etc.)

    Thanks,
    Alex

  14. stvwlf
    Member
    Posted 4 years ago #

    hi

    Your theme uses a number of stylesheets. You can add one line to the stylesheet that will remove the display of the button altogether.

    In style.css add this at the very end, after all the import statements
    .more-link { display: none; }

    The issue becomes every time they update the theme that line will get written over. I suggest you ask on the forum, how/where can you enter custom CSS that won't be overwritten when the theme is updated.

    Its possible the place they tell you will cause that line to stop working. If that occurs, enter it like this
    .more-link { display: none !important; }

    Hopefully this resolves your issue.

  15. marketbeing
    Member
    Posted 4 years ago #

    You are a genius, stv!!! It is working perfectly! I just plopped the code into my custom.css, and it's working great. That's what I was looking for.

    I am backing up my custom.css each time I make change, so I don't lose hours of research work to get a precious line of code like the one you provided.

    I do appreciate your spending the time and not giving up on my issue.

    Thank you very much!
    Alex

Topic Closed

This topic has been closed to new replies.

About this Topic