• Resolved korporaalmedia

    (@korporaalmedia)


    On a new website I import some post from the regular media. By all those posts is always the default category added, but I have set that this is only assigned to the category I want. Now always the default category is added. See attached images of the settings and layout.

    How can I fix this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support AndreeaR

    (@andreearadacina21)

    Hi there @korporaalmedia,

    Thank you for using Feedzy!

    Can you share more details about the environment you are using? Maybe there is a plugin that might interfere with Feedzy’s behavior.

    Unfortunately, I was not able to replicate this issue on my website.

    Best regards,

    Andreeea

    Thread Starter korporaalmedia

    (@korporaalmedia)

    Hello,

    This are the plugins that are installed on that website:

    Plugin Support AndreeaR

    (@andreearadacina21)

    Hey @korporaalmedia,

    Thank you for sharing!

    To remove the default category when a post is already assigned to a category, please use this code snippet in the wp-config.php file:

    //remove default category (uncategorized) when another category has been set
    function remove_default_category($ID, $post) {

    //get all categories for the post
    $categories = wp_get_object_terms($ID, 'category');

    //if there is more than one category set, check to see if one of them is the default
    if (count($categories) > 1) {
    foreach ($categories as $key => $category) {
    //if category is the default, then remove it
    if ($category->name == "Uncategorized") {
    wp_remove_object_terms($ID, 'uncategorized', 'category');
    }
    }
    }
    }
    //hook in to the publsh_post action to run when a post is published
    add_action('publish_post', 'remove_default_category', 10, 2);

    Another method is to install this site-specific plugin which contains the same code – https://gist.github.com/kevinlisota/75b3264f7b91e88540d8/archive/3e696ce05c6568de2dcbaa0599a06c19286a4033.zip.

    I hope this helps!

    Thread Starter korporaalmedia

    (@korporaalmedia)

    Hello AndreeaR,

    This code doesn’t work unfortunately. The added link is een zip file that only contains the code in a php document. I did look further to other options, but did’t found one that works well. What are other possibilities?

    Plugin Support AndreeaR

    (@andreearadacina21)

    Hey @korporaalmedia,

    Unfortunately, the issue is not replicable. Please try the troubleshooting steps outlined in this guide: https://docs.themeisle.com/article/1112-theme-doesnt-work-as-expected-troubleshooting-guide.

    Let us know if this helps!

    Best regards,

    Andreea

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.