-
AuthorPosts
-
June 21, 2014 at 4:23 pm #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!
June 23, 2014 at 10:16 am #282343Hey!
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"> →</span></a>'; echo $excerpt; } echo '</div>';
Cheers!
IsmaelJune 23, 2014 at 10:27 am #282345Hi, 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 23This is how the loop-index.php file looks now
EDITED
June 23, 2014 at 10:29 am #282348Hey!
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,
IsmaelJune 23, 2014 at 10:32 am #282349This reply has been marked as private.June 25, 2014 at 10:56 am #283492Hey!
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,
IsmaelJune 26, 2014 at 2:41 pm #284085This reply has been marked as private.June 27, 2014 at 1:27 pm #284529Hey!
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,
PeterJune 28, 2014 at 10:00 am #284816Thank 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
June 28, 2014 at 12:04 pm #284832Hi!
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 -
AuthorPosts
- You must be logged in to reply to this topic.