GithubHelp home page GithubHelp logo

helgatheviking / radio-buttons-for-taxonomies Goto Github PK

View Code? Open in Web Editor NEW
55.0 8.0 29.0 1.21 MB

Turn any WordPress taxonomy into a list of radio buttons, which forces users to select only 1 term!

JavaScript 34.95% PHP 65.05%
radio-taxonomies wordpress-taxonomy custom-metabox hacktoberfest

radio-buttons-for-taxonomies's Introduction

Radio Buttons for Taxonomies

Contributors: helgatheviking
Donate link: https://www.paypal.me/kathyisawesome
Tags: taxonomy, admin, interface, ui, post, radio, terms, metabox
Requires at least: 4.5.0
Tested up to: 6.1.0
Stable tag: 2.4.7
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Description

Replace the default taxonomy boxes with a custom metabox that uses radio buttons... effectively limiting each post to a single term in that taxonomy.

A plugin options page allows the user can select which taxonomies she'd like to switch to using the custom radio-button style metabox.

Originally based on the the class by Stephen Harris

Support

Support is handled in the WordPress forums. Please note that support is limited and does not cover any custom implementation of the plugin. Before posting a question, read the FAQ and confirm that the problem still exists with a default theme and with all other plugins disabled.

Please report any bugs, errors, warnings, code problems to Github

Installation

  1. Upload the plugin folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Go to Settings > Radio Buttons for Taxonomies and use the checkboxes to indicate which taxonomies you'd like to use radio buttons

Screenshots

  1. The settings page where you determine which taxonomies will get radio buttons.
  2. This is what the metabox will look like on the post editor screen.

Frequently Asked Questions

Why do the metaboxes have a "No {$taxonomy}" ( ex: No Genre ) radio button!?

This was a feature added in version 1.4, but due to some faulty logic on my part probably wasn't showing it everywhere that I intended.

It has come to my attention that not everybody likes this feature, so I have enabled an easy way to disable it for taxonomies that you wish to make mandatory. Simply add the following to your theme's functions.php or your site's custom functions plugin.

add_filter( "radio_buttons_for_taxonomies_no_term_{$taxonomy}", "__return_FALSE" );

So for example, to disabled the "No term" option on a taxonomy called "genre" you'd do the following:

add_filter( 'radio_buttons_for_taxonomies_no_term_genre', '__return_FALSE' );

Changelog

2023.03.18 - Version 2.4.7

  • Manual update to ensure SVN version is the same as GitHub version.

2023.02.15 - Version 2.4.6

  • Fix: Typo from 2.4.5 patch. Closes #111.

2023.02.13 - Version 2.4.5

  • Fix: Reload non-hierarchical terms as forced-hierarchical after quick edit save. Closes #109.

2022.06.28 - Version 2.4.4

  • Fix: Bulk edit removes terms (set to default) when not editing the term. Closes #105.

2022.06.15 - Version 2.4.3

  • Fix: Fatal error when deleting plugin. uninstall callback must be static. Closes #104.

2022.01.06 - Version 2.4.2

  • Fix: Conflict with default term, multiple checked terms (term plus default term). Closes #103.

2021.12.27 - Version 2.4.1

  • Fix: Fatal error from compatibility module includes.

2021.12.27 - Version 2.4.0

  • Update: Drop support for WordPress < 4.4
  • New: Compatibility with WP SEO's primary term (disable for Radio terms)
  • New: Save default term if it exists and no term is selected.
  • Fix: Default term is checked by default.
  • Fix: "No term" is not displayed when taxonomy has a default term option.
  • Fix: Missing translations in block editor. Props @ocean90.

2.3.1

  • Fix: Optimize compatibility for Tabify Edit Screen. Props @remcokalf.

Removed 'tabify_add_meta_boxes' action, as it is doubled by do_action( 'add_meta_boxes')in settings-posttype.php of Tabify Edit Screen.

2.3.0

  • New: Optimize to load taxonomy class hooks/callbacks only on radio-enabled taxonomies. Props @remcokalf.
  • New: Compatibility for Tabify Edit Screen

2.2.3

  • Fix: Add term for non-hierarchical custom taxonomy in custom post type

2.2.2

  • Fix: Add term for custom taxonomy in custom post type
  • Fix: remove jQuery 3 deprecated handlers
  • Fix: Don't load the metabox script in the block editor

