• Resolved storyboutagirl

    (@storyboutagirl)


    I have searched (https://www.ads-software.com/support/topic/a-problem-showing-full-posts?replies=9) and find tons of posts on this but they all say the same thing. To go to search.php and find <? php the_excerpt(); ?> and change it to <? php the_content(); ?> in the Loop. When I find <?php /* Start the Loop */ ?> it has this in it instead <?php while ( have_posts() ) : the_post(); ?> I can only assume one of the WP updates changed this somehow? How do I see the full post and not just an exceprt? Is there something I add to this? It’s happening the same with categories and archives. If I do replace it with <? php the_content(); ?> then I get nothing but the title of the post repeated over and over and over again. Can someone tell me how to fix this or even where in the docs to find this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The code you have mentioned is the start of the WordPress loop:

    <?php while ( have_posts() ) : the_post(); ?>

    Just after that you will probably have some code that includes the_title() and after than the_content().

    To display the full articles you will need to replace the_content() with the_exceprt(). This will need to be done on all template you require this to happen e.g. archives.php

    more recent themes might have this code in loop.php (twenty ten and themes inspired by it) or content.php (twenty eleven) or totaly somewhere else.

    without knowing what theme you are using, any detailed suggestions are difficult to make.

    Thread Starter storyboutagirl

    (@storyboutagirl)

    The theme is Yoko: https://www.ads-software.com/extend/themes/yoko

    This is the search.php file:

    [code moderated per forum rules - please follow https://codex.www.ads-software.com/Forum_Welcome#Posting_Code for posting code]

    I only see <?php get_template_part( 'content', 'search' ); ?> that has the word content in it...

    this line:

    <?php get_template_part( 'content', 'search' ); ?>

    points to a template called content-search.php, or if this does not exist, content.php

    https://codex.www.ads-software.com/Function_Reference/get_template_part

    if yoko is build similar to twenty eleven, there will be a conditional statement with: if( is_search() ) that selects the excerpt for search results, and the full post for other pages.

    Thread Starter storyboutagirl

    (@storyboutagirl)

    Got it! Thanks it was in the content.php! Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘changing excerpt to full post’ is closed to new replies.