Title: [Plugin: Page Shortcodes Plugin] title/content needs filtering
Last modified: August 19, 2016

---

# [Plugin: Page Shortcodes Plugin] title/content needs filtering

 *  [mrclay](https://wordpress.org/support/users/mrclay/)
 * (@mrclay)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-page-shortcodes-plugin-titlecontent-needs-filtering/)
 * The shortcode output for content and title need to be run through apply_filters().
   Here are a couple functions to replace in PageShortcodesPlugin.php:
 *     ```
       function handleWpShortcode_page_title($atts, $content = null) {
               $page = $this->findPage($atts, $content);
               if ( $page ) return apply_filters('wp_title', $page->post_title);
               return $content;
           }
       ```
   
 *     ```
       function handleWpShortcode_page_content($atts, $content = null) {
               $page = $this->findPage($atts, $content);
               if ( $page ) {
                   $content = $page->post_content;
                   // filtering suggested by http://codex.wordpress.org/Function_Reference/the_content
                   $content = apply_filters('the_content', $content);
                   $content = str_replace(']]>', ']]>', $content);
               }
               return $content;
           }
       ```
   
 * [http://wordpress.org/extend/plugins/page-shortcodes/](http://wordpress.org/extend/plugins/page-shortcodes/)

The topic ‘[Plugin: Page Shortcodes Plugin] title/content needs filtering’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/page-shortcodes.svg)
 * [Page Shortcodes Plugin](https://wordpress.org/plugins/page-shortcodes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/page-shortcodes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/page-shortcodes/)
 * [Active Topics](https://wordpress.org/support/plugin/page-shortcodes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/page-shortcodes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/page-shortcodes/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [mrclay](https://wordpress.org/support/users/mrclay/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-page-shortcodes-plugin-titlecontent-needs-filtering/)
 * Status: not resolved