Debugging slow WordPress Theme Customizer (Any option similar to Query Monitor)?

It turns out Query Monitor is, in fact, present in Customizer view. For some reason, I never once scrolled down to the bottom (or just didn’t pay attention). Just the debug/admin bar is not visible. Also, you can do this to get the admin bar in theme customizer: add_filter(‘show_admin_bar’, ‘__return_true’); Source Another useful tool is … Read more

CSS loading as empty file in Custom Theme

This looks like an issue of “File Permission” to me. Please check the file permissions on the involved folders and files. You should find an option to change permission on the top bar or by right-clicking in cpanel. On the other hand, you can also right-click on a folder or a file and change its … Read more

Theme editing “post thumbnail” help

Well, I have set the featured image or any other from post with this code: Get the image $image_id=get_post_thumbnail_id(get_the_ID()); $image_url = wp_get_attachment_image_src($image_id,’full’); $image_url=$image_url[0]; Set the image as background <div id=”full” class=”full float-left” style=”background-image:url(<?php get_image_url(); ?>);”> Your content here. </div> Next, one example I made few years ago taking the image from random post, the image … Read more

Get the image title and alt from custom query

At the top of your code, just after $large_image, you can add this : $image_alt = get_post_meta((int)get_post_meta( get_the_ID() , “_thumbnail_id” , true ), ‘_wp_attachment_image_alt’, true); $image_title = get_the_title((int)get_post_meta( get_the_ID() , “_thumbnail_id” , true )); The alt for attachment is stock in post_meta (_wp_attachment_image_alt), the title is a post_title. And then your replace the value in … Read more