Tips & Tricks
Disable search engine on search pages
A good idea when trying to get the most out of your blog is usging the meta tag to tell the web bots to search & index your site. But for good SEO you should apply this code in your header.php
file of your WordPress blog.
<?php if(is_search()) { ?> <meta name="robots" content="noindex, nofollow" /> <?php }?>
This will keep your site from getting a hit from bots over duplicate entries. 🙂
Tips & Tricks
Styling your ordered & unordered list items into 2 columns
In a previous post I showed you how to create a custom widget, then I showed you how to create a widget for your monthly archives, and limit the month’s that show. I am showing the past 4 months in my widget at this time.
One of my readers: Alex asked:
How did you make the archives widget to show the dates separately into two columns?
Now I will show you a CSS trick to create this effect:
First we will give the unordered list a width of 100%:
ul#archives { width:110%; }
Then we will style the <li>
nested inside.
ul#archives li { display:inline; float:left; width:120px; }
And that is it. Please make sure that you clear the float
after your closing </ul>
.
Tips & Tricks
Changing your feedbuner form to work with Google
A lot of you may be using a email form to gather email’s via Feedburner. I am use that by now you know Google has decided to dump feedburner.com and move all feeds through Google Proxy or Feeburner2 which is a Google Server. Here is the new form you will need to put on your site to get new email address’s:
<form action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=YOUR_FEED_NAME', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true"> <p class="form-label">Enter your email address:</p><p><input type="text" style="width:140px" name="email"/></p> <input type="hidden" value="YOUR_FEED_NAME" name="url"/> <input type="hidden" value="<?php bloginfo('name') ?>" name="title"/> <input type="hidden" name="loc" value="en_US"/> <input id="submit" type="submit" value="Subscribe" /> </form>
That’s it, just be sure to change YOUR_FEED_NAME
to your feed name. For example, my feed is now http://feeds2.feedburner.com/WPCult. Where WPCult is now my ID.
Themes
Jon Asked: How to add thumbnails above post on the THiCK theme
I was asked by a reader:
I’m using the THiCK theme for my new design blog. I noticed you were able to add thumbnail images above your blog posts on the home page. What would I need to do to enable this on my blog?
Well Jon, this can be done very simple, since the theme is already using the Tim Thumb script.
What you will need to do is find in your index.php
file, the second loop. Which you can find on line 40
.
<?php query_posts('offset=1&showposts=' . get_option('woo_other_entries') . '&cat=-' . $GLOBALS['ex_asides'] ); ?> <?php while (have_posts()) : the_post(); ?> <div class="post"> <h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="post-meta"><?php the_time('j/m/y'); ?> <span>|</span> <?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?></div> <?php the_excerpt(); ?> </div> <?php endwhile; ?>
Now we are going to add in the code. At line 43
we are going to add:
<?php if (get_option('woo_resize')) { // Check if we should use the image resizer ?> <a title="Continue reading this entry..." href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo get_post_meta($post->ID, "image", $single = true); ?>&h=80&w=280&zc=1&q=90" alt="<?php the_title(); ?>" /></a> <?php } else { ?> <a title="Continue reading this entry..." href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo get_post_meta($post->ID, "image", $single = true); ?>" alt="<?php the_title(); ?>" /></a> <?php } ?>
That’s it, just make sure that in the THiCK options panel you choose the “resize” option, or the image might break the layout. Or you may change the this code: $post->ID, "image",
to: $post->ID, "image_thumb",
and use a separate image for the lower blog.
-
Tips & Tricks3 months ago
WordPress Security Hacks
-
Pages2 weeks ago
Write For Us – Guest Post
-
Showcase4 weeks ago
StylizedWeb.com
-
News2 weeks ago
How to: Show/Hide any div box with jQuery in WordPress
-
Tips & Tricks5 months ago
Remove the title attribute using jQuery
-
Tips & Tricks2 months ago
How to: show/hide a widget in WordPress with jQuery
-
Plugins2 months ago
Top Membership plugins
-
Tips & Tricks4 weeks ago
Limit the characters that display on the_title
You must be logged in to post a comment Login