Simple Styles for Horizontal Rules, That is, the <hr> element. You could get a lot fancier with an element like a <div> that can hold content, but I like the semantics of a horizontal rule. It’s an emphatic break between two sections of content.
First create a functions.php for your child theme and add
// Show Wp-PageNavi when it's active function twentyeleven_child_content_nav( $nav_id ) { global $wp_query; if ( $wp_query->max_num_pages > 1 ) : ?> <?php /* add wp-pagenavi support for posts */ ?> <?php if(function_exists('wp_pagenavi') ) : ?> <?php wp_pagenavi(); ?> <br /> <?php else: ?> <nav id="<?php echo $nav_id; ?>"> <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3> <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyeleven' ) ); ?></div> <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?></div> </nav><!-- #nav-above --> <?php endif; ?> <?php endif; }
Next copy index.php to your child theme folder and change line 31 to<?php twentyeleven_child_content_nav( 'nav-below' ); ?>
If wp-pagenavi is installed it will show it, if it isn’t, it’ll show the default next/previous
/* Add last_item class to last li in wp_nav_menu lists*/
function add_last_item_class($strHTML) {
$intPos = strripos($strHTML,'menu-item');
printf("%s last_item %s",
substr($strHTML,0,$intPos),
substr($strHTML,$intPos,strlen($strHTML))
);
}
add_filter('wp_nav_menu','add_last_item_class'); Monthly Posts Rate, Names and E-mails of Everybody Who Has Ever Commented, Monthly Comments Rate, What Time Do People Comment?, Most Popular (Top 10) Commenters
I use <?php the_date(); ?> to show a date of my recent post using query_posts, but it’s little bit of strange, coz not all that post showing a date. It’s showing a date but it’s random on the list of my recent post.
Then i use <?php echo get_the_date(); ?> and now in every single post on the list of my recent post is showing a date. Why is that?
This is only reminder for me how to capture screenshot on Mac OS X, I use Mac OS X Snow Leopard 10.6.8.
To copy the entire desktop, press Command-Control-Shift-3 and to capture a portion of the desktop, press Command-Shift-4.
Thats it.
This is a simple hack from Sid05: better pagination in Tumblr.
You can have something like this in your Tumblr:page 1 of 50
by using a couple of simple tag.
This is the code to be add to your theme.
page { CurrentPage } of { TotalPages }
Note: no spaces within the brackets!
You can see it working at the bottom of this page!
Summary
This is an advanced article that contains information about preventing .DS_Store file creation over network connections.
Products Affected
Mac OS X Server 10.6, Mac OS X 10.4, Mac OS X Server 10.4, Mac OS X 10.6, Mac OS X Server 10.5, Mac OS X 10.5
To configure a Mac OS X user account so that .DS_Store files are not created when interacting with a remote file server using the Finder, follow the steps below:
Note: This will affect the user’s interactions with SMB/CIFS, AFP, NFS, and WebDAV servers.
- Open Terminal.
- Execute this command:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
- Either restart the computer or log out and back in to the user account.
If you want to prevent .DS_Store file creation for other users on the same computer, log in to each user account and perform the steps above—or distribute a copy of the newly modified com.apple.desktopservices.plist file to the ~/Library/Preferences folder of other user accounts.
Additional Information
These steps do not prevent the Finder from creating .DS_Store files on the local volume, and these steps do not prevent previously existing .DS_Store files from being copied to the remote file server.
Disabling the creation of .DS_Store files on remote file servers can cause unexpected behavior in the Finder (click here for an example).
When WordPress version which is used in your blog is known, hacker can find proper exploit for exact version of WordPRess.
To remove WordPress version you should do two things:
- check if it’s not hardcoded in header.php or index.php of your current theme(search for ”)
- add few lines of code to functions.php in your current theme:
function no_generator() { return ''; } add_filter( 'the_generator', 'no_generator' );
remove_action( $tag, $function_to_add, $priority, $accepted_args );
This function removes a function attached to a specified action hook. This method can be used to remove default functions attached to a specific action hook and possibly replace them with a substitute.
Important: To remove a hook, the
$function_to_removeand$priorityarguments must match when the hook was added. This goes for both filters and actions. No warning will be given on removal failure.
via: WP Codexy
The following syntax shows an excerpt, only a part of the output you can have in your theme. They result from the standard functions, which are loaded in the head of the theme. Visible, if you search in the file wp-includes/default-filters.php for the Hook wp_head. Not all filters should be deactivated, because in most cases they are useful. But WordPress is not only as classical blog in use and therefore some functions are not necessary.
<link rel="alternate" type="application/rss+xml" title="WP Engineer RSS Feed" href="http://wpengineer.com/feed/" />
<link rel="alternate" type="application/atom+xml" title="WP Engineer Atom Feed" href="http://wpengineer.com/feed/atom/" />
<link rel="pingback" href="http://wpengineer.com/blog/xmlrpc.php" />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://wpengineer.com/xmlrpc.php?rsd" />
<link rel='index' title='WP Engineer' href='http://wpengineer.com' />
<link rel='start' title='Use WordPress 2.7 Offline' href='http://wpengineer.com/use-wordpress-27-offline/' />
<link rel='prev' title='Recents Drafts All Authors' href='http://wpengineer.com/recents-drafts-all-authors/' />
This is an example, not a recommendation where some functions are deactivated. Check your header and turn off what you don’t need. Less markup and better loading time.
remove_action( 'wp_head', 'feed_links_extra', 3 ); // Display the links to the extra feeds such as category feeds
remove_action( 'wp_head', 'feed_links', 2 ); // Display the links to the general feeds: Post and Comment Feed
remove_action( 'wp_head', 'rsd_link' ); // Display the link to the Really Simple Discovery service endpoint, EditURI link
remove_action( 'wp_head', 'wlwmanifest_link' ); // Display the link to the Windows Live Writer manifest file.
remove_action( 'wp_head', 'index_rel_link' ); // index link
remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // prev link
remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // start link
remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 ); // Display relational links for the posts adjacent to the current post.
remove_action( 'wp_head', 'wp_generator' ); // Display the XHTML generator that is generated on the wp_head hook, WP version
source: wpengineer

