-
AuthorPosts
-
July 4, 2014 at 6:19 pm #287322
Hi Friends, really sorry for bothering you again with the same topic.
Please forgive me about this.I was examining the suggestion of Peter (Thanks for the Yigit’s assistance) and it seems only “blog-grid” has effect, other ones seem doesn’t have any effect over the layout of the “Archives” pages. Please can you clarify this?
“single-big”
“single-small”
“multi-big”Wish you the very best,
Bedros- This topic was modified 10 years, 4 months ago by Bedros.
July 6, 2014 at 5:17 am #287635Hey Bedros!
Thank you for visiting the support forum!
The filter is working when I test it. Please try this:
add_filter('avf_blog_style','avia_change_archive_blog_layout', 10, 2); function avia_change_archive_blog_layout($layout, $context){ if($context == 'archive') $layout = 'single-small'; return $layout; }
Cheers!
IsmaelJuly 6, 2014 at 8:23 am #287655Hmmm, this is very interesting ; it doesn’t work on me.
Only “blog-grid” type takes effect, and others don’t, what could be the reason?Thanks very much for all.
Kind Regards,
Bedros- This reply was modified 10 years, 4 months ago by Bedros.
July 6, 2014 at 1:22 pm #287694Hi!
We’ll fix this bug with the next version. For a quick fix open up archive.php and replace:
$blog_layout = apply_filters('avf_blog_style', avia_get_option('blog_style','multi-big'), 'archive'); if($blog_layout == 'blog-grid')
with
$avia_config['blog_style'] = apply_filters('avf_blog_style', avia_get_option('blog_style','multi-big'), 'archive'); if($avia_config['blog_style'] == 'blog-grid')
Cheers!
PeterJuly 6, 2014 at 1:29 pm #287696Peter thanks very much for your clarifying that it’s indeed a little bug.
Thanks very much for all your support friends,
And please forgive me for the weekend headache :)
Wish you the very best,
BedrosJuly 6, 2014 at 1:40 pm #287700Hi!
Glad I could help you :)
Best regards,
PeterJuly 6, 2014 at 5:22 pm #287727Hi friends, just tried the “fix” and it works but, actually it doesn’t “shorten” the text content when I use any of the following three options.
single-big
single-small
multi-bigIt seems only the “blog-grid” displays the text content shortened. The three above don’t shorten the text, they only change the layout a little bit, according to the size of the featured image of blog post.
It would be absolutely far more UserFriendly if visitors see shortened text content for each post in the Category ARCHIVES ; like the image below:
If you consider a content rich website with 2000-3000 words long articles, then it would be extremely hard for a visitor to explore a category with the current structure within category ARCHIVEs
I would really appreciate it if you would consider this point for the next update.
Please let me know what do you think about this.
Thanks for all,
Wish you the very best ;
Kind Regards,
Bdros.- This reply was modified 10 years, 4 months ago by Bedros.
July 7, 2014 at 3:36 am #287789Hi!
Thank you for the update.
The filter is actually working on my end. Testing on Enfold 2.8.1, WP 3.9.1. Anyway, please post the login details here and set it as a private reply. We would like to check it.
Cheers!
IsmaelJuly 7, 2014 at 8:32 am #287856Hi Ismael;
Yes, the filtering works BUT, Are you able to see category ARCHIVES like the image below? With the TEXT SHORTENED? ( please let me know ; because that’s the way I want to display them, and this is the best option for a user-friendly interface. As I have said previously, If the category’s posts are 2000-3000 words length, it would be frustrating for a user to explore a category’s posts.)I am using the latest WORDPRESS and latest ENFOLD, but on the category ARCHIVES it doesn’t shorten the text content, which I want to do.
With the current structure, “blog-grid” is the only type that shortens the text while displaying category archives. The other options should behave like that way too: (“single-big” , “single-small” , “multi-big”)
I hope I was able to make myself clear.
Please let me know.
thanks very much for your patience and understanding.- This reply was modified 10 years, 4 months ago by Bedros.
July 7, 2014 at 1:01 pm #287947Hey Dear Bedros!
This is how it looks on my local installation – http://i.imgur.com/CnYs46o.png
Do you mind posting temporary admin login here so we can look into it?Best regards,
YigitJuly 7, 2014 at 1:06 pm #287950This reply has been marked as private.July 7, 2014 at 3:03 pm #287997Hey!
Thank you for the access.
What blog style are you planning to use? Please duplicate the includes folder on the child theme then place the loop-index.php. Edit the file, look for this code:
echo '<div class="entry-content" '.avia_markup_helper(array('context' => 'entry_content','echo'=>false)).'>'; echo $content; echo '</div>';
Replace it with this:
echo '<div class="entry-content" '.avia_markup_helper(array('context' => 'entry_content','echo'=>false)).'>'; if(!is_archive()){ echo $content; } else { $excerpt = the_excerpt(); echo $excerpt.'<a href="'.get_permalink().'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"> →</span></a>'; } echo '</div>';
Best regards,
IsmaelJuly 7, 2014 at 3:41 pm #288019Hi, thanks very much for the code, Ismael ; works great. :)
Now it displays 4 posts for each category on ARCHIVES pages.
How can I control the number of posts displayed in each page?Thanks in advance, and thanks for all your patience ;wish you the very best, Yigit, Josue, Peter, and Ismael.
Kind Regards,
Bedros- This reply was modified 10 years, 4 months ago by Bedros.
July 8, 2014 at 3:18 pm #288548Hey Bedros!
Please add following code to Functions.php file as well and change 2 to needed number
add_action( 'pre_get_posts', 'set_posts_per_page' ); function set_posts_per_page( $query ) { global $wp_the_query; if ( ( ! is_admin() ) && ( $query === $wp_the_query ) && ( $query->is_archive() ) ) { $query->set( 'posts_per_page', 2 ); } return $query; }
Regards,
YigitJuly 8, 2014 at 3:43 pm #288562Works wonderliciously great!
Thanks very much Yigit! :)- This reply was modified 10 years, 4 months ago by Bedros.
July 8, 2014 at 3:45 pm #288565 -
AuthorPosts
- The topic ‘2 – BlogPost Meta – Categories VS Author’ is closed to new replies.