• Resolved peakadmin

    (@peakadmin)


    The plugin seems to not be recognising all the registered taxonomies. It finds the standard wordpress ones of ‘category’ and ‘post_tag’, if finds any custom taxonomies based on terms which are ‘non-selectable’ (i.e. text, number, etc.) but does not find custom taxonomies derived from ‘selectable’ terms (i.e. checkboxes, radio buttons, select fields, etc.).
    The plugin is being tested on a clean WP install, latest version, using demo data and with your latest version of the plugin.
    Your plugin comes highly recommended by the theme authors at HivePress and this issue has been fully researched by them [https://hivepress.io/support/topic/allow-attributes-and-their-options-to-be-searched-through-text-search/]. The consensus is that perhaps the issue lies with the WPES plugin itself.
    Can you please look into this – thanks.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Sumit Singh

    (@5um17)

    Hi,

    but does not find custom taxonomies derived from ‘selectable’ terms (i.e. checkboxes, radio buttons, select fields, etc.).

    Sorry I do not understand what do you mean by derived from selectable?
    A Taxonomy can have only tern name and term slug. Are you talking about term meta? A screenshot can help me to understand the issue.

    Also, HivePress is paid plugin I can not test and confirm the issue.
    We have open source code and theme/plugin authors are welcome to send pull request and suggest changes if they spot issues.

    If you can replicate the issue without HivePress with custom taxonomy then please let me know.

    Thanks

    Thread Starter peakadmin

    (@peakadmin)

    Hi Sumit,

    I have two screenshots to help explain the issue.

    wp_term_taxonomy.jpg is a look at the WP table showing the standard WP install with its standard taxonomies of ‘category’ and ‘post_tag’ (in yellow). Further down the table we see the HivePress plugin has registered its custom taxonomy of ‘hp_listing_category’ (in yellow) and ‘hp_listing_pets’ and ‘hp_listing_locality’ (circled in red).

    The three taxonomies in yellow are picked up by the WPES plugin but the two in red are not. WPESsettings.jpg shows the WPES plugin setting screen with the corresponding yellow taxonomies displayed and the red ones not.

    This is my concern.

    The only difference between the custom taxonomies is the way in which they are built. Those in yellow are physically typed into a field for the name and slug of said custom taxonomy. Those in red are NOT typed into the name or slug fields BUT are SELECTED from a drop down list of available options.

    So the issue is either the way that HivePress is registering those custom taxonomies OR its the way that the WPES plugin is collecting the data for its ‘taxonomies’ => array().

    HivePress has declared the issue lies with your plugin – https://hivepress.io/support/topic/allow-attributes-and-their-options-to-be-searched-through-text-search/

    HivePress is a free plugin. The HiveListing theme is also a free plugin

    If I can help in any other way, please let me know.

    Thread Starter peakadmin

    (@peakadmin)

    Hi Sumit,

    A follow up comment from the HivePress developer is

    I figured there may be an issue because all selectable attributes have the same taxonomy label of “Option”, but those are not displayed either. This may be resolved if WPES displays taxonomy names instead of labels (in the same way as meta keys are displayed now).

    You can read the original conversation over at HivePress here.

    Hope this helps somewhat.

    Plugin Author Sumit Singh

    (@5um17)

    Hi,

    This is not true. I am already using taxonomy name instead of labels. You can see here https://github.com/5um17/wp-extended-search/blob/master/includes/admin/class-wpes-admin.php#L404

    Not all taxonomies are displayed, only those have show_ui and public attribute set to true are displayed in settings.
    If you can help me to see the output of line 404 then I can understand the issue.
    To do so please add this code just after line 404

    
    echo '<pre>';
    print_r($all_taxonomies);
    echo '</pre>';
    

    Then go to the setting and copy and paste the output here.

    Thanks

    Thread Starter peakadmin

    (@peakadmin)

    Hi @5um17,
    Here’s the output

    Array
    (
        [category] => WP_Taxonomy Object
            (
                [name] => category
                [label] => Categories
                [labels] => stdClass Object
                    (
                        [name] => Categories
                        [singular_name] => Category
                        [search_items] => Search Categories
                        [popular_items] => 
                        [all_items] => All Categories
                        [parent_item] => Parent Category
                        [parent_item_colon] => Parent Category:
                        [edit_item] => Edit Category
                        [view_item] => View Category
                        [update_item] => Update Category
                        [add_new_item] => Add New Category
                        [new_item_name] => New Category Name
                        [separate_items_with_commas] => 
                        [add_or_remove_items] => 
                        [choose_from_most_used] => 
                        [not_found] => No categories found.
                        [no_terms] => No categories
                        [items_list_navigation] => Categories list navigation
                        [items_list] => Categories list
                        [most_used] => Most Used
                        [back_to_items] => ← Go to Categories
                        [menu_name] => Categories
                        [name_admin_bar] => category
                    )
    
                [description] => 
                [public] => 1
                [publicly_queryable] => 1
                [hierarchical] => 1
                [show_ui] => 1
                [show_in_menu] => 1
                [show_in_nav_menus] => 1
                [show_tagcloud] => 1
                [show_in_quick_edit] => 1
                [show_admin_column] => 1
                [meta_box_cb] => post_categories_meta_box
                [meta_box_sanitize_cb] => taxonomy_meta_box_sanitize_cb_checkboxes
                [object_type] => Array
                    (
                        [0] => post
                    )
    
                [cap] => stdClass Object
                    (
                        [manage_terms] => manage_categories
                        [edit_terms] => edit_categories
                        [delete_terms] => delete_categories
                        [assign_terms] => assign_categories
                    )
    
                [rewrite] => Array
                    (
                        [with_front] => 1
                        [hierarchical] => 1
                        [ep_mask] => 512
                        [slug] => category
                    )
    
                [query_var] => category_name
                [update_count_callback] => 
                [show_in_rest] => 1
                [rest_base] => categories
                [rest_controller_class] => WP_REST_Terms_Controller
                [default_term] => 
                [rest_controller] => 
                [_builtin] => 1
            )
    
        [post_tag] => WP_Taxonomy Object
            (
                [name] => post_tag
                [label] => Tags
                [labels] => stdClass Object
                    (
                        [name] => Tags
                        [singular_name] => Tag
                        [search_items] => Search Tags
                        [popular_items] => Popular Tags
                        [all_items] => All Tags
                        [parent_item] => 
                        [parent_item_colon] => 
                        [edit_item] => Edit Tag
                        [view_item] => View Tag
                        [update_item] => Update Tag
                        [add_new_item] => Add New Tag
                        [new_item_name] => New Tag Name
                        [separate_items_with_commas] => Separate tags with commas
                        [add_or_remove_items] => Add or remove tags
                        [choose_from_most_used] => Choose from the most used tags
                        [not_found] => No tags found.
                        [no_terms] => No tags
                        [items_list_navigation] => Tags list navigation
                        [items_list] => Tags list
                        [most_used] => Most Used
                        [back_to_items] => ← Go to Tags
                        [menu_name] => Tags
                        [name_admin_bar] => post_tag
                    )
    
                [description] => 
                [public] => 1
                [publicly_queryable] => 1
                [hierarchical] => 
                [show_ui] => 1
                [show_in_menu] => 1
                [show_in_nav_menus] => 1
                [show_tagcloud] => 1
                [show_in_quick_edit] => 1
                [show_admin_column] => 1
                [meta_box_cb] => post_tags_meta_box
                [meta_box_sanitize_cb] => taxonomy_meta_box_sanitize_cb_input
                [object_type] => Array
                    (
                        [0] => post
                    )
    
                [cap] => stdClass Object
                    (
                        [manage_terms] => manage_post_tags
                        [edit_terms] => edit_post_tags
                        [delete_terms] => delete_post_tags
                        [assign_terms] => assign_post_tags
                    )
    
                [rewrite] => Array
                    (
                        [with_front] => 1
                        [hierarchical] => 
                        [ep_mask] => 1024
                        [slug] => tag
                    )
    
                [query_var] => tag
                [update_count_callback] => 
                [show_in_rest] => 1
                [rest_base] => tags
                [rest_controller_class] => WP_REST_Terms_Controller
                [default_term] => 
                [rest_controller] => 
                [_builtin] => 1
            )
    
        [hp_listing_category] => WP_Taxonomy Object
            (
                [name] => hp_listing_category
                [label] => Categories
                [labels] => stdClass Object
                    (
                        [name] => Categories
                        [singular_name] => Category
                        [search_items] => Search Categories
                        [popular_items] => 
                        [all_items] => Categories
                        [parent_item] => Parent Category
                        [parent_item_colon] => Parent Category:
                        [edit_item] => Edit Category
                        [view_item] => View Category
                        [update_item] => Update Category
                        [add_new_item] => Add Category
                        [new_item_name] => New Category Name
                        [separate_items_with_commas] => 
                        [add_or_remove_items] => 
                        [choose_from_most_used] => 
                        [not_found] => No categories found.
                        [no_terms] => No categories
                        [items_list_navigation] => Categories list navigation
                        [items_list] => Categories list
                        [most_used] => Most Used
                        [back_to_items] => ← Go to Categories
                        [menu_name] => Categories
                        [name_admin_bar] => Category
                        [archives] => Categories
                    )
    
                [description] => 
                [public] => 1
                [publicly_queryable] => 1
                [hierarchical] => 1
                [show_ui] => 1
                [show_in_menu] => 1
                [show_in_nav_menus] => 1
                [show_tagcloud] => 1
                [show_in_quick_edit] => 1
                [show_admin_column] => 1
                [meta_box_cb] => post_categories_meta_box
                [meta_box_sanitize_cb] => taxonomy_meta_box_sanitize_cb_checkboxes
                [object_type] => Array
                    (
                        [0] => hp_listing
                        [1] => hp_listing_attribute
                    )
    
                [cap] => stdClass Object
                    (
                        [manage_terms] => manage_categories
                        [edit_terms] => manage_categories
                        [delete_terms] => manage_categories
                        [assign_terms] => edit_posts
                    )
    
                [rewrite] => Array
                    (
                        [with_front] => 1
                        [hierarchical] => 
                        [ep_mask] => 0
                        [slug] => listing-category
                    )
    
                [query_var] => hp_listing_category
                [update_count_callback] => Array
                    (
                        [0] => HivePress\Components\Listing Object
                            (
                            )
    
                        [1] => update_category_count
                    )
    
                [show_in_rest] => 
                [rest_base] => 
                [rest_controller_class] => 
                [default_term] => 
                [rest_controller] => 
                [_builtin] => 
                [post_type] => Array
                    (
                        [0] => listing
                        [1] => listing_attribute
                    )
    
            )
    
    )

    Thanks for looking into this.

    Plugin Author Sumit Singh

    (@5um17)

    Hi,

    So as you can see there are only three taxonomies. And I am using standard WP function get_taxonomies() with this argument

    
    array(
    				'show_ui' => true,
    				'public'  => true,
    			)
    

    Please let the author know and ask them to check the issue why standard WP function returning only three taxonomies.

    Thanks

    Plugin Author Sumit Singh

    (@5um17)

    Okay I can see the author response. Some of the taxonomies are not public.
    You can use our filter to modify the arguments for taxonomies https://wpes.secretsofgeeks.com/hooks#wpes_tax_args

    Something like this

    
    /**
     * Display only custom taxonomies
     */
    function wpes_tax_args($args) {
    	unset($args['public']);
    	return $args;
    }
    add_filter('wpes_tax_args', 'wpes_tax_args');
    

    Hope this helps.

    Thanks

    Thread Starter peakadmin

    (@peakadmin)

    Thank you Sumit,

    That code snippet did the trick – the search now works as expected!

    I did not realize that you had all those actions and filters to extend or modify the plugin functionality, they’re fantastic yet so simple!. They really take the plugin to the next level – thanks again.

    You can mark this ticket resolved.

    Plugin Author Sumit Singh

    (@5um17)

    Glad to hear that. ??

    If you liked the support and product, please share the review here https://www.ads-software.com/support/plugin/wp-extended-search/reviews/

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Plugin does not recognize ALL registered taxonomies’ is closed to new replies.