2.2.1

  • Fix: Define schema for new REST field added in 2.2.0

2.2.0

  • New: Conditionally show a "no term" radio button in Gutenberg sidebar. props @tomjn!

2.1.1

  • Fix: Missing NONCE preventing bulk/quick edit from saving correctly.
  • Fix: Use in Gutenberg sidebar instead of

2.1.0

  • Fix: Refactor sidebar script to remove unneeded higher order components. Props @torounit!
  • Fix: Add core class to radio buttons in sidebar. Props @torounit!

2.0.8

  • Fix: Missing index.asset.php file.

2.0.7

  • Fix: "No {$term}" not translatable.

2.0.6

  • Fix: Vulnerable nonce in save routine.

2.0.5

  • Fix: Admin settings- Get all taxonomies with show_ui=true.

2.0.4

  • Fix: Settings link on plugin page.

2.0.3

  • Fix: Stop breaking quick edit on Taxonomy pages.

2.0.2

2.0.1

  • Fix: Fatal error use_block_editor_for_post_type() undefined in WP 4.x

2.0.0

  • Gutenberg compatibility! Props @5ally and @leymannx

1.8.3

  • Escape all the inputs. Props @tomjn and @rtCamp

1.8.2

  • Friendlier error messages

1.8.1

  • Fix: fatal error for undefined boolval in PHP < 5.5

1.8.0

  • Compatibility with WordPress 4.9.2
  • Update donation link
  • Add radio_buttons_for_taxonomies_no_term_selected_text filter to allow for custom "No Genre" texts. props @hokoo
  • Convert switch_terms_filter() to get and setter
  • Rename radio-buttons-for-taxonomies-no-term-$taxonomy filter to radio_buttons_for_taxonomies_no_term_$taxonomy to disable the "No term" feature

1.7.8

  • Compatibility with WordPress 4.8.3
  • Update donation link

1.7.7

  • Compatibility with WordPress 4.4

1.7.6

  • Validate options against get_all_taxonomies() which allows for private taxonomies to be saved in options if they've been added via filter

1.7.5

  • Add Dutch translation. props @maarten00
  • Add Persian translation. props @Ghaem

1.7.4

  • Add German translation. props @carstingaxion

1.7.3

  • Use "singular" label for metabox. props @lchski

1.7.2

  • Fixes popular terms

1.7.1

  • add minified script to svn repo

1.7.0

  • Add support for bulk-edit
  • more quick edit fixes
  • save tax terms for attachments
  • switch ajax callback for adding non-hierarchical terms
  • use default JS scripts on post.php page
  • remove filtering of columns via manage_{$post_type}_posts_custom_column, etc
  • switch all taxonomies to "hierarchical" on edit.php so quick edit is automatically switched to radio buttons

1.6.1

  • Bug-fix for quick-edit

1.6

  • Use later priority (99) to launch the WordPress_Radio_Taxonomy class instances, resolves bug with custom taxonomies
  • Switch to class instance initialization instead of global
  • filtering "manage_taxonomies_for_{$post_type}_columns" doesn't do anything to quickedit, so removed
  • removed disable_ui() method in favor of adding to manage_{$post_type}_posts_custom_column hook ** this lets us keep the taxonomy columns in their original places, versus adding to end ** currently no way to remove quick edit without disabling UI in global $wp_taxonomies variable
  • better docbloc

1.5.6

  • fix PHP notice in class.WordPress_Radio_Taxonomy.php

1.5.5

  • verify WP 3.8 compatibility

1.5.4

  • Fix PHP warnings in class.Walker_Category_Radio.php

1.5.3

  • Fix error on edit screen if taxonomy is deleted

1.5.2

  • Fix untranslatable string
  • Add Arabic translation thanks to @hassanhamm

1.5.1

  • Load admin scripts only where needed, fixes conflict on edit-terms screens

1.5

  • Move launch of WordPress_Radio_Taxonomy class to init hook
  • Move no-term filter inside get_terms() method which should make the proposed FAQ solution for disabling the "No term" work now

1.4.5

  • Enabled "No {$taxonomy}" in quick edit
  • Changed column headers to use the singular taxonomy label
  • Respect the show_admin_column argument when registering taxonomy
  • Automatically unset default taxonomy column (if conventionally named) to prevent duplicate columns

