Theme or Plugin: Where should I write my code?

How Sharma just mentioned, both approaches are working well, but depending on the site type and scope and also it depends on the feature that needs to be implemented in your WordPress. If in the future you will change the theme of your WordPress site and you just implemented a feature in your current theme, … Read more

100% width Featured Image Size

Ack, nevermind I just discovered that using get_the_post_thumbnail( $post_id, ‘full’ ); // Original resolution will use the width and height of the featured image. I do apologize for wasting everyone’s time. I should have been a little more patient 😉

Can’t delete theme

You might have a permissions problem with your files. Can you login to your server via SFTP (or FTP)? You should then go to /wp-content/themes folder and find the theme you want to delete in its own folder. You can then delete it there if you have permissions, or change the files to give yourself … Read more

Problem after renaming wordpress template file

If you have WP-CLI installed, try to run wp cache flush or you can put this code into your functions.php function fix_template_caching( WP_Screen $current_screen ) { if ( ! in_array( $current_screen->base, array( ‘post’, ‘edit’, ‘theme-editor’ ), true ) ) { return; } $theme = wp_get_theme(); if ( ! $theme ) { return; } $cache_hash = … Read more