Support » Fixing WordPress » Problem with tags and fetured image.

  • Hi,
    I made a blog in wordPress. My problem is, I want if user add a new post the the user have to add featured image and minimum 3 tags before publish. If he does not add tags and featured image then the post will not be publish just say a message about this.Can anyone help me in this issue.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi deepbevel,
    Thanks for your reply. when i add this plugin it show error.

    try disabling other plugins. Also, it hasn’t been updated for a year, may not be compatible with the latest version of wp,.

    I haven’t been able to find another like it. However you could try to use custom fields, here’s another plugin which may help.

    Also, maybe check out custom post types, pretty sure you can do that with custom posts. Not sure which method is best or easiest

    I don’t see that this custom fields plugin allows for a featured image, but it does allow for images. There’s a way to display attached images like featured images, I can help with that if you need it.

    Yes,I need help. Can you please write details. I need it vary urgent.


    This custom fields plugin seemed like it was going to be great but I find no documentation on how to get the fields to appear in the selected location. I selected a post category, but how can fields appear in a category which hasn’t been selsected by the author yet? confusing..

    I can show you how to display attached images like featured images, but that won’t solve the problem of making images required.

    I used the Quick Post Widget plugin which had required fields, including image. but the image was embedded in the post. Not sure if it would function like an attachment image.

    okay, got the new required field to show up. I didn’t realize it was part of a field group, and so I didn’t name the group, which make it not appear!

    Anyway some good news, when the image is attched it functions like a gallery image. which means it’s attached to the post. this means you can make the image function like a featured image, even though it’s not.

    first, add a new function:

    function main_image() {
    $files = get_children('post_parent='.get_the_ID().'&post_type=attachment
      if($files) :
        $keys = array_reverse(array_keys($files));
        $num = $keys[$j];
        $image=wp_get_attachment_image($num,'large', true);
        $imagepieces = explode('"', $image);
        $imagepath = $imagepieces[1];
        print "<img src='$main' alt='$the_title' class='frame' />";

    Then, you have to use this in place of the_post_thumbnail, where ever you want the first image attached to a post to appear when there is no featured image assigned.

    <?php if
    (  (function_exists('has_post_thumbnail')) && (has_post_thumbnail())  ) {
    echo get_the_post_thumbnail($post->ID,'thumbnail');
    } else if
    ( (function_exists('main_image')) && (main_image())  ) {
    echo main_image(); } ?>

    also, you’ll have to use css to control the size of the main_image.

    in twentyten theme I did this:

    /* =Controls image size of main_image function
    -------------------------------------------------------------- */
    width: 25%;

    haha this is very cool, I need this too. thanks for making me dig around!

    tried it with a post instead of a page. It works! the image attachment is a required field once the apprppriate category is selected.
    Then, after implimenting the new function,
    the first image attachment for the post appears in the archive or blog page like a featured image.

    However, although the image is attached to the post, the image will not appear in the post without the doing the ussual “insert image” through the media uploader, or by using the [gallery] short code.

    Also, you’ll have to make sure authors use the category which requires the image. Maybe another plugin which limits categories based on user role?

    let me know how it’s going, I’ll help as I can. There’s still more I want to do with this idea, having to do with limiting admin access based on user role. Also want to revisit (I’ve done it before) limiting specific user roles to specific categories for the reason mentioned above.
    I’ll be working on a site for a 200 member art group soon and I want to find the simplest way for members to add galleries. A front end solutution would be ideal, but that could get messy fast.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Problem with tags and fetured image.’ is closed to new replies.