Support » Plugin: Business Directory Plugin » wp_title() rewriting issue

  • Resolved julie92500


    I had an issue. The plugin was rewriting the wp_title, especially for the tags pages

    I made one modification in _handle_action

    public function _handle_action($query) {
            // workaround WP issue #16373
            if ( (get_query_var('page_id') == wpbdp_get_page_id('main')) &&
                 (wpbdp_get_page_id('main') == get_option('page_on_front')) )
                $action = wpbdp_getv($_GET, 'action', 'main');
                $action = get_query_var('action');
            if (get_query_var('page_id') == wpbdp_get_page_id('main')) {
             if (get_query_var('category_id') || get_query_var('category')) $action = 'browsecategory';
             if (get_query_var('tag')) $action = 'browsetag';
             if (get_query_var('id') || get_query_var('listing')) $action = 'showlisting';
             if (!$action) $action = 'main';
            $this->action = $action;

    by setting $action only current page is a business directory one. Especially to avoid ‘tagbrowse’ action on regular tag page.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author businessdirectoryplugin


    This may explain a bug/conflict we’ve been having with our sister plugin AWPCP. I’ll make sure my developer is aware of it. Thanks for the report!

    not sure this workaround will work for everybody and in any case.

    especially i’m not sure about the “$action = get_query_var(‘action’);” purpose which can setup some value in the $action variable and then trigger also some title rewriting later.

    and i’m not sure that my test condition “if (get_query_var(‘page_id’) == wpbdp_get_page_id(‘main’))” will cover all the cases.

    my only advise is that you have to manage your plugin behaviour only on the plugin pages. so you have to check such title rewriting is triggered only on WPBDP pages.


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_title() rewriting issue’ is closed to new replies.