WCMp Core
-
AuthorPosts
-
-
May 21, 2021 at 4:30 PM #121982l.ganParticipant
Hi, I am using a code to add the vendor name 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)??
Thank you
-
May 21, 2021 at 6:58 PM #121998MVX Support NinjaKeymaster
HI,
kindly share us the full code you are using in code block and please share the frontend image what do you actually want.Regards,
-
May 22, 2021 at 10:47 PM #122060l.ganParticipant
Hello to you! With the location of the visulano, everything is fine in the interface. 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?
I’m sorry, I didn’t quite understand how I can show you the code, because I myself look through google chrome and f12
-
May 25, 2021 at 1:19 PM #122061l.ganParticipantThis reply has been marked as private.
-
May 25, 2021 at 1:19 PM #122062l.ganParticipantThis reply has been marked as private.
-
May 25, 2021 at 7:25 PM #122166Raju The Cool GuyKeymasterThis reply has been marked as private.
-
June 4, 2021 at 12:12 AM #122582l.ganParticipant
It 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 …
this is my theme file
Please help meif ( ! 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:36 PM #122648Raju The Cool GuyKeymaster
Hi,
We are very sorry to say that this is quite impossible for us to give you instruction to add code by checking few of your theme code. And it is also not structural. If your theme gives an update then all changes will be removed. This will be so pathetic for you. And you can’t add this type of code to your theme file. You need to write code ( CSS/backend ) using hooks and filters.
thanks -
June 5, 2021 at 12:30 AM #122658l.ganParticipant
Hello, thanks for your reply and support,the developers of my theme helped me by examining the code that the support of your theme gave me the code and told me to insert it into the child theme (I wrote this code above).
“You need to insert the code that was provided by the plugin support.
This code:
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 add_vendor_after_product_title(); ?><?php if( $is_quick_view ): ?>“><?php endif; ?><?php echo get_the_title(); ?><?php if( $is_quick_view ): ?><?php endif; ?></h1>but now my vendor name is displayed 2 times (looks at the photo). The code that you gave me earlier (it is above) is also in functions php. They only work together.
How do I remove the top 2 output of the vendor name? which is generated by the code?
Note: if I completely delete the code, the product page breaks. Maybe I need to remove some of the code from there? Please help me.
-
June 7, 2021 at 7:52 PM #122724Raju The Cool GuyKeymaster
Hi,
We can only help you out by backend code. For basic code ( using hooks and filter ). Style and design managed by theme. We don’t have a single idea for your theme. A theme has a thousand numbers of code. Every code is related to each other.
But what we understand from #post-122658 this post you have an issue to double vendor names and you want to delete one. Then just remove all your custom code. Menas revert back to the initial one. Then add your theme developer given code. You may have added the same code/ functions two times. That’s why this is happening. -
June 22, 2021 at 6:35 PM #123528l.ganParticipant
thank you very much for your help, my issue has been resolved
-
June 22, 2021 at 7:22 PM #123539MVX Support NinjaKeymaster
I hope you are satisfied with our assistance and plugin. A 5/5 review here- https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/reviews/#new-post , would be a great way to share your experience with others.
This motivates us to continue providing the best experience possible and also helps others know how WC-Marketplace can make their life easier
-
-
AuthorPosts
The topic ‘vendor name in h1’ is closed to new replies.