• How do I make only a short synopsis on the front page?

    Right now the entire post is shown on the front page. I would like to have only the first X numbers of characters shown so the visitor can go the to actual post to read the message.

    Thanks!

Viewing 15 replies - 1 through 15 (of 22 total)
  • It is called “excerpt” in WP lingo.
    Here is an opposite question but the solution is the same:
    https://www.ads-software.com/support/topic/127976?replies=2#post-595683

    Thread Starter brewskie

    (@brewskie)

    Thanks for your reply moshu.

    I replaced the tag:

    <?php the_content(__(‘Continue Reading »’)); ?>

    with:

    <?php the_excerpt(); ?>

    And added the first few sentences to the Optional Excerpt box in the edit post page.

    The page remains the same though.

    Any ideas what I should do?

    Thanks again ??

    Possible reasons: you edited the wrong theme; you edited the wrong file. Or both ??
    This might help to figure out which template file is used in different conditions:
    Template_Hierarchy

    Thread Starter brewskie

    (@brewskie)

    Thanks again moshu.

    I tested to be sure it was the correct file by adding “GGGGGG” and checking to be sure that showed on the front page (index.php) and that did show.

    The changes didn’t however.

    https://www.criticalreactor.com

    It’s time to take a look at your index file.
    Paste it to https://wordpress.pastebin.ca and post back with the address.

    Thread Starter brewskie

    (@brewskie)

    Here’s the URL to the index.php file.

    Again…I really appreciate your help. And that page for posting the file is pretty cool ??

    https://wordpress.pastebin.ca/637371

    You said you replaced the_content…
    So, why am I seeing this:

    <?php the_content(__('Continue Reading &raquo;')); ?>

    Thread Starter brewskie

    (@brewskie)

    Yes…I reverted back is all. I wasn’t sure whether it was doing anything I didn’t notice. Other than replacing that one line with <?php the_excerpt(); ?> it’s how it was.

    Sorry about that. I should have remembered to post it correctly. It’s now on the site with the new code.

    I also reposted the file to:

    https://wordpress.pastebin.ca/637438

    You are doing something wrong.
    I installed the theme on a test (local) install and replaced the_content with the_excerpt – and it works.

    You definitely messed up something (or a plugin is tricking you) because in the category.php of theme the_excerpt is used out of the box. However, on your blog the category listing is also showing full text. So, now I am confused…

    Thread Starter brewskie

    (@brewskie)

    “because in the category.php of theme the_excerpt is used out of the box.”

    Do you mean the Xmark theme?

    In category.php it’s <?php the_excerpt (__(‘Continue Reading »’)); ?> Should that be in the index.php like that?

    Yes. Aren’t we talking about that theme?!

    Thread Starter brewskie

    (@brewskie)

    I just tried it.

    But it’s still the same.

    Yea…the Xmark theme. It has a large X in a red circle.

    I’ll leave up the theme for a few minutes:
    https://www.transycan.net/demo/
    (look at the third post – Formatting examples; the rest are too short)
    Hurry, I’ll remove it soon… ??

    Thread Starter brewskie

    (@brewskie)

    Yes that’s what I am after. Maybe a Read More… or similar

    “Read more” or the_excerpt are TWO different things. Don’t mix them ever. They give you similar result but with totally different techniques.

    I am almost afraid to ask: how do you edit the template file(s)?

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Synopsis on main page’ is closed to new replies.