Modify Javascript Configuration Options for Theme Customizer Colour Picker

The color picker thing is registered as a jQuery UI widget, so you could modify its prototype object before the widget is used in the page: add_action(‘customize_controls_print_footer_scripts’, function(){ ?> <script> jQuery(document).ready(function($){ $.wp.wpColorPicker.prototype.options = { border: false, // other options here… }; }); </script> <?php }); (You should put that in your .js file)

Do I really need the div class entry?

No specific markup is required in a theme. The only exception are themes published on wordpress.org, they have to follow the guidelines. And even there, <div class=”entry”> is not required. The only parts you have to use are these: while ( have_posts() ) { the_post(); print ‘<h2>’ . get_the_title() . ‘</h2>’; the_content(); wp_link_pages(); }

How to retrieve an image from a post and display it before excerpt of a post? [duplicate]

if it is the “Featured Image” of your post, you can use: <?php // check if the post has a Post Thumbnail assigned to it. if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?> check: the_post_thumbnail function else if you want to get the first image inside your post, you can use somthing like that: function … Read more

Display site admin profile fields in header.php

Ok I figured a way to do it. If anyone else is interested, here’s the code. It first gets the user id of the admin of the blog, and then it uses the id to pull the meta from the profile fields. For one field — <?php $thisblog = $current_blog->blog_id; $user_id_from_email = get_user_id_from_string( get_blog_option($thisblog, ‘admin_email’)); … Read more