Viewing 5 posts - 1 through 5 (of 5 total)
-
AuthorPosts
-
October 9, 2017 at 4:29 pm #861965
We changed the archive vie to grid with the following code. Thats fine, but we are missing a read more link.
Can you help?
add_filter('avf_blog_style','avia_change_category_blog_layout', 10, 2); function avia_change_category_blog_layout($layout, $context){ if($context == 'archive') $layout = 'blog-grid'; return $layout; } add_filter('avf_blog_style','avia_change_tag_blog_layout', 10, 2); function avia_change_tag_blog_layout($layout, $context){ if($context == 'tag') $layout = 'blog-grid'; return $layout; }
- This topic was modified 7 years, 2 months ago by elbnetz.
October 12, 2017 at 4:21 am #863119Hey elbnetz,
Thank you for using Enfold.
Please edit the archive.php and tag.php file, look for the following line of codes.
$atts = array( 'type' => 'grid', 'items' => get_option('posts_per_page'), 'columns' => 3, 'class' => 'avia-builder-el-no-sibling', 'paginate' => 'yes', 'use_main_query_pagination' => 'yes', 'custom_query' => array( 'post__in'=>$post_ids, 'post_type'=>get_post_types() ) );
Add the “contents” parameter then set it to “excerpt_read_more”.
$atts = array( 'type' => 'grid', 'items' => get_option('posts_per_page'), 'columns' => 3, 'contents' => 'excerpt_read_more', 'class' => 'avia-builder-el-no-sibling', 'paginate' => 'yes', 'use_main_query_pagination' => 'yes', 'custom_query' => array( 'post__in'=>$post_ids, 'post_type'=>get_post_types() ) );
Best regards,
IsmaelOctober 12, 2017 at 8:51 am #863253Many Thanks!
October 13, 2017 at 7:32 am #863755Hi,
Glad we could help. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardOctober 13, 2017 at 8:29 am #863778You can close the topic, Thanks!
-
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)
- The topic ‘Grid + Read more button in archive’ is closed to new replies.