You can manage multiple sidebar widgets in WordPress. To do so, you go to the Widgets page in the Admin, and select the Sidebar you want to manage. If you have 1 widgetized sidebar, the name "Sidebar 1" is not a big deal for managing it. But what if you have 5 or ...
View Post
We're currently building a site on
Adii's Premium Gazette WordPress theme (this is an affiliate link). In my opinion, it's an awesome theme particularly because of the design. However, we installed it on the client's server of choice, and the posts on the homepage just wouldn't update. We tested it out on different ...
View Post
The WordPress admin doesn't have a favicon. That means that when you're working with a bunch of tabs open, it's hard to identify which one is for your WordPress admin. Well, Simply Basic has the solution -
simply add one line to wp-admin/admin-header.php that calls the favicon of ...
View Post
Some blogs have alternating background colors for their comments and posts, i.e. a green background for every even comment and post, and a grey background for every odd comment and post. How do they do that?
Alternating Comments Styles
To alternate comments, add the following code to your comments.php template file, under where it says <?php ...
View Post
Being able to link to specific comments in your WordPress blog could be very handy. Good comments can really add a lot of value to a blog, and you or others may want to refer to specific comments in your posts by linking to them. In general, comments can be linked to, but to ...
View Post
//
You may encounter situations where you need to automatically display a thumbnail or image of some kind that will link to posts. Here's an example of this kind of situation: ...
View Post
The title I am referring to here is the title that appears in the top bar of your browser, and is in betweeen <title></title> tags in your code. Apparently, to make it more SEO friendly, the title of the post or article should appear before the title of your blog, but generally themes have ...
View Post
Here's a bit of code to put in your sidebar to display the most recent posts on your blog:
<?php $myposts = get_posts('numberposts=10&offset=1');
foreach($myposts as $post) :?>
<li><a href="<?php the_permalink(); ?>"><?php the_title();?></a></li>
<?php endforeach; ?>
You can set the number of recent posts to appear on the first line of code where it says numberposts=10 - change the 10 ...
View Post
This code is from the
Blog Oh Blog theme, and displays recent comments in the sidebar without the need for a plugin:
<?php
global $wpdb;
$sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,
comment_post_ID, comment_author, comment_date_gmt, comment_approved,
comment_type,comment_author_url,
SUBSTRING(comment_content,1,30) AS com_excerpt
FROM $wpdb->comments
LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =
$wpdb->posts.ID)
WHERE comment_approved = '1' AND comment_type = '' AND
post_password ...
View Post
You may want to display posts from a specific category on the homepage or other pages of your site. For example, you might want to have a box that displays the latest three posts from your News category, or have links to your latest podcasts....
View Post
Using PHP to alternate background colors for comments or posts in WordPress