Creates a shortcode to display out HTML content

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

 * Shortcode to display out HTML content 
if ( ! function_exists( 'ns_shortcode_function' ) ) {
function ns_shortcode_function() {
  <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>

 return ob_get_clean();  
add_shortcode( 'showhtmlcontent', 'ns_shortcode_function' );




Hi, I'm a Freelance Web Developer and WordPress Expert based in London with a wealth of website development and support experience. I am great at problem solving and developing quick solutions.

Leave a Reply

Your email address will not be published. Required fields are marked *

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


    Fill in the form below to make an enquiry or find my contact details on my contact page.

  • Hidden
  • This field is for validation purposes and should be left unchanged.