Title: Adding Shortcode to PHP template
Last modified: June 7, 2018

---

# Adding Shortcode to PHP template

 *  Resolved [flaze24](https://wordpress.org/support/users/flaze24/)
 * (@flaze24)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/adding-shortcode-to-php-template/)
 * Hey, I wanted to utilize your code but I have to add the posts onto my main page(
   the index) so I was wondering if there was anyway of adding the shortcode directly
   into the code.
    -  This topic was modified 7 years, 11 months ago by [flaze24](https://wordpress.org/support/users/flaze24/).

Viewing 1 replies (of 1 total)

 *  Thread Starter [flaze24](https://wordpress.org/support/users/flaze24/)
 * (@flaze24)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/adding-shortcode-to-php-template/#post-10376577)
 * Okay, I got it to work, turns out I just adding the do_shortcode wrong.
 * However, I encountered another problem now. The links to the articles show fine
   but when i click on them they don’t take me anywhere, they just stay static.

Viewing 1 replies (of 1 total)

The topic ‘Adding Shortcode to PHP template’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/display-medium-posts_062041.svg)
 * [Display Medium Posts](https://wordpress.org/plugins/display-medium-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/display-medium-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/display-medium-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/display-medium-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/display-medium-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/display-medium-posts/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [flaze24](https://wordpress.org/support/users/flaze24/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/adding-shortcode-to-php-template/#post-10376577)
 * Status: resolved