Show post thumbnail only if it exists using timthumb

As commented above, you don’t have to use TimThumb at all to get additional image sizes for your uploaded images. WordPress ships with the add_image_size() function. // functions.php add_action(‘init’, ‘wpse26655_add_additional_image_sizes’); function wpse26655_add_additional_image_sizes() { add_image_size(‘thumb200x120’, 200, 120, true); } In your template files, you could than query your thumbnail with your desired image size. E.g. <?php … Read more

How to reuse parts of WordPress site e.g. header, footer, part of header for multiple WordPress sites?

I would think that your best bet is option 3 (multisite) if possible. Once you’ve got your network of sites set up you can then specify which menu to use as described here. Doing the other solutions (a more rough and ready ‘hardcoded’ approach) will almost certainly give you headaches in the future. Having multisite … Read more

Toolbox theme using printif statement – help needed understanding code block

The % signs are arguments in the string to be formatted. The s represents a string type argument must be passed. I’ve notated which arguments are connected to which strings being passed in. get_permalink() – %1 string type get_the_date( ‘c’ ) – %2 string type get_the_date() – %3 string type get_author_posts_url( get_the_author_meta( ‘ID’ ) ) … Read more

WordPress Subpages Fancybox Trouble

So, if I understand your question correctly, your problem is that your iframes are showing the theme (nav menu, sidebar, etc.) and you don’t want them to. If that’s the case, I’d recommend creating a new Page Template that is styled after your bio iframe (no menus, no sidebar). There’s more info on creating custom … Read more

Undefined index: debuging error for theme option template snippet

Looking at your actual source, the relevant portion (with line numbers) is this: 745 if ( $_GET[‘page’] == basename(__FILE__) ) { 746 747 if ( ‘save’ == $_REQUEST[‘action’] ) { 748 749 foreach ($options as $value) { 750 update_option( $value[‘id’], $_REQUEST[ $value[‘id’] ] ); } 751 752 foreach ($options as $value) { 753 if( isset( … Read more

URL conflict with a ‘Single Page Layout’

You can handle that with a hash (the way javascript does by default) and have the url become example.com#people, or any other delimiter really. It should be as simple as changing the character you’re parsing the url for. UPDATE: Example code as per comments $args = array( ‘label’ => ‘Your Label’, ‘labels’ => $labels, //define … Read more