-
AuthorPosts
-
August 8, 2017 at 8:07 am #835731
Using masonry, where can I add
'include_children' => false,
to exclude child categories?I went to the file path below and wasn’t able to find the same clues given in the URL below.
/enfold/config-templatebuilder/avia-shortcodes/masonry-entries.phphttps://kriesi.at/support/topic/anyway-solution-to-hide-portfolio-child-categories/
Thank you for your time.
August 9, 2017 at 1:15 pm #836361Hey Macroview_research,
Is it for portfolio masonry? 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,
VictoriaAugust 11, 2017 at 5:51 am #837294Hi Victoria, I send you my login contents a day ago. Did you receive them? You can access the masonry layout in question through the welcome page. Thank you for your assistance.
August 12, 2017 at 10:04 pm #838039Hi Macroview_research,
You could try to add it here http://imgur.com/a/z72YI
in the wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/av-helper-masonry.phpIf you need further assistance please let us know.
Best regards,
VictoriaAugust 13, 2017 at 9:00 am #838179Hi Victoria,
I added the ‘include_children’ => false comment plus a comma to separate the previous statement and the children themes are still displayed. Perhaps ‘include_children’ => false function has been changed to something else now or another area of the site needs to be modified? Thank you for your time.- This reply was modified 7 years, 3 months ago by Macroview_research.
August 15, 2017 at 6:16 am #839088Hi Victoria,
I added the ‘include_children’ => false comment plus a comma to separate the previous statement and the children themes are still displayed. Perhaps ‘include_children’ => false function has been changed to something else now or another area of the site needs to be modified? Thank you.August 15, 2017 at 1:18 pm #839267Hi Macroview_research,
Where are you seeing children? I think I checked your categories and they were all top level, without children. Is it for portfolio or regular masonry?
Best regards,
VictoriaAugust 15, 2017 at 3:49 pm #839362I’m sorry I meant I want to hide the categories, not the children specifically. It’s for masonry (articles with images and title format) Can you please tell me how to do that? Thank you for your time!
- This reply was modified 7 years, 3 months ago by Macroview_research.
August 18, 2017 at 7:11 am #840762Hi,
Are you referring to the category sort filter? Could you please provide a screenshot or a link to the page with the “categories” that you want to remove?
Best regards,
IsmaelSeptember 17, 2017 at 8:55 am #853013I am trying to remove the child categories – Is this possible in a child-theme? I would hate to need to add the “code from url below” and then need to change it everythime there is a theme update.
Can you suggest a solution where I add this to my functions.php file?
https://kriesi.at/support/topic/anyway-solution-to-hide-portfolio-child-categories/
September 19, 2017 at 6:50 am #853713Hi,
Please try this code in the functions.php file.
add_filter( 'avia_masonry_entries_query', 'avia_masonry_entries_query_mod', 10, 2); function avia_masonry_entries_query_mod( $query, $params ) { $query['$tax_query'] = array( 'taxonomy' => $params['taxonomy'], 'field' => 'id', 'terms' => $terms, 'include_children' => false, 'operator' => 'IN' ); return $query; }
Best regards,
IsmaelSeptember 19, 2017 at 11:18 am #853795Dear Ismael – Just tried it – And I couldn’t get it to work. Feel free to take a look. I will post admin login etc in the private section
September 20, 2017 at 7:05 am #854191Hi,
We adjusted the filter but it’s not working on your installation. It does work on ours. The filter creates an array of post ids from the child categories and exclude it from the query. I think it’s not working because of the archive page redirection.
Best regards,
IsmaelSeptember 20, 2017 at 7:12 am #854198Hi Ismael
Would it help if I installed a plugin to remove archive pages? I don’t use them so I could easily do this.
September 21, 2017 at 10:09 am #854683Hey!
I’m not sure if that’s possible but you can try. Do you mind providing the FTP details? We would like to test it further. It would be better if you create your own thread.
Best regards,
IsmaelSeptember 21, 2017 at 11:16 am #854733Hi Ismael
I have created a new thread here: https://kriesi.at/support/topic/exclude-child-categories-in-masonry-child-theme/
September 21, 2017 at 1:23 pm #854831 -
AuthorPosts
- The topic ‘Exclude child categories from Masonary layout’ is closed to new replies.