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

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

    #863253

    Many Thanks!

    #863755

    Hi,

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

    #863778

    You can close the topic, Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Grid + Read more button in archive’ is closed to new replies.