How to update custom image sizes?
With this plugin you can choose which specific image sizes should be updated: AJAX Thumbnail Rebuild Or you can use Simple Image Sizes, too. More infos on wpbeginner.
With this plugin you can choose which specific image sizes should be updated: AJAX Thumbnail Rebuild Or you can use Simple Image Sizes, too. More infos on wpbeginner.
Looks like it was added because of w3 total cache. if anyone else having this issue you can uncheck the “Prevent caching of objects after settings change ” in the browser cache page , under media block in w3 total cache settings.
For your first question- HTML support for captions was a new feature in wordpress 3.4, if you have any version prior to that, it won’t work I’m not sure if i understood your 2nd question, but to exclude the caption from not displaying on the page, you’ll have to either delete the caption from the … Read more
you need to change the_content(‘Read more’); to the_excerpt(); Then in your functions.php file add_filter(‘excerpt_more’, ‘custom_read_more_link’); function custom_read_more_link($more) { return ‘<a href=”‘get_permalink().'”>Read More</a>’; } Also make sure that you’re calling wp_reset_query() after the while loop. This will achieve what you’re trying to do. A personal suggestion: Please don’t use query_posts, instead create a new instance of … Read more
add_action(“gform_user_registered”, “image_author”, 10, 4); function image_author($user_id, $config, $entry, $user_pass) { $post_id = $entry[“post_id”]; $args = array( ‘post_parent’ => $post_id, ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’ ); $attachments = get_posts($args); if($attachments) : foreach ($attachments as $attachment) : setup_postdata($attachment); $the_post = array(); $the_post[‘ID’] = $attachment->ID; $the_post[‘post_author’] = $user_id; wp_update_post( $the_post ); endforeach; endif; }
You should use dynamic_sidebar()s for that. You can read more about it in Code. They allow you to use widgets, like – for example – a custom menu widget. More about the custom menus inside wp-nav-menu.
In form of a shortcode to render a default WordPress shortcode including all attachments of the given categories: /** * Usage: [catgallery cat=”4,5″] * Attribute: array of category IDs */ add_shortcode(‘catgallery’, ‘wpse_70989_cat_gallery_shortcode’); function wpse_70989_cat_gallery_shortcode($atts) { // $return = ”; // DEBUG: enable for debugging $arr = array(); $cat_in = explode( ‘,’, $atts[‘cat’] ); $catposts = … Read more
Something like (in your single.php) <?php while (have_posts()): the_post(); ?> <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>> <time class=”post-time” datetime=”<?php the_time(‘Y-m-d’); ?>”><?php the_time(‘F j, Y’); ?></time> <?php if (has_post_thumbnail()): ?> <?php $thumbnail_image = get_posts( array( ‘p’ => get_post_thumbnail_id($post->ID), ‘post_type’ => ‘attachment’, ) ); ?> <p class=”thumbnail-caption”> <?php echo $thumbnail_image[0]->post_excerpt; ?></p> <?php the_post_thumbnail(‘full’); ?> <?php endif; … Read more
Refer to the Template Hierarchy for attachment post types: `$mimetype.php $attachment.php single-attachment.php single.php index.php So for an image attachment, name your template file image.php. Then, to link to the single post view for an attachment, you would link to it like any other post: get_the_permalink( $postid ).
Unless i missunderstood you, This should be easy to do without using a plugin… Embed this in your functions.php: function echoDayImage() { // GET CURRENT DAY $currentDay = get_the_time(‘l’); // CHECK DAY AND ECHO SUITABLE IMAGE if($currentDay = ‘Sunday’) {echo TEMPLATEPATH.’/images/Sunday.jpg’;} elseif($currentDay = ‘Monday’) {echo TEMPLATEPATH.’/images/Monday.jpg’;} elseif($currentDay = ‘Tuesday’) {echo TEMPLATEPATH.’/images/Tuesday.jpg’;} elseif($currentDay = ‘Wednesday’) {echo … Read more