Support » Fixing WordPress » Adding a feature category functionality

  • Greetings I’m new to WP and was wondering if the community can point me in the right direction on how to accomplish some added functionality.

    What my client wants is 3 different categories (ie movies, music, tech) with the latest post per category featured on the homepage. So 3 different post from 3 different categories showing.

    1) In my head how I would go abouts doing this is add extra column in the wp_terms table that is Boolean type for feature category.

    2) In edit-tags.php add checkbox for featured category, then when update button click somehow saved checkbox value in the new column created in the wp_terms table. Still need to do RnD on this.

    3)In the front end, first search if any featured categories are true and grab the latest post in that category and display the results.

    So this is how I plan on tackling this feature, but if anyone can give suggestions on how to do this or suggest a pluggin I would be grateful. Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • hi , for lastest post from custom category you can try this code :

    $catquery = new WP_Query( 'cat=3&posts_per_page=10' );
    while($catquery->have_posts()) : $catquery->the_post();
    <li><h3><a>" rel="bookmark"><?php the_title(); ?></a></h3>
    <li><?php the_content(); ?></li>
    <?php endwhile; ?>

    Cool thanks for response. Now is the workflow I mention above the correct way of adding the Feature Category through admin side correct?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding a feature category functionality’ is closed to new replies.