Tagged: Portfolio
-
AuthorPosts
-
December 2, 2020 at 7:45 pm #1264564
Hi,
I am trying exclude a category in masonry portfolio but i don’t know how i can do it.
Could you help me, please?
Thanks.December 3, 2020 at 8:04 pm #1264847Hey Lidia,
Please have a look at the following thread:
https://kriesi.at/support/topic/exclude-category-or-tag-from-masonry-pullavoid-duplicate-posts-on-frontpage/#post-351738If you need further assistance please let us know.
Best regards,
VictoriaDecember 3, 2020 at 8:08 pm #1264850Hi Victoria
Yes i saw it, but i only want to exclude in a block. Not in all portfolios.
I want exclude it only in homepage.
Could you tell me how i have to add the code in funtions.php?
Thanks.December 6, 2020 at 6:13 pm #1265292Hi aquihaydominios,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Which category do you need to exclude?
Best regards,
VictoriaDecember 7, 2020 at 10:42 am #1265435This reply has been marked as private.December 7, 2020 at 7:42 pm #1265573Hi aquihaydominios,
Which category do you need to exclude?
Best regards,
VictoriaDecember 7, 2020 at 7:43 pm #1265574Hi,
I want exclude category “Reservado” but only in home page. In antother pages, i want to see that category.
ThanksDecember 7, 2020 at 9:16 pm #1265613Hi aquihaydominios,
The website did not load on my end. Please check the link.
Best regards,
VictoriaDecember 7, 2020 at 9:50 pm #1265618I don’t understand… the web is working…
December 7, 2020 at 10:18 pm #1265624Hi aquihaydominios,
Maybe you have a plugin or the hosting provider is blocking requests from certain locations. I am from Ukraine :)
Best regards,
VictoriaDecember 9, 2020 at 7:33 pm #1266070Yes, it is… Could you tell me your ip, please?
December 14, 2020 at 3:21 am #1266980Hi,
The Appearance > Editor panel is not accessible, so we were not able to edit the functions.php file. Please try to replace the snippet with the following code.
function avia_masonry_custom_query( $query ) { if(is_page(38)) { $exclude_cat = array('category__not_in' => '38'); $query = array_merge((array)$exclude_cat, (array)$query); } return $query; } add_filter('avia_masonry_entries_query', 'avia_masonry_custom_query');
Or enable the file editor by setting the DISALLOW_FILE_EDIT to true so that we could adjust the snippet.
// https://wordpress.org/support/article/hardening-wordpress/#disable-file-editing
Best regards,
IsmaelDecember 18, 2020 at 12:43 pm #1268393This reply has been marked as private.December 21, 2020 at 6:37 am #1268963Hi,
Thank you for the info.
We adjusted the filter in the functions.php file a bit to remove the items that belong to the Reservados category.
function avia_masonry_custom_query( $query ) { if(is_page(38)) { $query['tax_query'][] = array( 'taxonomy' => 'portfolio_entries', 'field' => 'id', 'terms' => 38, 'operator' => 'NOT IN' ); } return $query; } add_filter('avia_masonry_entries_query', 'avia_masonry_custom_query');
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.