• Hi all,
    I am trying to use the ShowCategories plugin on a blog I am working on (https://www.teacherstales.co.uk), and I seemed to have got it working (sidebar categories don’t show up in main blog, and are showing in the sidebar) until I realised that the entries that it was showing in the sidebar were old entries. When I post new entries to those categories, they aren’t showing in the sidebar. Here is the code I am using to display each category in the sidebar:
    <?php echo show_category_posts('category=5&scp_limit=1&scp_status=publish&sort_order=DESC&sort_field=post_name'); ?>

    <?php else: ?>
    <?php _e('Sorry, no posts matched your criteria.'); ?> <?php endif; ?>

    There is also an issue with it not displaying in firefox (but it works in IE).
    Can anyone help me? Thanks in advance…
    Hazel

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter hazyd

    (@hazyd)

    Can anyone help?
    Hazel

    I have a problem too. When doing exactly what the doc says:
    To omit categories from your pages, do the following:
    In index.php replace:
    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    with:
    <?php hide_category_posts( ‘category=1’ ); ?>
    <?php if ($hcp_posts) : foreach ($hcp_posts as $post) : start_wp(); ?>
    Get an error:
    Parse error: parse error, unexpected ‘}’ xxxx/index.php on line 50
    And the plugin is activated. Hmm… ???

    Hi, I’m the author of Show Categories.
    Hazyd, could you contact me thru my site (https://mookitty.co.uk/devblog/) or find me on #wordpress (nick: MooKitty) and I’ll help you sort it out.
    Dextrine, somehow, there’s a bracket out of place, double check that all closing brackets have a matching opener.

    I can’t figure out this problem myself, could someone post the solution for future reference.

    Here’s the solution, the documentation is flawed. Change this line:
    <?php if ($hcp_posts) : foreach ($hcp_posts as $post) : start_wp(); ?>
    To this:
    <?php if ($hcp_posts) { foreach ($hcp_posts as $post) { start_wp(); ?>

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problem with Showcategories Plugin’ is closed to new replies.