Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #867627

    HI, for some strange reason I am not getting the grid layout appearing across category and month (date) archives even with the PHP additions to the functions.php page (in child theme):

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

    All defaults to a plain layout instead:
    FIRST LINK IN PRIVATE CONTENT LIST

    I have the custom avia layout editor in use for the main blog page (2 column grid):
    SECOND LINK IN PRIVATE CONTENT LIST

    Any idea why I cannot control the archive layout?
    ENFOLD 4.1.2

    #867683

    Hey fusion01,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #867689

    Thanks!

    #868486

    Hi,

    Thank you for the info. Did you modify any of the theme files? The following filter works on our chronological archive pages.

    add_filter('avf_blog_style','avf_blog_style_mod', 10, 2);
    function avf_blog_style_mod($layout, $context){
      $layout = 'blog-grid';
      return $layout;
    }

    Best regards,
    Ismael

    #868580

    HI, no theme files touched other than functions.php where I comment out all of the auto image creation (other than widget and square sizes). Still not working.

    I removed these:

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

    And added your snippet. No joy. Here is an example (link in private section below). You can clearly see it’s a default list.

    Note I have previously had no problem with this issue on another site I developed with Enfold, but that was about 2 years ago (older version of Enfold).

    #868582

    Ignore.

    #868609

    UPDATE: If I DISABLE THE advanced layout editor option under blog layout and use the ie. ‘grid’ layout instead then the categories show correctly (with grid)! With a sidebar!

    I have now just to change the default 3 column grid layout to 2 columns on the AUTO-GENERATED blog page – link below in private content. What php file do I edit?

    I don’t like this solution as much as the other as I’m not able to control the image thumbnail size that is generated by the theme / WP so I’ve reverted to the custom layout for now and trying to find a solution.

    #868648

    I solved the problem finally. By adding the code snippets to the ENFOLD installation:

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

    The code snippets in my child theme folder WERE IGNORED. WHY WAS THIS? It’s been a source of major frustration! And of course if I update the theme I will lose the custom mods.

    Also is there a way to define the same image thumbnail sizing for images on the archive pages? They are being generated very large and resized in the browser (inefficient) > custom image size as within blog component is obviously being ignored. A fix?

    #869097

    Hi,

    I’m not sure why it’s ignoring the child theme functions.php file. If you want to change the image size, you have to modify the archive.php and the tag.php file. Edit the avia_post_slider parameters, specifically the ‘preview_mode’ and ‘image_size’ parameters.

    // https://kriesi.at/support/topic/thumbnails-generated-as-squares-on-enfold-archive-pages/#post-719294

    Best regards,
    Ismael

    #869180

    ‘Not sure’ – reassuring! Thanks for the link, appreciated.

    Can one change the DEFAULT GRID layout from 3 to 2 columns somehow?

    #869921

    Hi,

    Yes, on the same files, look for the “columns” parameter.

    'columns' => 3,
    

    Best regards,
    Ismael

      #869988

      Hi I assure you this was carried out on both files before this post. Changing value from 3 to 2 yet it made no difference. Hence my query. That was with the default grid setting. I’ll try again bore are this stage have little faith. Doing the same thing yet again and expecting a different outcome makes no sense to me.

      #870365

      Hi,

      I checked the archive pages and they are already set to 2 columns. Is this fixed? You’re probably looking on a cached version of the page.

      Best regards,
      Ismael

      #870373

      Right at the beginning I changed that value of both files after viewing previous forum posts. The change of value made no difference. Three columns still remained. Caching? No plugins are activated that could cause this, I only activate after site development is complete. Last step. And yes forcing a reload is something I learnt to do in 2000 when I started web dev.

      • This reply was modified 7 years ago by fusion01.
      #871498

      Hi,

      I’m sorry but you’re confusing me a bit. Do you want to set the archive page to have 2 columns? It is already set to 2 columns as you can see in the following screenshot.

      // https://imgur.com/a/WDbLf

      Best regards,
      Ismael

      #871791

      Really beyond annoying. Point I have been reiterating what seems to be a 1000 times is it had no effect. Hence my opening of a post. It made no difference. I was stuck with 3 columns.

      Please close this thread. Thanks for an appalling attempt at attemping to solve my problems

      #871989

      Hi,

      I’m sorry for the confusion. Did you check the screenshot? It is already set to 2 columns, not 3.

      Best regards,
      Ismael

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