Resize header image

How can I access to the css file where is the header’s background image? background: url(« http://xxx.es ») no-repeat scroll center top / 1600px auto transparent; It’s not in the style.css Source: https://wordpress.stackexchange.com/feeds

Create dropdown of users in admin dashboard

I’m trying to make a list of users come up in a widget in the admin dashboard. So far i’ve got it showing up, but I want the list to show a custom field from the user’s profile instead of the normal display_name or ID. My code so far: function wps_userlist_dw() { wp_dropdown_users(array(‘name’ => ‘author’, ‘exclude’ => ‘1’, ‘name’ => ‘author’, ‘selected’ => $user_id, ‘show’ => ‘ID’ )); } function add_wps_userlist_dw() { wp_add_dashboard_widget( ‘wps_userlist_dw’, __( ‘Select a User Below’ ), ‘wps_userlist_dw’ ); } add_action(‘wp_dashboard_setup’, ‘add_wps_userlist_dw’ ); So instead of ID,…

Web Design Weekly #103

Headlines WDW Store is “Open”! So it’s been a long time coming but I have just opened up the WDW Store. Just t-shirts and stickers at the moment but if you enjoy this newsletter, why not take the next step and get your hands on some of the goodies to help support it! (web-design-weekly.com) CSSconf.eu – September 13th 2013, Berlin, Germany At CSSconf.eu, 200 of the best frontend developers and designers will gather in Berlin for a one day conference that will showcase the future of CSS development. Check out…

Include a external PHP file into a WordPress Custom Template

Is it possible to include a external PHP file into a custom template? I’m trying to add a blog into my site. I already have the header, footer, and sidebar layout in my site. Can I use those in my custom template? <?php /* Template Name: Blog */ ?> <?php include( PATH . ‘http://www.example.com/includes/header.php’ ); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div <?php post_class() ?> id= »post-<?php the_ID(); ?> »> <h2><a href= »<?php the_permalink() ?> »> <?php the_title(); ?> </a></h2> <?php include (TEMPLATEPATH . ‘/inc/meta.php’ ); ?> <div class= »entry »> <?php…

Pagination for user list

I am showing all the users by using the get_user() function. But I need to paginate the results. I tried a lot, but didn’t succeed. Here is the code, which doesn’t work as expected: $args = array( ‘meta_query’ => array( array( ‘key’ => ‘ib_s2member_custom_fields’, ‘value’ => trim($_GET[« country »]), ‘compare’ => ‘LIKE’ ), array( ‘key’ => ‘ib_s2member_custom_fields’, ‘value’ => trim($_GET[« city »]), ‘compare’ => ‘LIKE’ ), array( ‘key’ => ‘ib_s2member_custom_fields’, ‘value’ => $first_name, ‘compare’ => ‘LIKE’ ), array( ‘key’ => ‘ib_s2member_custom_fields’, ‘value’ => $last_name, ‘compare’ => ‘LIKE’ ) ) ); $users = get_users( $args…

query specific posts according their custom fields, using sql SELECT

My posts have a bunch of custom fields, to help insert and display custom info easily. I am trying to build a search that would select and display posts according values of specific 2 custom fields. The first field « type » is a radio button in my wp-admin, so in database its meta value is always one word. But second field is checkboxes, so in database meta value has several words, and I need to get posts that have the one visitor selects. What I have so far: Search form, that…

Sublime Text Settings I Use

It’s always interesting to find out how people set up their coding environment. To be honest I don’t think I’ll ever get the perfect setup but what I currently have does a pretty good job. Tweaking your Sublime Text settings is relatively easy but can be a little daunting if you are fan of a GUI. Within Sublime all settings are handled by a simple JSON file. They can be found either under the Sublime Text menu (Sublime Text 2 -> Preferences -> Settings – User) or by the shortcut…

Bulk edit of EXIF data for jpeg images uploaded in the media library?

Although there’s a number of plugins that display EXIF data in your posts or remove EXIF data altogether to save space, I couldn’t find a solution to manually edit EXIF data for whole bunches of images (eg. remove some data, replace other, selectively edit some EXIF fields, etc.). Is there any plugin to do this within the WP dashboard? Otherwise can you recommend any external non-WordPress tool that can log into (S)FTP fetch my files in upoads and can do the same task? The thing is it should work also…

Why use if function_exists?

I noticed a lot of developers of WordPress themes would use this in functions.php if (function_exists(‘register_nav_menus’)) { register_nav_menus (array(‘primary’ => ‘Header Navigation’)); } For me, I alwayse use add_action for every function I am using in functions.php So, the above would be written as: add_action(‘init’, ‘my_register_nav_menus’); function my_register_nav_menus() { register_nav_menus (array(‘primary’ => ‘Header Navigation’)); } I have two questions: Why use the if statement in the first method? Which one is the correct way? Source: https://wordpress.stackexchange.com/feeds

Load a Different Header in WordPress

This little snippet can come in handy when you need to serve a different header on a per page basis. All you need to do is create a new header file – header-yourfilename.php and then put in some logic in your desired template file. In my case I have a header file called header-home.php and in my homepage template I include the following at the top like so: if(is_front_page()) { get_header(‘home’); } else { get_header(); } ?> It is probably worth mentioning that if you want your header on a…