Wordpress Featured Image Question

7 replies
  • WEB DESIGN
  • |
I have a Wordpress site with 153 posts in one of the categories.

I want to use the same featured image for all 153 posts in that one category.

Is there a plugin that can do this? I'm having a hard time finding one that will do what I need it to do without having to edit the code.

Any suggestions?

Rich
#featured #image #question #wordpress
  • Profile picture of the author Patrick
    Instead of using it as featured image, why not add the code for the image in the single.php file so that it shows up for every post.
    {{ DiscussionBoard.errors[6543385].message }}
    • Profile picture of the author marketingrep4u
      Originally Posted by schwarzes View Post

      Instead of using it as featured image, why not add the code for the image in the single.php file so that it shows up for every post.
      Can it be done for only a single category? I have other categories in which the posts have their own featured image and I don't want to change those.
      {{ DiscussionBoard.errors[6543474].message }}
  • Profile picture of the author seopress
    Originally Posted by marketingrep4u View Post

    Is there a plugin that can do this? I'm having a hard time finding one that will do what I need it to do without having to edit the code.
    Rich,
    I have not used this one, but it looks like what you're looking for.

    WordPress › Get the Image « WordPress Plugins

    Regards,
    Dave Seldon
    {{ DiscussionBoard.errors[6544854].message }}
  • Profile picture of the author locke815
    If you wish to do the simple straightforward way, upload the image into the library. Then just go to every post and put it as your featured image.
    {{ DiscussionBoard.errors[6544970].message }}
  • Profile picture of the author failideas
    you can use in_category to achieve that
    look here Function Reference/in category « WordPress Codex and check the example
    this will solve your problem
    Signature
    Dental WordPress Theme - Dentist WP Theme - Lawyer WordPress Theme

    ++ Theme Release News and Promotions > submit here
    Affiliates - wanna make good money. Subscribe here Affiliates List
    {{ DiscussionBoard.errors[6545043].message }}
    • Profile picture of the author marketingrep4u
      Originally Posted by failideas View Post

      you can use in_category to achieve that
      look here Function Reference/in category « WordPress Codex and check the example
      this will solve your problem
      I'm sure it will, but it's out of my league.

      I checked it out, but don't have any idea on how to implement it.

      Any ideas?
      {{ DiscussionBoard.errors[6556004].message }}
      • Profile picture of the author wemakelogo
        Please backup your files before you edit, this solution doesn't work for sub categories, and if your theme follows different coding style this may return errors.
        check this solution


        select your function.php file in your wordpress theme search for
        PHP Code:
        <?php the_post_thumbnail'thumbnail' ); ?>
        Then Upload your default image into media directory



        replace above code with
        PHP Code:
        <?php if (  (function_exists('has_post_thumbnail')) && (has_post_thumbnail())) : ?>

        <?php the_post_thumbnail('thumbnail'); ?>

        <?php else :?>

        <img src="<?php bloginfo('template_directory'); ?>/your image directory/<?php  get_the_category(); echo ->cat_name?>.jpg" /> 

        <?php endif;?>
        Plugin solution
        if you're not comfortable editing files try : category thumbnail plugin
        {{ DiscussionBoard.errors[6556914].message }}

Trending Topics