wp_customize_image_control default value

I had the same problem a few minutes ago. Here is what I used in the src tag: <?php if (get_theme_mod( ‘custom_logo_image’ )) : echo get_theme_mod( ‘custom_logo_image’); else: echo get_template_directory_uri().’/inc/images/default_logo.png’; endif; ?> It seemed to solve my problem. Let me know if it works for you.

magic-quotes – breaks admin totally

You can check for details on open_basedir in PHP documentation. Your issues very well might be caused by it. Despite that scripts and styles are typically not affected by PHP settings, in case of WP admin by default they are loaded through PHP script for concatenation. It is hard to guess what and how exactly … Read more

Why isn’t my custom function kicking in from my functions.php file?

It isn’t working because you’ve mixed up returning values and echoing values updateToPerfectURLs(the_permalink()); Here updateToPerfectURLs returns its value, but you’ve not printed it out. Try echo/etc Your second problem is the opposite, the_permalink() doesn’t return the permalink, it echos it out. So before you’ve even gotten into the function the permalink is printed out. Use … Read more

Adding header function to theme

This code adds theme support for custom headers which adds a new page under Appearance in the wp dashboard. function themes_custom_header_setup() { add_theme_support( ‘custom-header’, $defaults, array( ‘default-text-color’ => ‘fff’, ‘width’ => 1260, ‘height’ => 240, ‘flex-height’ => true, ‘wp-head-callback’ => ‘themes_header_style’, ‘admin-head-callback’ => ‘themes_admin_header_style’, ‘admin-preview-callback’ => ‘themes_admin_header_image’, ) ) ); } add_action( ‘after_setup_theme’, ‘themes_custom_header_setup’ ); … Read more

Multiple URL from Custom post name

You can add a query var and a rewrite rule to handle the extra URL data- Add the wpd_cf query var to the list of known query vars: function wpd_add_query_var( $query_vars ){ $query_vars[] = ‘wpd_cf’; return $query_vars; } add_filter( ‘query_vars’, ‘wpd_add_query_var’ ); Add a rewrite rule to handle the incoming requests and set the wpd_cf … Read more