Change the name of the ‘Default Template’

There is a filter for this since version 4.1; cf. https://github.com/WordPress/WordPress/commit/7cdbac53e8497b346d1009375d36586fb6e5197c You can now use: add_filter(‘default_page_template_title’, function() { return __(‘My default template name’, ‘your_text_domain’); });

How to show a under construction page for a domain but still be able to work on index.php?

You can filter template_include and include a special file for users who are not logged in: /* Plugin Name: T5 Under Construction */ add_filter( ‘template_include’, ‘t5_uc_template’ ); function t5_uc_template( $template ) { $uc_template = dirname( __FILE__ ) . ‘/under-construction.php’; if ( ! is_user_logged_in() ) return $uc_template; if ( ! current_user_can( ‘administrator’ ) ) return $uc_template; … Read more

Custom templates folder

As of WordPress 3.4 you can put your page templates in whatever direct subdirectory you need, it doesn’t sound like you can put them into sub-sub directories but I haven’t tested this. I suggest storing templates into /page-templates/ folder as WordPress seems to recognize it. From WordPress Page Templates Entry: WordPress recognizes the subfolder page-templates. … Read more

How to edit contents of dynamic_sidebar()?

The contents of dynamic_sidebar are pulled from the widgets associated with this “Sidebar” aka “Widget Area” in wp-admin, as @s_ha_dum answered. There is no template file for the sidebar itself. Visit /wp-admin/widgets.php under Appearance -> Widgets and find the widget area titled homepage-infobox. You be able to add/remove widgets and possibly make changes to the … Read more

View WordPress page template usage (or unused)

What you need to do is compare the values of the meta field _wp_page_template, which contains the page template selected for a single page with the available page templates. For this you need to construct an array of used templates, because you want the templates used by all the pages, similar as shown here: Return … Read more

WooCommerce: Change template for single product page

Woo Commerce is off topic as its a plugin and not specifically related to WordPress but what you can do is copy over the single-product.php template to a WooCommerce folder in your child theme. change the file name and modify the file, then use single_template or template_include with the correct conditional tag. single_template function get_custom_post_type_template($single_template) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)