Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #281990

    Dear Support

    I have an issue with the way articles are being displayed within the category pages. Since I had to import all my 200+ posts I dont want to have to enter inside each one the READ MORE tag. Is there a way to make sure posts are nicely displayed in the category page, with excerpts, featured image and meta info?

    Right now it looks pretty messy. Please let me know. Thank you!

    #282343

    Hey!

    Thank you for the info.

    Look for this line of code:

    echo '<div class="entry-content" '.avia_markup_helper(array('context' => 'entry_content','echo'=>false)).'>';
    echo $content;
    echo '</div>';
    

    Replace it with:

    echo '<div class="entry-content" '.avia_markup_helper(array('context' => 'entry_content','echo'=>false)).'>';
    if(!is_archive()){
                echo $content;
    			} else {
    		$excerpt = get_the_post_thumbnail( get_the_ID(), "large");
    		$excerpt .= get_the_excerpt();
    		$excerpt .= '<a href="'.get_permalink().'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow">  &rarr;</span></a>';
    		echo $excerpt;
    			}
    echo '</div>';

    Cheers!
    Ismael

    #282345

    Hi, nothing im getting this error:
    Parse error: syntax error, unexpected ‘post’ (T_STRING) in /home/content/p3nexnas06_data01/69/2066769/html/wp-content/themes/enfold/includes/loop-index.php on line 23

    This is how the loop-index.php file looks now

    EDITED

    #282348

    Hey!

    Thank you for the update.

    Please post the login details here and set it as a private reply. We’ll edit the code for you.

    Regards,
    Ismael

    #282349
    This reply has been marked as private.
    #283492

    Hey!

    Thank you for the info but the login details are incorrect. Please check. If you can paste the code from loop-index.php to pastebin.com, that would be great. I’ll give you a modified version after. Copy the includes folder with the loop-index.php file to your child theme folder if you want to preserve the changes.

    Best regards,
    Ismael

    #284085
    This reply has been marked as private.
    #284529

    Hey!

    I corrected Ismaels code and updated your loop-index.php file: http://afa.862.myftpupload.com/wp-admin/theme-editor.php?file=includes%2Floop-index.php&theme=enfold&scrollto=3490&updated=true

    Just copy it into your child theme (wp-content/themes/enfold-child/includes/loop-index.php) and then it’s update safe and the parent theme will not overwrite it.

    Best regards,
    Peter

    #284816

    Thank you Peter :)

    Is it possible to make the posts appear as regular Multi Athor Posts in the the Category pages?

    Also the Read More button can it go below same as other posts on the site>

    Thank you very much

    Andrea

    #284832

    Hi!

    1) Yes, you can change the layout with php code – insert it into the child theme functions.php file:

    
    add_filter('avf_blog_style','avia_change_archive_blog_layout', 10, 2); 
    function avia_change_archive_blog_layout($layout, $context){
    if($context == 'archive') $layout = 'multi-big';
    return $layout;
    }
    

    2) Yes, you can use this css code to push the read more button down:

    
    .archive .template-blog .more-link {
    display: block;
    width: auto;
    float: left;
    }
    

    Best regards,
    Peter

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.