Can any IDE (eg PHPStorm, VS Code) correctly show functions added via require get_template_directory() string results?

In the process of looking this up I determined the correct answer is to use the full local path in my dev environment, and add a comment in the code like /** @define “get_template_directory()” “/home/myuser/mywpproject/wp-content/themes/mytheme” */ And this works for the subsequent references in that file in JetBrains IDE / PHPStorm immediately. Thanks to here … Read more

How toprint informations in footer

Printing content and adding a script to the footer are two different things. If you want to add your banner html in the footer, you can use the wp_footer hook that will trigger when you call the get_footer() function from your theme. You can simple echo your html (or load a template file). function myplugin_wp_footer … Read more

Image cropping isn’t working correctly when using Offload Media

Aye, it’s best if I adhere to policies – as I mentioned in my comment, the fix was painfully obvious updating the provided code to the following & then calling for set image sizes, even if I then had to first define the image sizes, resolved the issue: // Some picture $wp_customize->add_setting( ‘some_setting’, array( ‘default’ … Read more