Tagged: ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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.

    #1074269

    Hi Gitte,

    Have you tried other values if it works such as the following:
    only_excerpt
    title
    title_read_more

    Can you give us ftp access on it? so we can inspect further.

    Best regards,
    Nikko

    #1074491

    Here is the code of my complete archive.php (private area)

    None of this worked:

    'contents' => 'only_excerpt',	
    'contents' => 'title',	
    'contents' => 'title_read_more',	

    View post on imgur.com

    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;
    }
    #1074496

    Login

    #1075945

    Hi,

    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,
    Ismael

    #1076080

    I 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
    #1077359

    Hi,

    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,
    Ismael

    #1077815

    It works fine, thank you very much, Ismael.

    #1078401

    Hi Gitte,

    Glad we could help :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.