Tag Info

Hot answers tagged

3

No need for post IDs what has no thumbnail. Use meta query to get only those what has thumbnail. Add meta query function get_only_posts_with_images( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( 'meta_query', array( array( 'key' => '_thumbnail_id' ) ) ); } } add_action( 'pre_get_posts', ...


2

You can try the following test plugin, that uses the domDocument class, to see how it works on your HTML. It assumes PHP 5.4+ with LibXML 2.7.8+. <?php /** * Plugin Name: Add Missing Image Title Attributes * Description: For posts in the main loop (Assumes PHP 5.4+ with LibXML 2.7.8+) * Plugin URI: http://wordpress.stackexchange.com/a/188560/26350 ...


1

Some of your images are png: http://www.shoplikeits1999.com/wp-content/uploads/2015/02/Harvest_Moon_64_Coverart.png And that image not 460px by 300px and is being stretched to fit the grid. I would guess that you need to be more careful in which images you upload and how you process the images prior to uploading.


1

It depends on your image and stylesheet location. But this is the syntax: .theme-image { background-image: url('../images/header-img.jpg'); } The above code is for the structure wp-content - themes - your-theme - images - header-img.jpg - css - style.css You are making the browser come one directory before and search for images ...


1

I found a solution based on the code of this page: https://core.trac.wordpress.org/ticket/22180 All attachment files have a post status of 'inherit'. So first you need to add "inherit" as one of the possible post status to search for. You can use the wp_link_query_args filter to do that. function my_wp_link_query_args( $query ) { if (is_admin()){ ...


1

Multiple solutions for defining the images -> Post Thumbnails While creating a new post, you can set the Featured Image which will automatically set the post image. Since your image is full width, you need to set the size of the thumbnail using: https://codex.wordpress.org/Function_Reference/the_post_thumbnail Media Upload Go to Media -> Add New. ...


1

If we can assume that this is done properly for images that are in templates, and you're only concerned about page/post body content, you could use a filter when saving any post or page ( https://codex.wordpress.org/Plugin_API/Action_Reference/save_post ) to scan the content Since this action is triggered right after the post has been saved, you can ...


1

I'm afraid it's not possible to do it without any plugin. Author's image (gravatar) is not published in RSS, and it's computed based on author's e-mail address, which also is not published in RSS... But if you have control over both of these sites, then you could use JSON API/XML RPC to get the newest blog posts - then you could get all info from these ...


1

Good news for WordPress versions 4.2+ Since version 4.2 the handy get_avatar_url() function, introduced as a feature request in ticket #21195 few years ago, now ships with the core: /** * Retrieve the avatar URL. * * @since 4.2.0 * * @param mixed $id_or_email The Gravatar to retrieve a URL for. Accepts a user_id, gravatar md5 hash, * ...


1

There is a simple solution for this. Let the gallery use the 5 column grid system and using the @media-queries we can alter it for tablet and mobile. I just tested it on your given URL and it works perfect. But try to remove any custom codes you have used before since I had to remove it in order to use the following code. /* For displaying 3 columns on ...



Only top voted, non community-wiki answers of a minimum length are eligible