[Plugin: Easy Featured Image] After activation admin page with posts is broken
-
I installed plugin and after installation there is problem with admin page with posts. I get only one post and at the end of the line tehre is some error.
-
What error do you get? Than i can see if i can fix it for you
I installed it on my 3.1.2 wp installation. I can see the featured image on the edit.php page, but I can’t find a way to add one to posts that don’t have them yet, or edit ones that do.
Never mind, I found the Add link that appears on posts that have no Featured Image if you hover where they should be. Maybe you should make that always visible instead of just on hover?
Did you enable the featured images, by adding the following in you functions.php in your theme: add_theme_support( ‘post-thumbnails’ );
If you have that in your functions.php do you see the Featured image part in you post edit screen (should look like https://www.blog.web6.org/wp-content/uploads/2010/06/setfeaturedimage.jpg
If you have that you should see an add button when hovering over your post that does not have a featured image.
Ow i see you already found that ?? Basicly the hovering follows wordpress own settings. Cause all other settings for editing posts also only shows up when hovering. But maybe i can make a small adjustment so you can find it easier.
It’s not a problem anymore, now that I know where it is… but maybe for other new users you could have a note about it in the plugin’s description?
P.S. This is extremely helpful, thank you! I’m having to add a featured image to 63 already existing posts, so this is great! Thank you! ??
Yeah that is a good point. I will add it in the plugin description.
And your welcome. I made it for my own site cause i had to add a lot of featured images and i was hating it to do it by going in to every post and seeing which already had an featured image. I’m glad you liked it ?? Would you also be so nice to give the plugin a rating and press the works button (if you agree with it working ofcourse) on the plugin page https://www.ads-software.com/extend/plugins/easy-featured-image/
Right, of course! ?? I got it rated and marked as working.
Oh, I have a suggestion; maybe make the new page come up in a fancybox instead of a new window!Hi there,
Is it ok to post my problem here with the plugin? I am having this error on edit.php
“Fatal error: Call to undefined function has_post_thumbnail() in /home/i2e/public_html/mydomain.com/wp-content/plugins/easy-featured-image/easy_featured_image.php on line 21”
Can it be you did not enable the thumbnails?
To enable post thumbnails, the current theme must include add_theme_support( ‘post-thumbnails’ ); in its functions.php file
Thanks RPG84,
I pretty new to WordPress. Can you tell me where exactly shall I add it? I tried doing that earlier and I got some errors. The site became inaccessible so I uploaded a new functions.php file through ftp.
When you open functions.php (in your theme folder) you will see something like:
<?php
change that to
<?php
if ( function_exists( ‘add_theme_support’ ) ) {
add_theme_support( ‘post-thumbnails’ );
}I don’t see that on my theme. This is what’s in my functions.php:
<?php $includes_path = TEMPLATEPATH . '/includes/'; // Shordcodes require_once (TEMPLATEPATH.'/functions/shortcodes/shortcodes.php'); // Use shortcodes in text widgets. add_filter('widget_text', 'do_shortcode'); // LightBox require('lightbox/wp-lightboxJS.php'); wp_enqueue_script('theme_functions', get_bloginfo('template_url').'/js/functions.js', array('jquery')); function show_posts_nav() { global $wp_query; return ($wp_query->max_num_pages > 1); } require_once(TEMPLATEPATH . '/theme-options.php'); // Register Sidebars if ( function_exists('register_sidebar') ) { register_sidebar(array('name' => 'Top Sidebar','before_widget' => '<li>','after_widget' => '</li>','before_title' => '<h2>','after_title' => '</h2>')); register_sidebar(array('name' => 'Left Sidebar','before_widget' => '<li>','after_widget' => '</li>','before_title' => '<h2>','after_title' => '</h2>')); register_sidebar(array('name' => 'Right Sidebar','before_widget' => '','after_widget' => '','before_title' => '<h2>','after_title' => '</h2>')); } # Displays post image attachment (sizes: thumbnail, medium, full) function dp_attachment_image($postid=0, $size='thumbnail', $attributes='') { if ($postid<1) $postid = get_the_ID(); if ($images = get_children(array( 'post_parent' => $postid, 'post_type' => 'attachment', 'numberposts' => 1, 'post_mime_type' => 'image',))) foreach($images as $image) { $attachment=wp_get_attachment_image_src($image->ID, $size); ?><img src="<?php echo $attachment[0]; ?>" <?php echo $attributes; ?> /><?php } } // Shorten post title function short_title($after = '', $length) { $mytitle = explode(' ', get_the_title(), $length); if (count($mytitle)>=$length) { array_pop($mytitle); $mytitle = implode(" ",$mytitle). $after; } else { $mytitle = implode(" ",$mytitle); } return $mytitle; } // navigation menu if (function_exists('register_nav_menu')) { register_nav_menu('primary', __('Menu')); } // custom background add_custom_background(); // Load Javascript in wp_head require_once ($includes_path . 'theme-js.php'); // Shorten Excerpt text for use in theme function pov_excerpt($text, $chars = 120) { $text = $text." "; $text = substr($text,0,$chars); $text = substr($text,0,strrpos($text,' ')); $text = $text."..."; return $text; } function trim_excerpt($text) { return rtrim($text,'[...]'); } add_filter('get_the_excerpt', 'trim_excerpt'); function widget_mytheme_search() { ?> <li><form class="searchform" method="get" action="<?php bloginfo('home'); ?>/"> <input type="text" value="Search: type and hit enter" onfocus="if (this.value == 'Search: type and hit enter') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search: type and hit enter';}" size="18" maxlength="50" name="s" class="s" /> </form> </li> <?php } if ( function_exists('register_sidebar_widget') ) register_sidebar_widget(__('Search'), 'widget_mytheme_search'); function dojo_comments($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>"> <div id="comment-<?php comment_ID(); ?>"> <p class="title comment-author vcard"> <?php echo get_avatar($comment,$size='48' ); ?> </p> <?php if ($comment->comment_approved == '0') : // If comment is not approved ?> <p class="alert"><em><?php _e('Your comment is awaiting moderation.') ?></em></p> <?php endif; ?> <div class="content"> <?php comment_text() ?> </div> <p class="metadata comment-meta commentmetadata"><small> <?php printf(__('<span class="says">by</span> <cite class="fn">%s</cite>'), get_comment_author_link()) ?> on <a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></a>. <?php comment_reply_link(array_merge( $args, array('reply_text' => '(Reply)', 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?> <?php edit_comment_link(__('(Edit)'),' ','') ?> </small></p> </div> <?php } ?>
Oh sorry, the characters are different in the email. Gosh…
It works now!
Thanks a lot. Will rate the plugin! and click on the button that tells others it works!!!
- The topic ‘[Plugin: Easy Featured Image] After activation admin page with posts is broken’ is closed to new replies.