-
AuthorPosts
-
October 23, 2017 at 2:47 pm #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 LISTI have the custom avia layout editor in use for the main blog page (2 column grid):
SECOND LINK IN PRIVATE CONTENT LISTAny idea why I cannot control the archive layout?
ENFOLD 4.1.2October 23, 2017 at 4:26 pm #867683Hey 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,
VictoriaOctober 23, 2017 at 4:36 pm #867689Thanks!
October 25, 2017 at 2:30 am #868486Hi,
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,
IsmaelOctober 25, 2017 at 8:06 am #868580HI, 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).
October 25, 2017 at 8:08 am #868582Ignore.
October 25, 2017 at 9:10 am #868609UPDATE: 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.
October 25, 2017 at 10:56 am #868648I 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?
October 26, 2017 at 7:35 am #869097Hi,
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,
IsmaelOctober 26, 2017 at 12:47 pm #869180‘Not sure’ – reassuring! Thanks for the link, appreciated.
Can one change the DEFAULT GRID layout from 3 to 2 columns somehow?
October 28, 2017 at 3:44 pm #869921Hi,
Yes, on the same files, look for the “columns” parameter.
'columns' => 3,
Best regards,
IsmaelOctober 28, 2017 at 6:34 pm #869988Hi 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.
October 30, 2017 at 7:06 am #870365Hi,
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,
IsmaelOctober 30, 2017 at 7:38 am #870373Right 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, 1 month ago by fusion01.
November 2, 2017 at 3:46 am #871498Hi,
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.
Best regards,
IsmaelNovember 2, 2017 at 6:16 pm #871791Really 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
November 3, 2017 at 5:40 am #871989 -
AuthorPosts
- You must be logged in to reply to this topic.