Title: Shortcode not working
Last modified: July 2, 2019

---

# Shortcode not working

 *  [jfkweb](https://wordpress.org/support/users/jfkweb/)
 * (@jfkweb)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/)
 * Hi, I have just installed and created shortcode [related_posts] when i put this
   in editor it just returns [related_posts]
 * snippet code below, Anything i’m missing? Thanks!
 * `<?php
    $tags = wp_get_post_tags($post->ID); if ($tags) { echo ‘<h2>Related Articles
   </h2>’; $first_tag = $tags[0]->term_id; $args=array( ‘tag__in’ => array($first_tag),‘
   post__not_in’ => array($post->ID), ‘posts_per_page’=>3, ‘caller_get_posts’=>1);
   $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query-
   >have_posts()) : $my_query->the_post(); ?> ” rel=”bookmark” title=”Permanent 
   Link to <?php the_title_attribute(); ?>”><?php the_title(); ?> <p class=”single-
   cat-date”><?php the_category();?> <?php echo get_the_date(); ?></p> <?php echo
   do_shortcode(‘[rt_reading_time label=”” postfix=”MIN <span>READ</span>” postfix_singular
   =”MIN <span>READ</span>” post_id=”‘ . $post->ID . ‘”]’)?> <?php endwhile; } wp_reset_query();}?
   >’
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fshortcode-not-working-293%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 27 total)

1 [2](https://wordpress.org/support/topic/shortcode-not-working-293/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/shortcode-not-working-293/page/2/?output_format=md)

 *  [Temyk](https://wordpress.org/support/users/webtemyk/)
 * (@webtemyk)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/#post-11692820)
 * Hi,
 * Do you have a premium version of woody? You entered the name of the snippet shortcode
   in “Custom shortcode name”?
    Show in the screenshot your snippet settings.
 *  Thread Starter [jfkweb](https://wordpress.org/support/users/jfkweb/)
 * (@jfkweb)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/#post-11692840)
 * Hi, yes have premium. cant upload screenshot? Was using custom shortcode but 
   didnt work then used one that is given [wbcr_php_snippet id=”44301″]
 * how cxan i upload screenshot?
 *  Thread Starter [jfkweb](https://wordpress.org/support/users/jfkweb/)
 * (@jfkweb)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/#post-11692848)
 * [screenshot1](http://staging.thegloss.ie/img/s1.png)
    [screenshot 2](http://staging.thegloss.ie/img/s2.png)
 *  [Temyk](https://wordpress.org/support/users/webtemyk/)
 * (@webtemyk)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/#post-11692855)
 * [https://imgur.com/upload](https://imgur.com/upload)
 *  Thread Starter [jfkweb](https://wordpress.org/support/users/jfkweb/)
 * (@jfkweb)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/#post-11692859)
 * i sent links thanks
 *  [Temyk](https://wordpress.org/support/users/webtemyk/)
 * (@webtemyk)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/#post-11692867)
 * Check the links, gives an error 404
 *  Thread Starter [jfkweb](https://wordpress.org/support/users/jfkweb/)
 * (@jfkweb)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/#post-11692871)
 * > [View post on imgur.com](https://imgur.com/t1JgAtM)
 *  Thread Starter [jfkweb](https://wordpress.org/support/users/jfkweb/)
 * (@jfkweb)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/#post-11692873)
 * > [View post on imgur.com](https://imgur.com/cgomFyv)
 *  Thread Starter [jfkweb](https://wordpress.org/support/users/jfkweb/)
 * (@jfkweb)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/#post-11692879)
 * its related posts snippet. have tried with paused and play icons
 *  [Temyk](https://wordpress.org/support/users/webtemyk/)
 * (@webtemyk)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/#post-11692893)
 * Remove the square brackets from the shortcode name.
    You have errors in snippet
   code: remove PHP tags at the beginning and at the end
 *  Thread Starter [jfkweb](https://wordpress.org/support/users/jfkweb/)
 * (@jfkweb)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/#post-11692900)
 * ah great i’ll try, thanks
 *  Thread Starter [jfkweb](https://wordpress.org/support/users/jfkweb/)
 * (@jfkweb)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/#post-11692907)
 * no, just get shiortcode name
 *  [Temyk](https://wordpress.org/support/users/webtemyk/)
 * (@webtemyk)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/#post-11692974)
 * The shortcode still doesn’t work in the text of the post? Or now another issue?
 *  Thread Starter [jfkweb](https://wordpress.org/support/users/jfkweb/)
 * (@jfkweb)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/#post-11692980)
 * yes, still doesnt work. I’m going to try taking all <php?> tags out and just 
   echo everything. will this help?
 *  [Temyk](https://wordpress.org/support/users/webtemyk/)
 * (@webtemyk)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/#post-11693004)
 * Send again a screenshot of the snippet settings.

Viewing 15 replies - 1 through 15 (of 27 total)

1 [2](https://wordpress.org/support/topic/shortcode-not-working-293/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/shortcode-not-working-293/page/2/?output_format=md)

The topic ‘Shortcode not working’ is closed to new replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3523853)
 * [Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts](https://wordpress.org/plugins/insert-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php/reviews/)

## Tags

 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 27 replies
 * 2 participants
 * Last reply from: [jfkweb](https://wordpress.org/support/users/jfkweb/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/shortcode-not-working-293/page/2/#post-11693271)
 * Status: not resolved