Okay
  Public Ticket #3725824
Elementor Page Title Problem
Closed

Comments

  •  9
    Tasos started the conversation

    Hi. When using Elementor custom page there is a problem. In Title of page instead of showing vendors name it shows Stores-List - Sitename

    The best for SEO is to have the ability of Vendors Name - Sitename

    Is this possible?

    Thank you

  •  2,243
    WebWizards replied

    Hi,

    MarketKing can replace the page title based on the Store SEO module functionality: https://woocommerce-multivendor.com/docs/store-seo

    For this to work, each vendor must go to their vendor dashboard settings and choose a 'SEO title' there.

  •  9
    Tasos replied

    Great. Can hy default have the Store name as title?

  •  2,243
    WebWizards replied

    I believe you can do that, by adding the following PHP snippet to the site:

    add_filter('pre_get_document_title', 'marketking_seo_title', 1000);
    function marketking_seo_title($title){
        $vendor_id = marketking()->get_vendor_id_in_store_url();
        if ($vendor_id !== 0){
            $title = marketking()->get_store_name_display($vendor_id);
        }
            
        return $title;
    }
    

    It should then use the store name as the page title when on the vendor store page.

  •  9
    Tasos replied

    i see. Can this be done via RankMath in order to have more control?

    Also when we use it in https://developers.facebook.com/tools/debug/ its not showing it correctly the title or the description and without any image

  •  9
    Tasos replied

    Also this snippet is making all site have the same title as one vendor.


    Can we control the Vendors Store via RankMath?

  •  2,243
    WebWizards replied

    Hi again,

    I've been looking into the issues with this snippet and I believe I have a fix for both the issue on facebook and the issue with this appearing on all URLs:

    https://pastecode.io/s/3er836ix

     

    I've also tested with that facebook debugger on our demo + the above code snippet, and the link appears correctly:

    5351180105.png

     

    Please try it with this snippet.

    Regarding RankMath, I've been looking at it, but a special integration is needed - I think it is more realistic for product pages because those are actual pages (the vendor store page is a dynamically generated page).

  •  9
    Tasos replied

    The vendor link changes the title normally but in debugger fb still have errors.

    I think the most suitable is to make the vendors a custom taxonomy? So it can play well with RankMath

    Another thing i was thinking is that vendors are not going on sitemap. 


    I used this code and works fine as title and in og for social too.(my meta keys are in ACF to make them easier to edit them in vendor page as shortcodes)

    https://pastecode.io/s/c1xmvwm4

  •  2,243
    WebWizards replied

    Regarding the sitemap, I'm not really sure what the solution could be - I guess it depends on how the sitemap plugin generates it.

    Generally a crawler should be able to get all links / all vendor pages, so it would only work if the sitemap generator actually crawls the site.

     

     

  •  9
    Tasos replied

    Maybe you should examine vendors to be custom taxonomies? I'm not sure. In rank math now I cannot see the vendors in the site map only the products and categories 🤔

  •  2,243
    WebWizards replied

    I think a taxonomy for vendors would not really help, because I imagine that would just lead to incorrect links in Rankmath (e.g. site.com/archive/vendor).

    I think we need to either add those as custom URLs (manually) to the sitemap: https://support.rankmath.com/ticket/add-specific-url-to-sitemap/ 

    or do a custom integration between MarketKing and Rankmath.

    We are open to the latter but it's not really something I could do now quickly.

  •  9
    Tasos replied

    Since we make custom role for each vendor we will create a snippets and add all vendors to a custom sitemap. Will let you know when its done in case it helps. But it certainly need to have either a CPT or custom role for vendor in order to recognize it.


    Thank you