Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

WP Search, show excerpts in search #732

Closed
jkaliski opened this issue Feb 21, 2016 · 4 comments
Closed

WP Search, show excerpts in search #732

jkaliski opened this issue Feb 21, 2016 · 4 comments

Comments

@jkaliski
Copy link

What is the proper way of displaying posts excerpts in the search results instead of full posts in FundationPress?

@rafaoski
Copy link

I m sory but my english is weak ... You must go to root folder foundationpress and search results is located in template-parts folder in file name content.php (this file show results in blog post)...
Change line number 19 to ... But blog post also change ... If you want change only searc to add this block in template-parts/content.php (Delete Line 19) ...
ADD:

        <?php the_excerpt(); //Add Excerpt ?>

        <?php else : //Else Not Search  ?>

    <?php the_content( __( 'Continue reading...', 'foundationpress' ) ); //Add Content ?>

     <?php endif; //End :) ?>

@jkaliski
Copy link
Author

It worked with , in the content.php, thanks a lot! I did not quite understand what you meant by blog post also changes...

On 21 Feb 2016, at 19:54, rafaoski [email protected] wrote:

I m sory but my english is weak ... You must go to root folder foundationpress and search results is located in template-parts folder in file name content.php (this file show results in blog post)...
Change line number 19 to ... But blog post also change ... If you want change only searc to add this block in template-parts/content.php (Delete Line 19) ...
ADD:

    <?php the_excerpt(); //Add Excerpt ?>

    <?php else : //Else Not Search  ?>

<?php the_content( __( 'Continue reading...', 'foundationpress' ) ); //Add Content ?>

 <?php endif; //End :) ?>


Reply to this email directly or view it on GitHub #732 (comment).

@rafaoski
Copy link

If You look at the page with the all entries you'll see excerpt (because added ...
Earlier, before the Change was the Display all words ...
This is correct way ...
Added entries automatically shortened ...
Look on this Page: https://developer.wordpress.org/reference/functions/the_excerpt/
Good luck my friend ...

@jkaliski
Copy link
Author

thank you !

22 feb. 2016 kl. 17:22 skrev rafaoski [email protected]:

If You look at the page with the all entries you'll see excerpt (because added ...
Earlier, before the Change was the Display all words ...
This is correct way ...
Added entries automatically shortened ...
Look on this Page: https://developer.wordpress.org/reference/functions/the_excerpt/
Good luck my friend ...


Reply to this email directly or view it on GitHub.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants