# Filtering Pages and Posts for shortcode

**URL:** https://meta.discourse.org/t/filtering-pages-and-posts-for-shortcode/89829
**Category:** WordPress
**Created:** [June 14, 2018, 12:25am UTC](https://meta.discourse.org/t/filtering-pages-and-posts-for-shortcode/89829 "2018-06-14T00:25:45Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![oldManLemon](https://avatars.discourse-cdn.com/v4/letter/o/b782af/32.png) [@oldManLemon](https://meta.discourse.org/u/oldManLemon)
#### Post date: [June 14, 2018, 12:25am UTC](https://meta.discourse.org/t/filtering-pages-and-posts-for-shortcode/89829/1 "2018-06-14T00:25:45Z")

</div>

I am currently trying to use post full page/comment to the discussion area of my forum. I have chosen to do this because I we are using Avada theme which comes with pages builder.

> [fusion\_builder\_container hundred\_percent=“no” equal\_height\_columns=“no” menu\_anchor=“” hide\_on\_mobile=“small-visibility,medium-visibility,large-visibility” class=“” id=“” background\_color=“”

See above ^^^

I was wondering if there is a filter file somewhere that i can begin to enter this short code into the filter to remove it?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [June 14, 2018, 12:38am UTC](https://meta.discourse.org/t/filtering-pages-and-posts-for-shortcode/89829/2 "2018-06-14T00:38:41Z")

</div>

Shortcodes are a real problem if you want to publish the full post content. Take a look at the Dealing with WordPress shortcodes section of this topic for a few ways of dealing with them: [WP Discourse plugin tips and tricks](https://meta.discourse.org/t/wp-discourse-plugin-tips-and-tricks/50757).

The easiest approach would be to publish an excerpt of the post to Discourse and then allow users to see the full post by clicking on the Show Full Post button. When that is done, the shortcodes should be properly rendered in the expanded post.

---

<div class="post-metadata">

### Author: ![oldManLemon](https://avatars.discourse-cdn.com/v4/letter/o/b782af/32.png) [@oldManLemon](https://meta.discourse.org/u/oldManLemon)
#### Post date: [June 14, 2018, 12:51am UTC](https://meta.discourse.org/t/filtering-pages-and-posts-for-shortcode/89829/3 "2018-06-14T00:51:10Z")

</div>

Yeah I just noticed in my trails and tribulations that it seems to filter well in this case. The reason I was trying to avoid it was because if you click show full post it just changes to loading and never gathers to the full post. I was thinking that might have something to do with the shortcodes. Do you have any suggestions?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [June 14, 2018, 12:56am UTC](https://meta.discourse.org/t/filtering-pages-and-posts-for-shortcode/89829/4 "2018-06-14T00:56:27Z")

</div>

> [@oldManLemon](#):
>
> The reason I was trying to avoid it was because if you click show full post it just changes to loading and never gathers to the full post.

It would be good to sort out what the problem is with expanding the posts. If you can share a link to a post on your WordPress site, I’ll take a look at it. You can either post a link in this topic, or send it to me in a private message.

---

<div class="post-metadata">

### Author: ![oldManLemon](https://avatars.discourse-cdn.com/v4/letter/o/b782af/32.png) [@oldManLemon](https://meta.discourse.org/u/oldManLemon)
#### Post date: [June 14, 2018, 1:02am UTC](https://meta.discourse.org/t/filtering-pages-and-posts-for-shortcode/89829/5 "2018-06-14T01:02:51Z")

</div>

I unfortunately it is behind a firewall as it is for an internal company. I can route it to a different address to face it outwards temporaily. Would that bother installation if its address changed?

```
Unprocessable Entity s@http://forums.bornhorstward.com.au/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:14:28648 o@http://forums.bornhorstward.com.au/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:14:28505 i@http://forums.bornhorstward.com.au/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:14:28434 trigger@http://forums.bornhorstward.com.au/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:19:5881 _onError/&lt;@http://forums.bornhorstward.com.au/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:19:7862 invokeWithOnError@http://forums.bornhorstward.com.au/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:7:19387 flush@http://forums.bornhorstward.com.au/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:7:19832 flush@http://forums.bornhorstward.com.au/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:7:20592 end@http://forums.bornhorstward.com.au/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:7:20937 run@http://forums.bornhorstward.com.au/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:7:22006 u@http://forums.bornhorstward.com.au/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:13:2804 e/i.error@http://forums.bornhorstward.com.au/assets/application-d7d9fb49f298a259400f291dd8ed234f2b5ec1bf52d2ea22551bae7d0118ae13.js:7:7055 c@http://forums.bornhorstward.com.au/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:2:7300 fireWith@http://forums.bornhorstward.com.au/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:2:8054 r@http://forums.bornhorstward.com.au/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:3:11484 n/&lt;@http://forums.bornhorstward.com.au/assets/ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:3:16331 [_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js:29446:6](http://forums.bornhorstward.com.au/assets/_ember_jquery-27e777857b8c0730dacfe09cb11711365d21a5db4f9ee0b85d494e4259cf6cda.js)

XML Parsing Error: syntax error Location: http://forums.bornhorstward.com.au/logs/report_js_error Line Number 1, Column 1:

```

That is the error in the console when I click expand. Let me know if you still want me to get the site pointing out to the real (scary) internet?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [June 14, 2018, 1:58am UTC](https://meta.discourse.org/t/filtering-pages-and-posts-for-shortcode/89829/6 "2018-06-14T01:58:15Z")

</div>

> [@oldManLemon](#):
>
> unfortunately it is behind a firewall as it is for an internal company.

This might be what’s causing the problem.

The easiest solution in the short term would be to create custom excerpts for the posts that you publish to Discourse and deselect the [WP Discourse](https://github.com/discourse/wp-discourse) Use Full Post Content option. If this isn’t possible with the Avada theme then some code will have to be added that hooks into the [WP Discourse](https://github.com/discourse/wp-discourse) `wp_discourse_excerpt` filter.
