-
AuthorPosts
-
March 4, 2016 at 10:57 pm #593565
Hello,
My customer has opted for the Grid Blog layout and would like to display Title + Excerpt + Read More text for each post.
On the home page we are using the “blog post” component with the layout builder. It works fine.
http://www.berangere-test.fr/ (see at the bottom of the page)On archive pages, the Read More text is not displayed. (with the standard blog layout, it is)
http://www.berangere-test.fr/thematique/secourisme/Is there a way to have the Read More text there ? I have searched the forum and docs but have not found anything.
Thanks,
Bérangère
- This topic was modified 8 years, 9 months ago by caudebert.
March 7, 2016 at 2:00 pm #594298Hi caudebert!
After you drag the “blog post” element from the content elements. please use the suitable “Read more” option in the define blog grid layout option.
Regards,
Vinay KashyapMarch 7, 2016 at 4:38 pm #594416Hi Vinnie,
This solution is unfortunately not applicable to archive pages which are the ones that concern me.
Those pages are built by the theme depending on the blog style selected in the theme options.
> If the selected blog layout is other than “grid”, the “read more” text is displayed at the bottom of the excerpt.
> If the selection layout is “grid”, it is not.So I was wondering whether you have a solution to display “read more” with grid layout, like this page
http://www.berangere-test.fr/thematique/secourisme/Thanks
Bérangère
- This reply was modified 8 years, 9 months ago by caudebert.
March 14, 2016 at 4:59 am #597509Hey!
Try adding this at the very end of your theme / child theme functions.php file:
function change_blog_archive_style() { global $avia_config; if(!is_single()){ $avia_config['blog_content'] = "excerpt_read_more"; } } add_action('get_header', 'change_blog_archive_style');
Cheers!
JosueMarch 16, 2016 at 6:31 pm #599088Hi Josue,
I have done it but it does not work.
Read More still does not show on category pages http://www.berangere-test.fr/thematique/secourisme/.
I provide you an admin code if you want to check.Thanks
BérangèreMarch 16, 2016 at 11:52 pm #599297Check it now, i modified archive.php, this part:
$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() ) );
To:
$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() ) );
You can move archive.php to your child theme if you want this modification to survive updates.
March 17, 2016 at 12:50 pm #599562OK thanks a lot !
BérangèreMarch 18, 2016 at 6:59 am #600108January 11, 2017 at 5:18 pm #732158Please close,
BérangèreJanuary 12, 2017 at 6:16 am #732476 -
AuthorPosts
- The topic ‘Add Read More text on Grid blog archive page ?’ is closed to new replies.