Title: Using shortcodes in the_content
Last modified: August 30, 2016

---

# Using shortcodes in the_content

 *  [ashraj98](https://wordpress.org/support/users/ashraj98/)
 * (@ashraj98)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/using-shortcodes-in-the_content/)
 * I am creating a custom API search using Gravity Forms and my theme. I created
   a filter on the_content() and I was able to successfully change the output of
   a specific page.
 * Now I want to use one of my theme’s shortcode elements to make the output look
   better. Do I set `$content = '[shortcode opt=1 opt2=3]';` or is there some different
   way, maybe by using `do_shortcode()`. I would test it myself but I don’t want
   to mess up the script and lose functionality.
 * Thanks!

The topic ‘Using shortcodes in the_content’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [ashraj98](https://wordpress.org/support/users/ashraj98/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/using-shortcodes-in-the_content/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
