Get taxonomy url, name, post count & image

Don´t know how this plugin works in detail but i would try this: <?php $taxonomy = ‘channel’; $tax_terms = get_terms($taxonomy); ?> <ul> <?php foreach ($tax_terms as $tax_term) { ?> <li> <?php echo esc_attr(get_term_link($tax_term, $taxonomy)); ?> <?php echo $tax_term->name; ?> <?php echo $tax_term->count; ?> <?php print apply_filters( ‘taxonomy-images-queried-term-image’, ” ); ?> </li> <?php } ?> </ul>

How can I add bigger image in my blog post?

Seems like you have fetched the thumbnail size image. You can fetch/show the full image url that you have uploaded using $imgsrc = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), “full” ); $imgsrc = $imgsrc[0]; echo $imgsrc; Hope that helps!!

Set featured image on creating new post

Ok, it’s my fault. I’ve installed a “blank”-theme to have a blank frontend (because I only use the API) – but I didn’t realize that a theme changes something in the Admin Frontend. By adding this to the functions.php I re-enabled the box: add_theme_support(‘post-thumbnails’);

Modify media file markup output

WordPress has a filter image_send_to_editor which lets you modify the html that is generated by the media editor. Usage: add_filter (‘image_send_to_editor’, ‘wpse264886_filter_image’, 10, 8); function wpse264886_filter_image ($html, $id, $caption, $title, $align, $url, $size, $alt) { $html=”<span> … </span>” . $html; return $html; } This will insert the spans always, however, not only when there is … Read more

WP query retrieve the src of attached image

You can use wp_get_attachment_image_src and get your desired sized image and then pass onto your array : foreach( $posts as $post ) { $imgsrc = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), “medium” ); $imgsrc = $imgsrc[0]; $output[] = array( ‘id’ => $post->ID, ‘title’ => $post->post_title, ‘count’ => $post->custom_total_hits, ‘soundcloud_url’ => $post->soundcloud_song, ‘soundcloud_id’ => $post->soundcloud_ids, ‘link’ => get_permalink($post), ‘image_src’ => … Read more

How to Make Only Images Connected to a Post Show? Not Entire Media Collection?

add_action( ‘admin_footer-post-new.php’, ‘firmasite_mediapanel_lock_uploaded’ ); add_action( ‘admin_footer-post.php’, ‘firmasite_mediapanel_lock_uploaded’ ); function firmasite_mediapanel_lock_uploaded() { ?> <script type=”text/javascript”> jQuery(document).on(“DOMNodeInserted”, function(){ // Lock uploads to “Uploaded to this post” jQuery(‘select.attachment-filters [value=”uploaded”]’).attr( ‘selected’, true ).parent().trigger(‘change’); }); </script> <?php } Just place that into your child-theme’s functions.php file 🙂

How to display posts with images in fullscreen slider

You can use this code bellow with Query: <div class=”w3-content w3-display-container”> <?php $slider = new WP_Query(array( ‘post_type’ => ‘post’, ‘posts_per_page’ => 5, ‘post_status’ => ‘publish’, )); if($slider->have_posts()) : while($slider->have_posts()) : $slider->the_post(); ?> <div class=”w3-display-container mySlides”> <a href=””> <?php the_post_thumbnail(‘large’); ?> <div class=”w3-display-bottomleft w3-large w3-container w3-padding-16 w3-black”> Trolltunga, Norway </div> </a> </div> <?php endwhile; endif; ?> … Read more