Home › Forums › WoodMart support forum › footer problem, add the vendor name in h1
footer problem, add the vendor name in h1
- This topic has 13 replies, 2 voices, and was last updated 4 years, 1 month ago by
Elise Noromit.
-
AuthorPosts
-
May 26, 2021 at 1:04 pm #295630
loraloraParticipantHello,
1.I have a little footer problem after enabling copyright. It got too wide, how can I fix it?
2. I am using a code to add the vendor name (WCMP Plugin) to the product page.
________
function add_vendor_after_product_title(){
global $post;
if (‘Enable’ === get_wcmp_vendor_settings(‘sold_by_catalog’, ‘general’) && apply_filters(‘wcmp_sold_by_text_after_products_shop_page’, true, $post->ID)) {
$vendor = get_wcmp_product_vendors($post->ID);
if ($vendor) {
$sold_by_text = apply_filters(‘wcmp_sold_by_text’, __(‘Sold By’, ‘dc-woocommerce-multi-vendor’), $post->ID);
echo ‘permalink . ‘”>’ . $sold_by_text . ‘ ‘ . $vendor->page_title . ‘‘;
}
}
}
___________Everything works fine, but how can you add the vendor name not on top of h1 (like in the picture), but inside the tag h1 (like in the picture with yellow)??
The vendor name is above the product name.I mean, in the product card code, the product name is in H1, and the vendor name (which I display using the php code above) does not go there. The vendor name is above H1 and does not fall into it, and I have a question – is it possible to add (correct the php code that I have and which adds the vendor name above the product name) the vendor name inside H1?
Attachments:
You must be logged in to view attached files.May 26, 2021 at 9:39 pm #295739
Elise NoromitMemberHello,
Please provide the screen and show how you would like to change?
Please provide your site admin access to the private area.
As for the second question, please contact the plugin support as we do not have instructions on how to do that.
Best Regards
May 27, 2021 at 4:38 pm #296026
loraloraParticipant1.I made the footer ok sorry to worry
2.I already wrote in support of the plugin, the answer from the support is in the private area, but I pasted it for you below. They write that it depends on the theme settings.
https://wc-marketplace.com/support-forum/topic/vendor-name-in-h1/
“Hi,
Frontend designs are given/customize completely by your theme. You can add text/anything on woocommerce page by using woocommerce hooks and filters ( as per by default flow ). This link has an all hooks and filters list https://premmerce.com/woocommerce-hooks-guide/ ( it may help you out ). Add any text inside the h1 tag or any structural change can be done by your theme only. Your theme may override woocommerce pages for making their design or have theme default page design. You need to change there. So it’s better you contact your theme, they will give you perfect steps to achieve this flow.
Thanks”May 27, 2021 at 10:24 pm #296049
Elise NoromitMemberHello,
Please follow the instruction provided by the plugin support. As for the H1 tag you can chose which one should be in the Theme Settings > Page title: https://prnt.sc/13hpvut
In addition, you can create a preset for a certain page or post type https://prnt.sc/13hpxbh
Best Regards
June 1, 2021 at 5:24 pm #296959
loraloraParticipantI understood about the instructions, but the plugin support says that
“Add any text inside the h1 tag or any structural change can be done by your theme only.”
help please, what should I do? Perhaps I can override the file in the child theme?
June 2, 2021 at 7:52 am #297031
Elise NoromitMemberHello,
Please copy this file: woodmart/woocommerce/single-product/title.php to the child theme in the same route: woodmart-child/woocommerce/single-product/title.php
Then edit the code as per your needs.
Best Regards
June 3, 2021 at 6:18 pm #297450
loraloraParticipantIt turns out that I have this code, but how and where can I insert the php function, which is located above, so that the vendor name moves to h1? I just inserted this function there between h1 and nothing happened …
Please help me
if ( ! defined( ‘ABSPATH’ ) ) {
exit; // Exit if accessed directly.
}$is_quick_view = woodmart_loop_prop( ‘is_quick_view’ );
?>
<h1 itemprop=”name” class=”product_title wd-entities-title”><?php if( $is_quick_view ): ?>“><?php endif; ?><?php echo get_the_title(); ?><?php if( $is_quick_view ): ?><?php endif; ?></h1>
June 4, 2021 at 8:28 am #297537
Elise NoromitMemberHello,
You need to insert the code that was provided by the plugin support.
This code:
<h1 itemprop="name" class="product_title wd-entities-title"><?php if( $is_quick_view ): ?><a href="<?php the_permalink(); ?>"><?php endif; ?><?php echo get_the_title(); ?><?php if( $is_quick_view ): ?></a><?php endif; ?><?php add_vendor_after_product_title(); ?></h1>
To this file:
woodmart-child/woocommerce/single-product/title.php
Best Regards
June 4, 2021 at 12:22 pm #297587
loraloraParticipantThank you very much, I couldn’t have done it without you …
Only I had a small problem, 2 names are displayed. How can I remove the 2nd? If I remove the code from the function.php that I wrote to you above, I get an error on the single products page. Please look at the photo.
How can I leave only what’s inside h1?
June 5, 2021 at 2:41 pm #297800
Elise NoromitMemberHello,
Please provide your site admin access to the private area. Also, provide page URL with the problem.
Best Regards
June 7, 2021 at 12:57 pm #298149
loraloraParticipantSorry, I was stupid, it turns out I don’t need php code to add the name of the seller on the product page, because the plugin does it itself. Please see the photo, it is already there.
I am sending you accesses to my staging test site, can you please help me with that? Move vendor name from meta description and keep clickability in H1? How should I do it?
Thank you for your support and sorry that I misdirected you at the beginning.
Attachments:
You must be logged in to view attached files.June 8, 2021 at 8:00 am #298316
Elise NoromitMemberHello,
Unfortunately, we do not have the instructions for this. Please contact the plugin support and find out how to do that.
Best Regards
June 8, 2021 at 9:15 am #298351
loraloraParticipantI got it, thanks for the answer and your support
best wishesJune 8, 2021 at 1:03 pm #298412
Elise NoromitMemberYou are welcome! If you have any questions please feel free to contact us.
Best Regards
-
AuthorPosts
The topic ‘footer problem, add the vendor name in h1’ is closed to new replies.
- You must be logged in to create new topics. Login / Register