Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #1052252

    How can I create a tag Archive that displays all posts in that tag using a grid?

    Now if I click a tag, it shows all posts in chronological order and hundreds of pages, I want to have a grid.

    Thank you.

    #1052727

    Anything about this?

    #1053459

    Hi,

    Thank you for using Enfold.

    You have to set the Enfold > Blog Layout > Blog Layout settings to “Grid Layout” or use the “avf_blog_style” filter to set the blog style to “grid” when viewing an archive page.

    Best regards,
    Ismael

    #1053583

    Can you please share how to use the “avf_blog_style” filter to set the blog style to “grid” when viewing an archive page.?

    That means “only” categories, dates, tags will look like that, and the blog as usual, correct?

    Thank you.

    #1053586

    both here either tag or archive:

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

    Thank you. How to remove the sidebar as well ?

    #1053619

    Get rid of sidebar – where – on all archive pages or only for some category pages ?

    #1053620

    The same as before in some pages, tag and archive for example.

    Thank you.

    #1053630

    there was a filter – you can adjust via if clauses to your needs:

    add_filter('avia_layout_filter', 'avia_change_category_layout', 10, 2);
    function avia_change_category_layout($layout, $post_id) {
        if( is_category('grafik') ){
            $layout['current'] = $layout['fullsize'];
            $layout['current']['main'] = 'fullsize';
        }
        return $layout;
    }
    #1053634

    and by the way if you like to exclude the layout for archiv-page and all the post in it you can use has_category()

    if( is_category('grafik') || has_category('grafik') ){

    hm seems not to work in that supposed manner.
    I will brainstorm again. …

    Edit: it seems to be this way that the layout of the category will go to the post in that category !
    But you can bypass it by f.e.
    (maybe a mod knows a different setting – quiet shorter):

    
    
    add_filter('avia_layout_filter', 'avia_change_category_layout', 10, 2);
    function avia_change_category_layout($layout, $post_id) {
        if( is_category('grafik') && is_archive() ){
            $layout['current'] = $layout['sidebar_right'];
            $layout['current']['main'] = 'sidebar_right';
        }
    
        return $layout;
    }
    
    add_filter('avia_layout_filter', 'avia_change_post_layout', 10, 2);
    function avia_change_post_layout($layout, $post_id) {
        if( has_category('grafik') && !is_archive() ){
            $layout['current'] = $layout['fullsize'];
            $layout['current']['main'] = 'fullsize';
        }
    
        return $layout;
    }

    so here the archive page of category: grafik will be with sidebar right – but the posts in it has no sidebar.

    • This reply was modified 5 years, 6 months ago by Guenni007.
    #1053656

    if you only want to extra style the category archive page but not the posts ( post then get standard layout set by Enfold options page):

    add_filter('avia_layout_filter', 'avia_change_category_layout', 10, 2);
    function avia_change_category_layout($layout, $post_id) {
        if( is_category('grafik') && !has_category('grafik') ){
            $layout['current'] = $layout['sidebar_right'];
            $layout['current']['main'] = 'sidebar_right';
        }
        return $layout;
    }

    just play a bit with both filters

    #1108061

    Thank you.

    I am now using this:

    
    // tag y archive como grid
    	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;
    	}
    
    	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;
    	}
    // tag y archive como grid
    

    That shows categories and tags in grid with sidebar and is ok. (I will try the sidebar thing later)

    I have 2 more problems.

    1- How to remove the date?
    2- Is there a way to choose the excerpt it shows under the titles?

    For number 2 the problem is that all of them start with “Description of the product” and then the description. The thing is that in the post itself it is ok and makes sense, but in grid all of them show “Description of the product” under the title, because is just a bit of text. So showing more text or making it start later can do the trick.

    Thanks.

    #1108796

    Hi,

    1.) You should be able to remove the date in the Enfold > Blog Layout > Blog meta elements section. If you can’t remove it there, try to remove it using css code.

    2.) It will show partial content of the post as the excerpt automatically. If you prefer, you can manually specify the summary in the posts’ Excerpt field.

    Best regards,
    Ismael

    #1109201

    hello,

    no chance to list the archive the tag-page like the cat-page.
    what can i do?

    bis dann, marco.

    the code in /themes/enfold/functions.php:

    // Archiv-Display
    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;
    }

    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;
    }
    // Archiv-Display

    kategorie:
    https://netztaucher.com/category/dauerbrenner

    tag:
    https://netztaucher.com/tag/onlineshop

    #1109215

    Thank you Ismael.

    For 1) I have it unchecked in the options, but it is still showing. Is there a way to make that checkbox actually work ?

    For 2) I will continue testing to see if I can get something to work.

    Thanks.

    #1109827

    Hi,

    1.) Try to remove the date manually with css.

    time.date-container.minor-meta.updated, .text-sep-date {
        display: none !important;
    }

    2.) Can we see an actual archive or category page from your site? Please post the URL in the private field.

    Thank you for the update.

    Best regards,
    Ismael

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