Make youtube iframes obey z-index rules
A client I am building a WordPress site for wants a fixed menu, but has youtube videos in the content that overlap the menu, despite my z-index settings. Here’s how I resolved the issue.
Read More
function sidebar_loginform(){
if (!(current_user_can('level_0'))){
$content = '
<form action="' . get_option( 'home' ) . '/wp-login.php" method="post">
<input type="text" name="log" id="log" value="' . wp_specialchars( stripslashes($user_login), 1 ) . '" size="20" />
<input type="password" name="pwd" id="pwd" size="20" />
<input type="submit" name="submit" value="login" class="button" />
<p>
<label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label>
<input type="hidden" name="redirect_to" value="' . $_SERVER['REQUEST_URI'] . '" />
</p>
</form>';
} else {
$content = '
<a href="' . wp_logout_url( urlencode( $_SERVER['REQUEST_URI'] ) ) . '">logout</a><br />
<a href="' . get_option('home') . '/secret-page/">secret page</a>';
}
return $content;
}
A client I am building a WordPress site for wants a fixed menu, but has youtube videos in the content that overlap the menu, despite my z-index settings. Here’s how I resolved the issue.
Read More
I try and avoid plugins unless it means re-inventing the wheel, so when I needed to create a slider of content from a users youtube channel, this shortcode function came in very handy
Read More
<?php /* take away the Sticky Ability of the Post */ query_posts( 'caller_get_posts=1' ); if ( have_posts() ) : while ( have_posts() ) : the_post(); ... /*Completely exclude Sticky posts from the Loop*/ query_posts( array( "post__not_in" => get_option( "sticky_posts" ) ) ); if ( have_posts() ) : while ( have_posts() ) : the_post(); ... ?>
Querying posts where meta_key is ‘my-custom-key’ and meta_value is ‘x’ is simple enough, but what if you need to query by multiple pairs of meta data? Read on to find out how.
Read More
add_filter( 'wp_nav_menu_items', 'add_search_box', 10, 2 );
function add_search_box( $items, $args ) {
ob_start();
get_search_form();
$searchform = ob_get_contents();
ob_end_clean();
$items .= '<li>' . $searchform . '</li>';
return $items;
}
We’ve been inundated with increasingly complex requests for help with WP-e-Commerce importing, so here is a plugin to help with Category importing
Read More
We built a custom search page by writing our own post query, but we needed to apply pagination. Here’s how we did it…
Read More
There are plenty of functions floating about for limiting the length of a WordPress post title, but what if your title contains single quotes?
Read More
We’ve covered bulk uploading in WP eCommerce previously, but what if you want to bulk update?
Read More