New answers tagged

0

I'd say register a custom post type, eg. cat_image, so the images can be uploaded to a post using the existing featured image metabox. You could sync the data using wp_insert_post matching the widget ID to the custom post slug..? // to match widget to an existing custom post // similar to get_post but can use slug (if no post parents) $slug = $instance['id'...


1

What am i missing? 'tag' may be a valid argument for get_posts() via WP_Query, but requires the tag slug in that case. Try using 'tag_id' instead. get_posts() apparently enables 'category', but expects the the ID, even though in WP_Query the same argument is 'cat' (vs. 'category_name', et al). A little confusing, perhaps, altogether. I know it still ...


0

The most elegant way is to use wp media regenerate. From the example: # re-generate all thumbnails, without confirmation wp media regenerate --yes


1

Try using the_post_thumbnail WP function, inside your <li id="news-single"> markup definition: <li id="news-single"> <a href="<?php echo esc_url( $item->get_permalink() ); ?>" target="_blank" title="<?php printf( __( 'Posted %s', 'my-text-domain' ), $item->get_date('j F Y | g:i a') ); ?>"> ...



Top 50 recent answers are included