Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #816390

    Hi, I have a query, in woocommerce when I create a product with default wordpress editor, I see in header (at left) a link to shop main site

    
    <a href="https ://url/products/" rel="bookmark" title="Products" itemprop="headline">Products</a>
    

    Now, if I edit product and save with “advanced template”, in header there are a link to current product page and with same page title

    
    <a href="https ://url/product/my-first/" rel="bookmark" title="My first">My first</a>
    

    This is perfect!, How can I get the same result when I use standard wordpress editor??

    Thanks in advance

    #816618

    Hey Gabri,

    Please, could you provide your website link and the WP credentials?

    Best regards,
    John Torvik

    #816917

    Hi John, thanks for your answer, I provide credentials in private content section…

    #817444

    Hi Gabri,

    Could you make that account an admin, we need to investigate more.

    Best regards,
    Victoria

    #817545

    Hi Victoria, now you have admin privileges, thanks!

    #817680

    Hi Gabri,

    I was trying to preview your other products, but always got 404 on preview. It’s weird that the same function works differently on products built with the default editor and advanced editor.

    Best regards,
    Victoria

    • This reply was modified 7 years, 4 months ago by Victoria.
    #817806

    Hi Victoria, you need to preview products in spanish, or create a new product in english, also check “private content”

    #819150

    Hi,

    Thank you for the info.

    Please add this filter in the functions.php file.

    add_filter('avf_title_args', 'avf_title_args_mod', 10, 2);
    function avf_title_args_mod($args,$id)
    {
         if ( is_singular('product') ) {
            $args['title'] = get_the_title($id);
         }
        return $args;
    }
    

    Best regards,
    Ismael

    #819172

    Hi Ismael, thanks for your answer, finally I use your code but I make a little change because I saw that the permalink goes to (shop main page), not to (current product page)…

    
    add_filter('avf_title_args', 'avf_title_args_mod', 10, 2);
    function avf_title_args_mod($args,$id)
    {
         if ( is_singular('product') ) {
            $args['title'] = get_the_title($id);
            $args['link'] = get_permalink($id);
         }
        return $args;
    }

    Best regards,
    Gabri

    #819219

    Hi,

    Great! Let us know in a separate thread if you need anything else.

    Best regards,
    Ismael

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘main-title entry-title Woocommerce in header’ is closed to new replies.