Featured Image meta box shows at the bottom?

The add_meta_box code you’ve posted does certainly register the metabox to the bottom of the side area. If the box is shown in the center then i imagine it’s because you’ve(at some point) moved the metabox, as can be done with any of the metaboxes(all drag and drop). WordPress remembers where you move boxes to, … Read more

Displaying caption with featured image

To use this you will need to add this to in place of your themes thumbnail function: function your_thumbnail_caption($html, $post_id, $post_thumbnail_id, $size, $attr) { $attachment =& get_post($post_thumbnail_id); if ($attachment->post_excerpt || $attachment->post_content) { $html .= ‘<p class=”thumbcaption”>’; if ($attachment->post_excerpt) { $html .= ‘<span class=”captitle”>’.$attachment->post_excerpt.'</span> ‘; } $html .= $attachment->post_content.'</p>’; } return $html; } add_action(‘post_thumbnail_html’, ‘your_thumbnail_caption’, null, … Read more

WordPress image crop probems

You don’t need to do manual cropping; just create a custom image size, and WordPress will perform the cropping on image upload. e.g. in functions.php: add_image_size( ‘portfolio-thumbnail’, 214, 187, true ); Then in your portfolio template, inside the Loop: the_post_thumbnail( ‘portfolio-thumbnail’ ); (I assume you know how to handle the rest of the output, such … Read more

Featured Image Link to next post?

Something like this should work for your single.php template: <?php $next_post = get_adjacent_post( false,”,false ); if( isset($next_post->ID) ): $next_id = $next_post->ID; else: $next_post = new WP_Query( ‘posts_per_page=1&post_type=photo&order=ASC’ ); $next_id = $next_post->post->ID; endif; ?> <a href=”https://wordpress.stackexchange.com/questions/27977/<?php echo get_permalink( $next_id ); ?>”> <?php echo get_the_post_thumbnail( $next_id, ‘thumbnail’ ); ?> </a>

Best Way to Display Posts by Tag (not category)

Query first set of posts (probably with get_posts(), unless you feel up to using WP_Query directly). Loop through it, display, save their IDs in some variable. Loop through them again, display thumbnails. Query second set of posts, excluding IDs saved earlier via post__not_in. Loop through it and display.

Easy way to update a single translation entry without having to translate

Sure, the gettext filter does exactly what you require. Here’s some code that should work out of the box: function wpse31449_translate_my_stuff($translation, $text, $domain) { if ($text == ‘Featured Image’) return ‘Post Image’; return $translation; } add_filter( ‘gettext’, ‘wpse31449_translate_my_stuff’, null, 3 ); Note: if the translation is retrieved with a gettext context (_x() and _ex()) then … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)