• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Web Development Tips

Web Development Resources

  • Home
  • Joomla!
    • Joomla! Favorite Plugins
    • Helix Ultimate 2
  • WordPress
    • WooCommerce
    • Genesis
    • Divi
    • Elementor
    • WP Favorite Plugins
  • CSS
  • JS
  • WAMP

WooCommerce How to Display Shortcode Content Inside Archive / Shop / Cat Pages

Home » WooCommerce How to Display Shortcode Content Inside Archive / Shop / Cat Pages

In order to display shortcode content inside the WooCommerce Archive / Shop / Cat Pages add this snippet inside functions.php:

add_action( 'woocommerce_after_shop_loop_item_title', 'my_shortcode', 5 );
 function my_shortcode() {
  echo '<div class="makeit-looks-good">';
  print do_shortcode ( '[social-share align="left" style="icon" counters="0" buttons="facebook,twitter,pinterest,linkedin,mail"]' );
  echo '</div>';	
}

To control the area where this shortcode will be rendered, use this WooCommerce Visual Hook Guide: Archive / Shop / Cat Pages to hook it in the right place.

Tags: functions.php, shortcode

Primary Sidebar

Categories

  • CSS
  • Divi
  • Elementor
  • Genesis
  • Helix Ultimate 2
  • Joomla!
  • JS
  • Uncategorized
  • WAMP
  • WooCommerce
  • WordPress
  • WP Favorite Plugins

Footer

Web Development Resources

A daily expanding collection of web development scripts and tips. Some of the resources come from our day-to-day development work and others have been gathered around the web. We are committed to providing credits and backlinks to all these valuable resources. If you have noticed a script coming from your resources and is not credited, or if you want a resource to be removed, please let us know.

Are these resources safe to be used?

We offer and display these scripts without any warranty. Even if we have used a lot of these on projects, you should use them at your own risk. Any web security issues or damages of any kind that may occur in your web development projects are entirely your responsibility.

Recent Posts

  • WooCommerce How to Display Shortcode Content Inside Archive / Shop / Cat Pages
  • WooCommerce How to Display Shortcode Content Inside Product Page
  • Gravity Forms, Change Select Field Drop Down Arrow with Font Awesome
  • Adding a link from the child element to the parent element
  • Joomla Change Date Format String With PHP

Copyright © 2022 · web development by All Web Keys - Contact Us