Results 1 to 6 of 6

Thread: Featured ads by category?

  1. #1
    Thread Starter
    Member pipno's Avatar
    Join Date
    Apr 2010
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Featured ads by category?

    Hi!

    Is it possible to get an option to set Featured ads by category? So i can show featured ads from only one category...

  2. #2
    isdngirl's Avatar
    Join Date
    Apr 2010
    Posts
    29
    Thanks
    0
    Thanked 6 Times in 2 Posts

    Re: Featured ads by category?

    I would like that to alot

  3. #3
    Thread Starter
    Member pipno's Avatar
    Join Date
    Apr 2010
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Featured ads by category?

    I also want to be able to set it up like a non paid service. So all the ads in the category is showing...

  4. #4
    Veteran bellboy's Avatar
    Join Date
    Apr 2010
    Location
    Tokyo, Japan
    Posts
    515
    Thanks
    132
    Thanked 43 Times in 36 Posts

    Re: Featured ads by category?

    What would be great is if we could have "featured ads" per category. By this I mean that if a user is viewing a particular category it would show the featured ads for that particular category at the top just as the front page version does.

  5. #5
    Thread Starter
    Member pipno's Avatar
    Join Date
    Apr 2010
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Featured ads by category?

    Quote Originally Posted by bellboy
    What would be great is if we could have "featured ads" per category. By this I mean that if a user is viewing a particular category it would show the featured ads for that particular category at the top just as the front page version does.
    I`ll support that option also! Good idea!

  6. #6
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    40,718
    Thanks
    166
    Thanked 3,390 Times in 3,261 Posts

    Re: Featured ads by category?

    You can try using the code below. Just copy the formatting of Classipress for the posts and you are good to go. You can paste it just after this <h2><?php _e('Listings for','cp')?> <?php single_cat_title(); ?> (<?php echo $wp_query->found_posts ?>)</h2> in the archive-default.php .

    Code:
    <?php
    $cat = get_query_var('cat');
    $sticky=get_option('sticky_posts');
    $args=array(
      'post__in' => $sticky,
      'category__in'=>array($cat)
       );
    $my_query = new WP_Query($args);
    if( $my_query->have_posts() ) {
      while ($my_query->have_posts()) : $my_query->the_post(); ?>
        <?php the_time('m.d.y') ?> "><?php the_title(); ?>
        <?php
        the_content();
        //this is necessary to show the tags
        global $wp_query;
        $wp_query->in_the_loop = true;
        the_tags();
      endwhile;
    }
    ?>
    I have not yet tested it on my classipress site but I have it working on my other wordpress site. For reference, here's wordpress forum link where I got the code from, http://wordpress.org/support/topic/272324?replies=2" onclick="window.open(this.href);return false;
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Category Description Won't Show For 1 Category (Re-Opened)
    By gomeetpete in forum ClassiPress General Discussion
    Replies: 1
    Last Post: April 14th, 2010, 10:27 AM
  2. Category Description Won't Show For 1 Category
    By gomeetpete in forum ClassiPress General Discussion
    Replies: 2
    Last Post: April 6th, 2010, 12:40 AM
  3. I donīt want to choose a category, I want a default category
    By dvmblues in forum ClassiPress General Discussion
    Replies: 1
    Last Post: March 10th, 2010, 01:57 PM