Are theme .php files stored in the database?

No, a theme’s .php files are not stored in the database. Themes should not be hardcoding URLs in their files. However, it’s totally possible for this to happen, particularly with a custom theme or plugins whose developer did not follow best practices. I’d suggest using a search utility such as grep (grepwin is nice for … Read more

Investigating complex themes still slow even with WP caching

Typically page builder themes and plugins are compatible with caching. The reason they still tend to slow down websites is because they are very resource-intensive. In WP there are two main resources – data from the database, and files. Because page builders can do almost anything you can imagine, they have to come with enough … Read more

wp-cli: For development, how can I activate a theme that is on the local disk but not zipped?

[S/O to @TomJNowell whose comments helped me track down the issue. Sharing in case it could help others troubleshoot a similar problem] In my setup, I’m using two Docker containers with different images: wordpress:4.9: wp container wordpesss:cli: wp-cli container In order to allow wp-cli container access to the WordPress config, files, etc., I configured them … Read more

How to get current post user id

To show author avatar per post inside loop you need to modify a little: $current_post_author_id = get_the_author_meta( ‘ID’ ); <?php if (!empty(get_user_meta($current_post_author_id, ‘user_avatar’, true))): ?> <img src=”https://wordpress.stackexchange.com/questions/317789/<?php echo get_user_meta($current_post_author_id,”user_avatar’, true); ?>” alt=”some text”> Try, if it works for you.