-
AuthorPosts
-
March 1, 2019 at 7:29 pm #1073355
Hi,
I use this code snippet from @ismael to show at archive.php my manual excerpts and the read more link:
$atts = array( 'type' => 'grid', 'items' => get_option('posts_per_page'), 'columns' => 2, 'class' => 'avia-builder-el-no-sibling', 'paginate' => 'yes', 'use_main_query_pagination' => 'yes', 'custom_query' => array( 'post__in'=>$post_ids, 'post_type'=> $key ), 'contents' => 'excerpt_read_more', );
so far, so good. How can I modify this snippet that it shows the excerpt, but not the read more link?
I tried it with
'contents' => 'excerpt',
instead of
'contents' => 'excerpt_read_more',
but this does not work. Could you please give me the right modification of Ismael’s snippet please (no CSS display none thing)?
Thank you.March 4, 2019 at 10:46 am #1074269Hi Gitte,
Have you tried other values if it works such as the following:
only_excerpt
title
title_read_moreCan you give us ftp access on it? so we can inspect further.
Best regards,
NikkoMarch 4, 2019 at 7:36 pm #1074491Here is the code of my complete archive.php (private area)
None of this worked:
'contents' => 'only_excerpt', 'contents' => 'title', 'contents' => 'title_read_more',
and please note:
I use this function filter (https://kriesi.at/documentation/enfold/blog-post/#toggle-id-10):add_filter('avf_blog_style','avia_change_category_blog_layout', 10, 2); function avia_change_category_blog_layout($layout, $context){ if($context == 'archive') $layout = 'single-big'; 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 = 'single-big'; return $layout; }
March 4, 2019 at 8:02 pm #1074496Login
March 7, 2019 at 12:11 pm #1075945Hi,
Thanks for the update.
The login token has expired. Please regenerate another token so that we can access the site. Make sure that the Appearance > Editor panel is accessible.
Have you tried removing the read more link with css?.more-link { display: none !important; }
Best regards,
IsmaelMarch 7, 2019 at 6:35 pm #1076080I added a longer valid token. New data see private area:
- This reply was modified 5 years, 8 months ago by BeeCee. Reason: created a normal WP login
March 11, 2019 at 3:10 pm #1077359Hi,
Thanks for the update.
This is possible, but you have to modify the template file directly. Edit the includes > loop-index.php file, look for this code around line 76:
$current_post['content'] = $blog_content == "excerpt_read_more" ? $current_post['content'].' <div class="read-more-link"><a href="'.get_permalink().'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"></span></a></div> ' : $current_post['content'];
Remove the read more container or replace the code with the following:
$current_post['content'] = $blog_content == "excerpt_read_more" ? $current_post['content'] : $current_post['content'];
Best regards,
IsmaelMarch 12, 2019 at 1:30 pm #1077815It works fine, thank you very much, Ismael.
March 13, 2019 at 8:48 pm #1078401Hi Gitte,
Glad we could help :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.