Tagged: , ,

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

    https://kriesi.at/support/topic/anyway-solution-to-hide-portfolio-child-categories/

    Thank you for your time.

    #836361

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

    #837294

    Hi 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.

    #838039

    Hi 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.php

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #838179

    Hi 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.

    #839088

    Hi 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.

    #839267

    Hi 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,
    Victoria

    #839362

    I’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!

    #840762

    Hi,

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

    #853013

    I 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/

    #853713

    Hi,

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

    #853795

    Dear 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

    #854191

    Hi,

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

    #854198

    Hi Ismael

    Would it help if I installed a plugin to remove archive pages? I don’t use them so I could easily do this.

    #854683

    Hey!

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

    #854733
    #854831

    Hi,

    Thank you. We’ll close this one for now.

    Best regards,
    Ismael

Viewing 17 posts - 1 through 17 (of 17 total)
  • The topic ‘Exclude child categories from Masonary layout’ is closed to new replies.