1.4.4

  • Change generic "No term" to "No {$taxonomy}", ex: "No Genre"

1.4.3

  • Fix PHP warning in metabox related to "No term"
  • Fix conditional logic for "No term" option
  • Added filter to disabled "No term"
  • Fixed "Add new" term WPLists markup

1.4.2

  • Fix fatal error on settings update

1.4.1

  • Fix "No term" option showing in non-radio taxonomies

1.4

  • Add "No term" option to taxonomy metaboxes

1.3

  • fix problem with adding new terms, #7

1.2.5

  • fix markdown for changelog

1.2.4

  • return changelog to readme.txt

1.2.3

  • fix PHP notice #5
  • fix popular/all clicking for WP 3.5.1
  • move changelog to own file

1.2.2

  • Still fixing SVN

1.2.1

  • Hopeful fix of SVN failure to include class.Walker_Category_Radio.php in v1.2 - SVN Is not my strong suit. Sorry for any inconvenience!

1.2

  • change donation URL
  • fixed save bug for users without the manage_categories

1.1.4

  • Correct plugin URL
  • fixed quick edit bug
  • fixed undefined $post variable warning

1.1.3

  • Code cleanup

1.1.2

  • Removed unneeded localize_script object
  • Fix fatal error on multisite ( caused by using an anonymous function when not supported until PHP 5.3)
  • Fixed quick edit refresh ( second click on quick edit for same item and the value still reflected the original)

1.1.1

  • Fix notice in popular terms tab
  • Attempted fix fatal error on multisite

1.1

  • Added columns to edit screen for every radio taxonomy
  • Add quick edit for all radio taxonomies
  • Enforce limit of single terms via save_post
  • fixed error with taxonomy object property not being loaded on the right hook
  • fixed uninstall hook
  • fixed saving of 'delete' option

1.0.3

  • updated donate link

1.0.2

  • fixed incorrect plugin settings link
  • fixed variable scope in javascript that was preventing plugin from working on multiple metaboxes

1.0.1

  • bug fix for when no taxonomies are selected

1.0

  • Initial release.

radio-buttons-for-taxonomies's People

Contributors

akiletour avatar banago avatar carstingaxion avatar glueckpress avatar helgatheviking avatar hokoo avatar jbjanot avatar lchski avatar leymannx avatar ocean90 avatar remcokalf avatar senicar avatar stephenh1988 avatar tomjn avatar torounit avatar toscho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

radio-buttons-for-taxonomies's Issues

Quick editing removes all terms for radio button taxonomies

When opening Quick Edit, no values are selected. Regardless of your subsequent selection, if you save the post in Quick Edit all terms for the radio button taxonomy are removed from the post. Tested on 1.6.1 and dev on WP 3.8.3. I am using custom hierarchical taxonomies for this test. I will try to debug later. Does the plugin offer support for Quick Edit?

[Feature] Checkbox VS Radio per content type

Hi Kathy,

I'm running trough this issue ATM,

Per client requirement, they'll like to have the widget for an specific taxonomy coming out with radio buttons for single selection in content type A, and, at the same time also have it with checkboxes (as default) for multiple selection in content type B.

I'm looking at the plugin code investigating how to make that possible, if successful with my customization would you be interested in a PR to push it to WP.org as a new feature?

Also I'd like to ask in advance if you have went trough this kind of requirement before, how do you see the feasibility of it and/or some tips where to drive my attention trough your code?

Thanks!

[dev] Can't change selected options when updating post

I checked out the dev branch for WP5 compatibility and radios appear nicely for the chosen taxonomies.

Odd thing I noticed is, that I can't update the selected options after I saved the post. When I now edit a post, select different terms, and click save post, it jumps back to the old terms.

I'd expect the select option doesn't jump back and instead the newly selected terms get saved.

Bulk edit

Taxonomies don't update when bulk editing. Select two or more posts, edit them, change taxonomies, and save. The posts keep the previous taxonomy.

Warning on removal of taxonomy checked in settings

Warning: Creating default object from empty value in [...]radio-buttons-for-taxonomies\inc\class.WordPress_Radio_Taxonomy.php on line 361

