Media Library it doesn’t show any of the uploaded images after updating wordpress 6.6.2

After a thorough inspection of the database, i saw that the post_type for the images had changed to “post” instead of “attachment“. The solution Update Post mime type from “post_status = inherit” sql: // Mime type – img/jpeg UPDATE wp_posts SET post_type = ‘attachment’ WHERE wp_posts.post_status = ‘inherit’ and wp_posts.post_mime_type = ‘image/jpeg’; // Mime type – img/png UPDATE wp_posts SET post_type = ‘attachment’ WHERE wp_posts.post_status = ‘inherit’ and wp_posts.post_mime_type = ‘image/png’; // Mime type – img/webp UPDATE wp_posts SET post_type = ‘attachment’ WHERE wp_posts.post_status = ‘inherit’ and wp_posts.post_mime_type = ‘image/webp’; // Mime type – … Read more

Button over featured image on hover

Using CSS, you can try just moving the ‘hover’ state a bit higher up the chain. .brbl-blog-item:hover .brbl-overlay{ /*Theme has this set to `transparent` so change to 70% white*/ background: RGBA(255,255,255,0.7); z-index: 1; } .brbl-blog-item:hover .brbl-post-btn{ opacity: 1; z-index: 10; } This does mean that the entire item including the content is subject to the … Read more

How to get a page’s featured image through REST API?

Maybe because the custom REST field (fimg_url) was only being added to posts of the post type and yet your request was for Pages, i.e. posts of the page type.. so try changing the register_rest_field( array(‘post’) to register_rest_field( array(‘post’, ‘page’). See https://developer.wordpress.org/reference/functions/register_rest_field/#parameters. But actually, you can use the _embed parameter to have the full media … Read more

Get the featured image of an ACF relationship field

According to ACF documentation, a foreach loop is to be used to access the items in a Relationship field. Untested: $templates = get_field( ‘field_61318c078a746’ ); foreach ( $templates as $template ) { $template_image_id = absint( get_field( ‘Image’, $template ) ); $template_image_url=”https://example.com/fallback-image.jpg”; if ( ! empty( $template_image_id ) ) { $template_image_url = wp_get_attachment_image_url( $template_image_id, ‘large’ ); … Read more

tech