Forums

Excluding category from Popularity Contest (4 posts)

  1. cowboytf
    Member
    Posted 3 years ago #

    Is there a way to exclude a particular category from the popularity contest??? My contests get tons of comments which shows them as my most popular posts but I don't want that.

  2. cowboytf
    Member
    Posted 3 years ago #

    Anyone?

  3. jeeremie
    Member
    Posted 3 years ago #

    I have a similar problem. I need to exclude a category from the popularity contest as I use it to display WordPress themes and I don't want the Popularity: n% to show up on this page. Neither, I want this to appear on my pages.

    Alex says on his page:

    If you don't want to edit the .php file, you can add this to your WordPress index.php file:

    @define('AKPC_SHOWPOP', 0);

    I try to add this line of code to my category page but with no success. I put <?php @define('AKPC_SHOWPOP', 0); ?> on top of my category page (category-49.php). Am I doing something wrong?.

    Any ideas? Thanks

  4. jeeremie
    Member
    Posted 3 years ago #

    I have found a way to fix this.

    I add some css on the page where I want to hide popularity contest. For example, on my page category-47.php, I add the following code right after <?php get_header(); ?>:

    <style type="text/css">
    /*<![CDATA[*/
    /* Hide Popularity Contest */
    .akpc_pop {
    	overflow: hidden;
    	visibility: hidden;
    }
    /*]]>*/
    </style>

    It does the trick, though I think there should be another way to do it.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.