themes
Best location for theme translation files
I usually store language files in /languages folder that is located in theme folder and it’s also recommended location by WordPress as well. However, it still doesn’t look like the best solution because files will be overwritten after theme updates.
Change Default Image HTML
I am making a WordPress theme and want to change the default image html. For example if you upload an image using WordPress uploader it generates the following html for your images
if ( is_home() && ! is_front_page() )
I see the following code a lot in index.php files. I understand that is_front_page() returns true when viewing the Site Front Page (whether displaying the blog posts index or a static page), while is_home() returns true when viewing the Blog Posts Index (whether displayed on the front page or on a static page). I am still somewhat stumped about the use of the following code –
How do register_sidebar() and get_sidebar() work together?
Disclaimer: I am brand spanking new to WP.
theme path in javascript file
I need to include the path to my theme file within a javascript file. How would I go about this? I have already tried:
Hide prices and checkout functionality in woocommerce
I know this question might be too broad, but I’m looking for a bit of direction. My client has a woocommerce store with 30-40 products. For whatever reason they do not want to sell online anymore, but they want to retain the product pages, information, etc. on their website.
Link to specific Customizer section
I’ve got a site with a few extra Customizer sections. Is there a way to link directly to these so that section open when the page loads?
Using classes instead of global functions in functions.php
In many themes I’ve seen (including TwentyEleven) and in the examples I’ve found online, when building the functions.php file for a theme all functionality is declared in a global scope. To clarify, this is what a typical functions file looks like:
Prevent WordPress from automatically installing a new theme each year
Is there a setting for new disabling new yearly themes? Each year my WordPress installation automatically installs a new theme which I then delete. For example, this year the theme Twenty Twenty-Two was installed.