A
A
Andrew_ST2017-04-25 10:06:30
WooCommerce
Andrew_ST, 2017-04-25 10:06:30

How to add such a block?

Friends. I can not figure out how to display such a block.
The site works WP+Woocommerce Screenshot
attached. What needs to be displayed is highlighted in green.
b0734ec5ab9d45e29a1e503aa1a73070.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri, 2017-04-25
@klyo

What you need to do is to do it with hooks and in no case touch the plugin source files.
A complete list of hooks specifically for woocommerce can be found here: Woocommerce Hooks .
As for your issue. You need the hook: woocommerce_product_meta_start .
You need to add the following code to your active theme's functions.php file:

//Цепляем свою функцию
add_action( 'woocommerce_product_meta_start', 'woocommerce_infobox_single_before_meta' ); 
 
function woocommerce_infobox_single_before_meta() {
    // Здесь можете вывести любой код, который вам нужно
    echo '<div class="single-product-infobox">Дополнительная информация</div>';
}

But now only the functionality is done, you will have to place it on the right using CSS.

S
Site Developer, 2017-04-26
@secsite

In this place, in many topics, a brief description of the product is displayed.
To display something different, you need to redo the theme template.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question