The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Page2cat: Category, Pages & Posts Shortcodes
[resolved] Shortcode in linked page not working (5 posts)

  1. MRLR2
    Posted 3 years ago #

    Hi, thanks for the plugin. I have a page linked to a category. Most of the Page content shows up but any shortcode I have on there does not seem to work. Shortcode shows up as text on the page.

    I've tried wrapping the shortcode in some code but haven't been able to get it working. Any help is much appreciated.


  2. Label Brune
    Posted 3 years ago #

    I have the same problem. I created a page called "Blog" and the short code [showauto], the page displays "Blog" and the short code below. Thank you for your help

  3. Xmod08
    Posted 3 years ago #

    The solution would be in file page2cat/page2cat_class.php line 101, wrap get_the_content() with do_shortcode function. Result would be like this:

    echo '<div class="aptools-category-content">'.do_shortcode(get_the_content()).'</div>';

    If this could be added on the next update, that would be great.

    I tried filtering the content(to avoid changing the core) by adding it to functions.php but doesn't work for me. Here was my code:

    add_filter('the_content', 'do_code', 21);
    function do_code($content) {
    	if(is_category()) {
    		$content = do_shortcode($content);
    	return $content;
  4. swergroup
    Plugin Author

    Posted 3 years ago #

    Hi, it should be fixed in the next update anyway (major bugfix release is scheduled some time after WP 3.6). Thank you for caring!

  5. MRLR2
    Posted 3 years ago #

    @Xmod08 @swergroup - Thank you so much!!!!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Page2cat: Category, Pages & Posts Shortcodes
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.