While developing a site, I decided to go another direction with taxonomies and meta boxes.

In this case I had registered the taxonomy,checked the 'Select Taxonomies' box under Settings > RBfT. The error ocurred when I deleted the function to register the taxonomy. It displayed on the edit.php for the CPT the taxonomy was registered to.

Lemme know if you need more info.

My fix was to re-add the tax, uncheck the setting, delete the tax.
~D

Breaks quickedit

When attempting to quick edit any taxonomy, whether it’s to be targeted or not by the plugin, the TR that contains the term disappears and editable field areas never appear on screen. The only way I can edit a term is by deactivating the plugin.

Reported at .org

Not update on multisite Wordpress

Hi,
thank's for your plugin is really nice,
but i need to change wordpress to a multisite installation,

and now the site1 work, but all the other doesn't save the modification.
if i deactivate your plugin i can update with the plugin activated don't.

thank for your help.
In the meantime a wish you a beautiful day.
Best Regards
Daniel

Undefined variable

Notice: Undefined variable: post in \wp-content\plugins\radio-buttons-for-taxonomies\inc\class.Walker_Category_Radio.php on line 38

Trying to get property of non-object

Hey Kathy,

I'm seeing this message only on new posts. Once a post has been saved, the message doesn't appear when editing it later. Everything seems to be working just fine despite the message, but didn't know if it could lead to any problems that I haven't seen yet.

Notice: Trying to get property of non-object in /var/www/wp-content/plugins/radio-buttons-for-taxonomies/inc/class.Walker_Category_Radio.php on line 47

[dev] Fix odd click behavior

I checked out the dev branch for WP5 compatibility and radios appear nicely for the chosen taxonomies.

But odd is, when clicking the radios for the first time, I need to click them twice to actually select them. This only happens when clicking them the first time after document ready.

I'd expect the radios get selected just at the first click.

require one to be selected

not really an issue, but the point of radio buttons is that one MUST be selected.
It would be nice if the user could not press publish, or draft unless one is selected.
Otherwise nice

Don't use the default category

Hello,

I was faced with a problem. A client of mine is used to forget to click on the appropriate category button, and the the result is coming to be "No Category", instead of being associated with the default category as usual with native category system.

Option page - list more taxonomies by default

Hi,

I've got a few custom taxonomies set with public = false and show_ui = true which aren't displayed on the option page.

This is due to the fact that the query targets taxonomies with both public = true and show_ui = true.

Shouldn't the plugin only target taxonomies with show_ui = true and omit the public attribute as show_ui is the only relevant setting in this case if I'm not mistaken?

I'm aware I can load a custom set of taxonomies using the radio_buttons_for_taxonomies_taxonomies filter but I thought it could be a better default for the plugin.

Thanks for your help :-)

Inconsistent bulk saving when multiple taxonomies active

Hi Helga,

I love the plugin, and thank you for the hard work.

The following is with the latest (as of April 1st) dev branch.

I've noticed a bug in my usage of RBfT. I have two non-hierarchal custom taxonomies (say, genre and author) active on a custom post type. They both have admin columns set to true. If I bulk edit and set a value of "Science Fiction" for genre, the first displayed taxonomy, it saves correctly, setting the genre of all selected items to "Science Fiction". However, it sets the value of author to "science-fiction", the slug of the genre value.

Any changes made to the author taxonomy are ignored, even if I set the genre at the same time.

These aren't the actual terms and taxonomies I'm using, btw, just in case that's a weird edge case thing.

[Feature Request] Make 'em required

Dear Kathy,

