What are the ADVANTAGES of ORIGINAL wordpress template structure?

First, as @Toscho implies, the get_header() and get_footer() template tags simply include files named header.php and footer.php, respectively. Both template tags are called from within template files, and you can separate content between template file (index.php) and template part file (header.php, footer.php) any way you want. So, WordPress certainly can accommodate your latter example. That … Read more

How to limit wordpress menu depth in admin panel

Follow up on @jmarceli’s and @squarecandy’s great answers. Here is a solution that allows for: Easier scaling (set an object in the php action) Updates to the correct menu depth when the location checkboxes are changed /** * Limit max menu depth in admin panel */ function limit_admin_menu_depth($hook) { if ($hook != ‘nav-menus.php’) return; wp_register_script(‘limit-admin-menu-depth’, … Read more

How to know if a child theme is being used?

Read the stylesheet. A child stylesheet must have Template: somethemename to function as a child theme. Look in Appearance -> Themes. A child theme should have a notice about requiring a parent theme. Use code similar to this (note: debugging only): add_action( ‘wp_head’, function () { if (get_template_directory() === get_stylesheet_directory()) { echo ‘not a child’; … Read more

How to make native video player full width?

I added this to my style.css and now the video player is fully responsive! .wp-video, video.wp-video-shortcode, .mejs-container, .mejs-overlay.load { width: 100% !important; height: 100% !important; } .mejs-container { padding-top: 56.25%; } .wp-video, video.wp-video-shortcode { max-width: 100% !important; } video.wp-video-shortcode { position: relative; } .mejs-mediaelement { position: absolute; top: 0; right: 0; bottom: 0; left: 0; … Read more

Is it possible ( or advisable) to allow open access to the new theme customizer for potential clients?

Just an idea: Make a user called ‘Guest’ and look up the user ID When redirecting your potential clients to the admin page, redirect to a script that’s logging in your clients as the guest user (Code #1) Add an WordPress action to disallow the user when logged in as ‘Guest’ and not on customize.php … Read more

WP 3.4 – what action/hook is called when theme customisation is saved?

The settings are saved via ajax, with the action customize_save. In the wp-includes/class-wp-customize-manager.php class, the callback for this ajax method is the save method (see source) This triggers the customize_save action, prior to updating each of the settings. Each setting is actually an instance of the class WP_Customize_Setting and saving the setting triggers the action … Read more

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