Multiple categories now appears
-
Hi!
After installing wicked folders (which is very much needed!) duplicate categories appeared in this filtering post grid from WPbakery. I got in touch with the theme devs, but they told me to ask you instead.
How can I prevent duplicates from happening?
Sceenshot: https://ibb.co/WWkYSkc
The page isn’t live yet.Thank in advance!
-
Hi @faisyah,
Sorry to hear you’re having trouble. Can you please clarify a bit more what you mean? Which are the duplicate categories you’re referring to? If you deactivate Wicked Folders does the problem go away?
Hello!
This is what is looks like with Wicked Folders deactivated: https://ibb.co/LN4WqT7
Here it is activated: https://ibb.co/WWkYSkc
I had the same folder names as the categories the posts belonged to, but changing the folder name didn’t help either, as you see here: https://ibb.co/VWpT4sgIs there a way to prevent the folder name to appear with the categories?
Thank you again!
Thanks for the additional info @faisyah, that is really helpful.
Can you tell me how you created the black bar with the categories in it?
I’m using WPbakery’s backend editor.
This is what it look like: https://ibb.co/wdx0Qnn
They’re added automatically when I select which categories to show.What version of WPBakery Page Builder are you using? I have it installed as well but it looks totally different for me and I’m not seeing the same options as in your screenshot.
WPBakery Page Builder (Visual Composer) Clipboard – Versjon 4.5.5.1 – By bitorbit
It might have been customized for the theme I’m using, it was included.
Would it be possible for you to go to Tools > Site Health > Info, click the ‘Copy site info to clipboard’ and post it here?
Additionally, is there any chance you could zip up the theme and send me a link to download it? You could email me the link via our contact page.
Would it be possible for you to go to Tools > Site Health > Info, click ‘Copy site info to clipboard’ and paste the info here?
Additionally, is there any chance you could zip up the theme and email me a link to download it? You could email the link via our contact form.
If you’d like, I could give you the admin login!
Would that be better?Sure, we can try that first. Want to send it to me via the contact form? You can encrypt the info and generate a one-time link to it using onetimesecret.com.
Sent you info over the contact form. 🙂
Problem solved, excellent support! ♥
Thanks @faisyah for all the info to help troubleshoot the problem.
For others reading this, the issue was that the Uncode theme displays terms from all taxonomies associated with a given post type when using the “Posts” element with the filter bar turned on. Since folders are stored as terms, those were getting displayed in the filter bar also.
The Uncode theme uses the
get_termsWordPress function to fetch the terms displayed in the filter bar. The solution we came up with was to add the following filter to the functions.php file to remove the folder terms on the front-end:add_filter( 'get_terms', 'custom_get_terms', 4, 10 ); function custom_get_terms( $terms, $taxonomies, $args, $term_query ) { // Remove folder terms on front-end to prevent folders from displaying in // filter bars if ( ! is_admin() ) { // Array indexes are zero-based so subtract one from count $n = count( $terms ) - 1; // Loop backwards so that removing terms doesn't throw off the index for ( $i = $n; $i > -1; $i-- ) { // Check if term belongs to a folder taxonomy if ( preg_match( '/^wf_(.*)_folders$/', $terms[ $i ]->taxonomy ) ) { unset( $terms[ $i ] ); } } } return $terms; }
The topic ‘Multiple categories now appears’ is closed to new replies.