custom fields for categories (3 posts)

  1. clarkbp
    Posted 7 years ago #

    My site: http://thefiresidepost.com/

    I am having trouble with a specific functionality that I am trying to add to my main page. I have a section on the right next to my lead story that is for featured articles. In order to show images there, I have to use custom fields in the write post panel. I have assigned categories to each of the featured article spots so that every time a new post is published in a category it automatically shows up on the front page. I want to automate the process for adding custom fields as I have several contributors and they don't always use the custom fields. If I could assign the custom fields to the categories, then I could automate the image that shows up with the posts on the main page. I installed a plug in from here to do that, but it doesn't seem to do the trick. Are there any other ways to use custom fields with categories for my purpose? Other ideas for automating an image that will show up in the featured articles section on the main page?

    Thanks in advance.

  2. moshu
    Posted 7 years ago #

  3. clarkbp
    Posted 7 years ago #

    that plugin is great! Thanks, Moshu. It actually solves the issue, but brings to light another problem that I have with that section. In the index.php file, I have assigned categories to those spots. The code looks like this:

    // "Featured articles" module begins
    query_posts('showposts=6&cat=array(3514,1165,3516,3507,1090)&offset=1'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="feature"><?php if (function_exists('get_cat_icon')) get_cat_icon(); ?> " rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('url'); echo '/'; echo get_option('upload_path'); echo '/';

    The problem is that some of the posts in the featured articles are not from any of these categories. How can I have one article from each of those categories displayed in the featured articles section?

Topic Closed

This topic has been closed to new replies.

About this Topic