Include an image within auto the_excerpt?

Yes, you can do that, but you’ll need to tweak the <?php the_excerpt(); ?> function. This is a good article on how to do that: http://aaronrussell.co.uk/legacy/improving-wordpress-the_excerpt/ To sum up the article in case it goes away, put this in your theme’s functions.php file: function improved_trim_excerpt($text) { global $post; if ( ” == $text ) { … Read more

Animated GIF on WordPress posts? [closed]

Animated gifs will not be animated when resized. I see that you’re using the full sized image, but there are parameters added to the src attribute (probably due to some plugin or your theme): From the source: <img class=”size-full wp-image-4604″ title=”Koch snoflake progression” alt=”” src=”http://wewanttolearn.files.wordpress.com/2012/10/snowflake-diagrams1.gif?w=545&amp;h=472″ height=”472″ width=”545″> Take off the parameters ?w=545&amp;h=472, and it should … Read more

Custom header tiling?

You are putting an image into the style attribute – this is wrong. You only need the path, not a tag: <div class=”art-header” style=”background-image:url(“https://wordpress.stackexchange.com/questions/71185/<?php header_image(); ?>”); background-repeat:repeat; height:<?php echo get_custom_header()->height; ?>px; width:<?php echo get_custom_header()->width;?>px;”> </div> After seeing the issue at hand, I would instead suggest this: your HTML: <div class=”art-header”>….</div> Anywhere on the same file … Read more

How to get Image `alt` value from WordPress image attachment?

This looks like how you should use WCK: <?php foreach( get_cfc_meta( ‘testimonialsbox’ ) as $key => $value ){ ?> <?php $author_testimonial = $key[‘author_testimonial’]; ?> <?php $photo_obj = get_cfc_field( ‘testimonialsbox’,’photo’, false, $key ); ?> <div class=”col-md-6 col-sm-6″> <?php echo $author_testimonial; ?> <div class=”author-det”> <img src=”https://wordpress.stackexchange.com/questions/279399/<?php echo $photo_obj[“url’] ?>” alt=”https://wordpress.stackexchange.com/questions/279399/<?php echo $photo_obj[“alt’]; ?>”/> </div> </div> <?php } … Read more

WP 5.3 Removing Default WordPress Image Sizes

Using the intermediate_image_sizes_advanced filter was not working for me. However, the intermediate_image_sizes works and the $default_sizes array is an indexed array, not an associative array. In every single example that I have found for using the intermediate_image_sizes_advanced filter, the answer’s are unsetting the image sizes from an associative array. The following worked for me in … Read more

fetch images and videos

The problem with this is that each sites content is formated differently. If there was only one site you were wanting to pull from you maybe able to use curl() and then sort though the content. A better idea may be to grab content from the sites RSS feed and sort though and grab what … Read more

how to move from content and place them elsewhere on a page template?

You could use, for example, the_content filter, run a regex to remove the images and grab them in a variable, then print that variable wherever you want. For example, appending all images to the end of the content: add_filter( ‘the_content’, ‘my_the_content_filter’ ); function my_the_content_filter($content) { //$matches will be an array with all images preg_match_all(“/<img[^>]+\>/i”, $content, … Read more