-
AuthorPosts
-
July 4, 2017 at 4:19 pm #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
July 5, 2017 at 5:56 am #816618Hey Gabri,
Please, could you provide your website link and the WP credentials?
Best regards,
John TorvikJuly 5, 2017 at 10:38 pm #816917Hi John, thanks for your answer, I provide credentials in private content section…
July 6, 2017 at 7:00 pm #817444Hi Gabri,
Could you make that account an admin, we need to investigate more.
Best regards,
VictoriaJuly 7, 2017 at 12:52 am #817545Hi Victoria, now you have admin privileges, thanks!
July 7, 2017 at 9:21 am #817680Hi 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.
July 7, 2017 at 12:32 pm #817806Hi Victoria, you need to preview products in spanish, or create a new product in english, also check “private content”
July 11, 2017 at 8:32 am #819150Hi,
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,
IsmaelJuly 11, 2017 at 9:08 am #819172Hi 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,
GabriJuly 11, 2017 at 10:45 am #819219 -
AuthorPosts
- The topic ‘main-title entry-title Woocommerce in header’ is closed to new replies.