• Resolved Guillermo Valls

    (@guillermovalls)


    I would like delete Genre(s).
    Is it possible without edit the archives plugin?
    I think that is very interesting add a option in the panel…

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi Guillermo,

    Genres is a fixed set, limited to https://support.google.com/news/publisher/answer/93992 … Why do you want to change or delete those?

    Maybe to prevent other authors from using certain genres?

    Might indeed be interesting to allow editing of the taxonomy terms for such cases but the problem is that it also allows for (other) admins to mess things up very easily. I’ll need to think about this…

    In the mean time, you could do this:
    Go to the Plugins > Editor and select plugin to edit: “XML Sitemap & Google News feeds” and hit Select. Then click on the Plugin File “xml-sitemap-feed/includes/class-xmlsitemapfeed.php”. Scroll down to the end of the file and find the function register_gn_taxonomies(), it’s the third from last.

    Inside that function, at the end, you can find the part:

    
    'capabilities' => array( // prevent creation / deletion
    		'manage_terms' => 'nobody',
    		'edit_terms' => 'nobody',
    		'delete_terms' => 'nobody',
    		'assign_terms' => 'edit_posts'
    	)
    

    Now replace every ‘nobody’ there (3 times) with ‘manage_options’ and hit Update File.

    All admins are now (until the next plugin update) allowed to delete, add or change the Genre taxonomy terms. Modified or deleted terms should remain so after the next update, unless there is a forced reset of the terms.

    I’ll consider leaving them editable to admins in the next release but cannot promise anything…

    Thread Starter Guillermo Valls

    (@guillermovalls)

    Thanks for your quick response.
    I work in a digital newspaper and im selecting the genre as a blog when It really isnt a blog or any of the other genres. I would like to leave it empty blank.
    You should have that option in the list of genres. Just a tip.

    Thanks by support and congrats. You made the best plugin of sitemaps for WordPress. ??

    By selecting no Genre when posting, the genre field will remain blank. Make sure you have NO default genre set on Settings > Reading under the Google News settings.

    Thread Starter Guillermo Valls

    (@guillermovalls)

    Perfect!!!
    Thanks @ravanh

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Delete Genre(s)’ is closed to new replies.