Add shortcode with html content

 In All, 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="http://data-vocabulary.org/Review-aggregate">
  <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>
  </div>
 XYZ;
 echo $variable;

}
add_shortcode( 'clientcat', 'ns_clientcat_function' );

Click here for more WordPress code snippets

Recent Posts

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

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.

Availability

  • November - Booked
  • December - Booked
  • January - Available

Rates

  • My day rate is £300.
  • I can provide a fixed price for your work.

EN - Header Enquiry Form

  • This form collects your name, email address and telephone number so that I can respond to the enquiry(ies) that you submit via this website. Please check my privacy policy for the full story on how I use, protect and manage your submitted data.