• Resolved Farris

    (@faisyah)


    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!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author wickedplugins

    (@wickedplugins)

    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?

    Thread Starter Farris

    (@faisyah)

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

    Is there a way to prevent the folder name to appear with the categories?

    Thank you again!

    • This reply was modified 6 years, 4 months ago by Farris.
    • This reply was modified 6 years, 4 months ago by Farris.
    Plugin Author wickedplugins

    (@wickedplugins)

    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?

    Thread Starter Farris

    (@faisyah)

    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.

    Plugin Author wickedplugins

    (@wickedplugins)

    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.

    Thread Starter Farris

    (@faisyah)

    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.

    Plugin Author wickedplugins

    (@wickedplugins)

    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.

    Plugin Author wickedplugins

    (@wickedplugins)

    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.

    Thread Starter Farris

    (@faisyah)

    If you’d like, I could give you the admin login!
    Would that be better?

    Plugin Author wickedplugins

    (@wickedplugins)

    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.

    Thread Starter Farris

    (@faisyah)

    Sent you info over the contact form. 🙂

    Thread Starter Farris

    (@faisyah)

    Problem solved, excellent support! ♥

    Plugin Author wickedplugins

    (@wickedplugins)

    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_terms WordPress 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;
    }
Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Multiple categories now appears’ is closed to new replies.