I'm wondering if the following feature would be a desirable thing to have and if you think this would be difficult to implement:

  • This plugin offers another option per taxonomy to make this taxonomy required (as in you can't save the post if no term has been chosen)

Limit API response to only a single term

Is this possible? Is this needed? In gutenberg, you do get a little funky if you apply RB4T for a taxonomy, but a post had multiple terms for that taxonomy. Specifically, you can't trigger a change() event by clicking between the terms and so you can't update the post.

Fatal error on version 2.0.0 + Wordpress 4.9

Since the latest update (version 2.0.0) we are receiving this fatal error:

PHP Fatal error: Uncaught Error: Call to undefined function use_block_editor_for_post_type() in /var/www/html/wp-content/plugins/radio-buttons-for-taxonomies/inc/class.WordPress_Radio_Taxonomy.php:82
Stack trace:
#0 /var/www/html/wp-includes/class-wp-hook.php(286): WordPress_Radio_Taxonomy->remove_meta_box('')
#1 /var/www/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#2 /var/www/html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 /var/www/html/wp-admin/includes/menu.php(149): do_action('admin_menu', '')
#4 /var/www/html/wp-admin/menu.php(294): require_once('/var/www/html/...')
#5 /var/www/html/wp-admin/admin.php(140): require('/var/www/html/...')
#6 /var/www/html/wp-admin/post.php(12): require_once('/var/www/html/...')
#7 {main}
thrown in /var/www/html/wp-content/plugins/radio-buttons-for-taxonomies/inc/class.WordPress_Radio_Taxonomy.php on...'

We had to disable the plugin to reactivate the site.

Our Server stack:

  • Apache 2.4.38
  • PHP 7.3.4
  • Wordpress 4.9

Problem with Quick Edit

Hi,

Thanks for your plugin, it's really nice. However, I have an issue with Quick Edit for posts. I'm using the plugin to enforce one category for every article, and it all works fine when creating and editing. But when I click Quick Edit, the current category is not selected and therefore reverts to the default category every time I save (unless I pick a category).

Bulk

When I select multiple posts from the back-end and assign them to the custom taxonomy term I created it doesn't work, I need to disable the plugin in order to add a term to multiple posts then re-enable completed completed.

Cannot Reset Taxonomy to No Taxonomy

Hi! I’m using this plugin but hit a snag today. An author added a “feature” (that’s the tax we’re are using) but shouldn’t have. There’s no way to go back to have nothing selected (ie Reset) with this plugin that I can see. That would be useful as the tax is question is optional and sometimes posts have it, sometimes they don’t. Thanks!

[dev] All terms get saved instead of just selected terms

I checked out the dev branch for WP5 compatibility and radios appear nicely for the chosen taxonomies.

Unfortunately the term saving doesn't seem to work properly. After I selected a term, saved the post and watched it in the frontend, all terms appear.

I'd expect only the chosen term to be applied.

That's what I selected

Screenshot 2019-04-10 10 56 20

That's what has been saved

Screenshot 2019-04-10 10 56 35

Add new as child

if I add a new category and select a parent for it in the sidebar, it isn't added to the parent but as "main" category

Not compatible with Ubermenu

Once Ubermenu was installed, nav role for menus stopped working...no role options in the menu detail pull down. Just an FYI.

Private Taxonomies

On the "Taxonomies to Convert" page, can you also add "private" taxonomies? I currently have a taxonomy that I use for mostly display purposes on the front end but the user should still be restricted to only check 1 of the terms.

Dutch translation doesn't work

When having Wordpress set to Dutch, the translation doesn't load correctly. There seem to be two problems

  1. The provided .mo file is empty
  2. The locale has the incorrect name nl. This should be nl_NL

Admin Column: Redundant and Displays regardless of 'show_admin_column'

Hi Kathy,
The Admin for my CPT is now displaying two columns for the taxonomy I'm using RBfT for.
The first is defined by the CPT, the second by RBfT.

Only the RBfT column shows in quick-edit. <- Yay!

I also found that setting 'show_admin_column' => true, to false hides the CPT column, but not the RBfT column.

Broken settings link on plugin page (PR incoming)

$plugin_link = '<a href="' . admin_url( 'options-general.php?page=radio-buttons-for-taxonomies' ) . '">' . esc_html_e( 'Settings', 'radio-buttons-for-taxonomies' ) . '</a>';

esc_html_e() echoes the link which causes the string Settings to be printed somewhere above the plugin list table. To avoid this, the string should be returned. Incoming PR uses esc_html__() instead.

Missing labels on settings page

The labels for the checkboxes should be clickable. There should probably more space between the labels to make them more touchpad friendly.

Add composer file

Would allow using this more as a library and including within other projects

request: confine plugin to admin area

This plugin is great, thank you! I noticed it was running a query on the front end of themes. Is this necessary? Can you add a conditional statement (is_admin) to keep all queries in the admin area?

Remove "No %s" option.

There are taxonomies I want to have an option selected by default as categories do with the uncategorized option.

Is it possible to remove this "No term" options and auto-select a default taxonomy? or any one of the registered instead of assigning a zero value?

Thanks.

Rewrite?

Instead of launching a new WordPress_Radio_Taxonomy for each taxonomy (which adds a bunch of repetitive hooks), merge into a single file and use conditional logic on the hooks to test if the taxonomy is one of the RB4T-enabled taxonomies.

Add New forms in taxonomy meta boxes don't work

I just installed this plugin on WordPress 3.5.1 and configured it to apply to two custom taxonomies associated with a single custom post type. When I'm editing or creating a post and click the Add New [ Taxonomy Name] button in one of the meta boxes, the form for adding a new term is displayed but it won't let me submit the form. There are no error messages when I submit the form and there are no JavaScript errors showing up in the console in Firebug, either.

I disabled the feature on one of the taxonomies and the Add New form started working again whereas it continued to fail on the taxonomy that is set to display radio buttons.

Archive widget cannot be blocked from pages

When I try to block the archives widget from pages (dropdown) I get it in list form plus I get the search widget, which I have already blocked separately.

When I unblock the search widget, the archives are blocked as supposed.

Thanks Kathy. Great plugin. Rick

Cannot Add New Term via Taxonomy Box

An unidentified error has occurred.
Received this error inside the taxonomy box when attempting to add a new term while creating a post (CPT).
image

headers already sent adding new taxonomy

Just ran into a snag adding a new taxonomy after installing the plugin. After a page refresh the taxonomy term was in fact there.
WP 3.5.2

`Notice: Trying to get property of non-object in /--/-/htdocs/wordpress/wp-content/plugins/Radio-Buttons-for-Taxonomies-master/inc/class.WordPress_Radio_Taxonomy.php on line 294

Warning: Cannot modify header information - headers already sent by (output started at /-/-/htdocs/wordpress/wp-content/plugins/Radio-Buttons-for-Taxonomies-master/inc/class.WordPress_Radio_Taxonomy.php:294) in /-/-/htdocs/wordpress/wp-includes/class-wp-ajax-response.php on line 129`

Make this a class for developers?

So not an issue as such but any chance in making a class version of this that developers can include in their plugins? i.e making radio button taxonomies using code rather than having a UI for it.

Would be great for people that do client work where plugins aren't always appropriate.

Taxonomy values not appearing in dropdown menu for filtering items in Media Library

For one of my custom post types, I have a simple taxonomy (single-valued) to indicate the type of image (photograph, illustration, etc.). The radio buttons work great when adding images to the library.

However, when editing a custom post and adding an image, the select window (which has dropdown menus to filter by image type and other criteria) has a problem with the dropdown menu for image type. The taxonomy values don't appear so the user cannot filter using them.

I don't know where/how this dropdown menu gets populated.. But it works fine without the Radio Buttons plugin; it's only when I enable this plugin that the choices disappear from the dropdown menu.

screen shot 2014-11-07 at 4 06 14 pm

Doens´t work on multisite

Hi Kathy,
great plugin you did, but i have one question.
When i uncomment these lines of my code it works on multisite´s.

// prevent weirdness with multisite
       if( function_exists( 'ms_is_switched' ) && ms_is_switched() )
       return $post_id;

Can you explain these lines? is it necessary?

Error when removing radio buttons

(I have debugging on.) I tried to turn off radio buttons for a custom taxonomy, but now the following error message appears on the custom taxonomy metabox.

Warning: call_user_func() expects parameter 1 to be a valid callback, function 'show in navigation' not found or invalid function name in /home/.../wp-admin/includes/template.php on line 1306

I have not altered the cited template.

I then checked the "Completely remove options on plugin removal", but that did not work. I then tried deactivating the plug-in. I finally removed the plugin, but that did not remove the error. I can no longer see my taxonomy choices, unless I go back to radio buttons, which I no longer want.

[dev] Hide "Select primary category" when radios for category chosen

I checked out the dev branch for WP5 compatibility and radios appear nicely for the chosen taxonomies.

But when I have chosen radios for category I still get the "Select primary category". I'd expect this select should be hidden, as when selecting a category with radios I can only have one. Which makes that "Select primary category" form element needless.

Screenshot 2019-04-10 10 47 37

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.