Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( function_exists('icl_object_id') ) {
- $lang = ICL_LANGUAGE_CODE;
- echo var_dump($lang);
- function k2i_text_on_woocommerce_shop_page_desktop() {
- $text_en = '<div class="term-description-desktop">
- <div class="category-text-container">
- <div class="category-text-left-column">
- <h1>This is where the description will be printed. </h1>
- <p>This will be an English description</p>
- </div>
- <div class="category-text-right-column">
- <img src="http://dssprod.be/inesbouwen/wp-content/uploads/cat-image-necklace.jpg" alt="Necklaces page banner" />
- </div>
- </div>
- </div>';
- $text_nl = '<div class="term-description-desktop">
- <div class="category-text-container">
- <div class="category-text-left-column">
- <h1>Hier komt de beschrijving</h1>
- <p>Hier komt een nederlandse beschrijving</p>
- </div>
- <div class="category-text-right-column">
- <img src="http://dssprod.be/inesbouwen/wp-content/uploads/cat-image-necklace.jpg" alt="Necklaces page banner" />
- </div>
- </div>
- </div>';
- if (is_shop()) {
- if ($lang == "en") {
- echo $text_en;
- } else {
- echo $text_nl;
- }
- }
- }
- function k2i_text_on_woocommerce_shop_page_mobile() {
- if (is_shop()) {
- if ($lang == 'en') {
- echo '<div class="term-description-mobile">This will be the description</div>';
- } else {
- echo '<div class="term-description-mobile">Hier komt de description</div>';
- }
- }
- }
- add_action( 'woocommerce_before_shop_loop', 'k2i_text_on_woocommerce_shop_page_desktop');
- add_action( 'woocommerce_after_shop_loop', 'k2i_text_on_woocommerce_shop_page_mobile');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement