Add shortcode with html content

 In Shortcode

This code snippet creates a shortcode with the html content . To call the shortcode you can call it on the WordPress editor by this [clientcat]


function ns_clientcat_function() {

 $variable = <<<XYZ
  <div style="width: 0px; height: 0px; overflow: hidden" itemscope="" itemtype="">
  <span itemprop="itemreviewed">blabla</span>
  <span itemprop="description">Company rating</span>
  <span itemprop="summary">5 stars service</span>
  <span itemprop="description">5 stars service</span>
  <meta itemprop="worstRating" content="0">
  <span itemprop="rating">5</span>
  <span itemprop="votes">37</span>; <span itemprop="bestRating"></span>
 echo $variable;

add_shortcode( 'clientcat', 'ns_clientcat_function' );

Click here for more WordPress code snippets

Recent Posts

Leave a Comment

Start typing and press Enter to search

Let's work together

I'd love to work with you! Please fill out my project form to tell me more about your project/work. I reply to all enquiries within 48 hours.
Or call me on 07930 194000.


  • March - Booked
  • April - Limited
  • May - Limited


  • My day rate is £300.
  • I can provide a fixed price for your work.
  • Projects start at around £2,000.

Enquiry Form