Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
  • #24145


    I was wondering how I can change the View of the Mainpage of the blog. Normaly there is the content stripped after a few words. How can I change it to an excerpt, e.g. without any picture I used at the beginning of a post?

    It should look like that at first the post thumbnail is shown, then only the excerpt (without any html and pictures and other stuff) and then a link, where the user can go to the whole post.

    Would be great if you can help!



    First, go to Enfold > Blog Style > Blog Style, select the “Single Author, big preview Pic (no author picture is displayed, feature image is big)”. You can specify the excerpt manually, just edit a post, look for the Screen Options (top right corner). Check the Excerpt option.




    Hi Ismael,

    thanks for your quick reply. I already set “Single Author, big preview Pic (no author picture is displayed, feature image is big)” and manually set the excerpt via “<!–more–>”-Tag. I can’t change it through the excerpt option because I already have over 2k posts and don’t want to change post by post.

    Is there another way for working with the “<!–more–>”-Tag?


    Yes – open up wp-contentthemesenfoldincludesloop-index.php and replace

    $current_post['content'] 	= $blog_content == "content" ? get_the_content(__('Read more','avia_framework').'<span class="more-link-arrow">  &rarr;</span>') : get_the_excerpt();


    $current_post['content'] 	= get_the_content(__('Read more','avia_framework').'<span class="more-link-arrow">  &rarr;</span>');


    Hey Dude,

    thanks – that helps a little ;) Now I have only the problem, that images I used at the beginning of a post are shown at the first page too. In combination with the post thumbnails it looks really bad. Is there any way that not the content will be shown but a real excerpt (only text, no images, no html-codes, …)??


    Hi ppc1337,

    If you change get_the_content to get_the_excerpt it will return the excerpt field for the post.




    Hey Devin,

    I tried this already. The content is diplayed through “echo $content”. I tried to change it to get_the_excerpt and the_excerpt – but then nothing is displayed


    You can try following code:

    $current_post['content'] 	= $blog_content == "content" ? get_the_content(__('Read more','avia_framework').'<span class="more-link-arrow">  &rarr;</span>') : strip_tags(get_the_content(__('Read more','avia_framework').'<span class="more-link-arrow">  &rarr;</span>'));


    Hm … that changed nothing :( Would it be helpfull if you log in to my site and have a look by yourself?



    Then try:

    $current_post['content'] = get_the_content(__('Read more','avia_framework').'<span class="more-link-arrow">  →</span>');
    $current_post['content'] = strip_tags(get_the_content('&nbsp;'));
    $current_post['content'] .= '<div class="read-more-link"><a href="'.get_permalink($the_id).'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"> &rarr;</span></a></div>';

    Best regards,



    Dude, you are awsome! Works perfectly!



    I changed the code a bit to include a read more link.

    Best regards,



    Now it’s absolutly perfect – thanks a lot!!

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘How to get Excerpt in loop_index.php’ is closed to new replies.