WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. MRLR2
    Member
    Posted 1 year 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.

    http://wordpress.org/extend/plugins/page2cat/

  2. Label Brune
    Member
    Posted 1 year ago #

    Hi,
    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
    Member
    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year 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
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.