Tags » WP Tips

Bit 'o Housekeeping for Authors

I don’t think it will take you long to figure out WordPress, since it’s pretty simple. Here are a couple of things to help, plus a couple of requests about your posts. 356 more words

Desertsky

Using Custom Menu

Activate the menu in functions.php using the below code.

<?php
// This theme uses wp_nav_menu() in one location.
register_nav_menus( array('my_nav' => __( 'Primary Navigation', 'sw theme' ),
'secondary' => __('Secondary Navigation', 'sw theme')
));
?> 249 more words
WP Tips

Pagination Number

For getting the pagination number ie the number of page when pagination is added, add the following code to functions.php and then call the below given template code where ever you in need. 34 more words

WP Tips

Excerpts

Adding read more link :

function new_excerpt_more( $more ) {
	return ' <a href="'. get_permalink( get_the_ID() ) . '">Read More</a>';
}
add_filter( 'excerpt_more', 'new_excerpt_more' ); 159 more words
WP Tips

Adding Breadcrumbs without a Plugin

Add the below code to functions.php

<?php
function wp_breadcrumb() {
echo '<ul id="crumbs">';
if (!is_home()) {
echo '<li><a href="';
echo get_option('home');
echo '">';
echo 'Home';
echo "</a></li>";
echo ' > ';
if (is_category() || is_single()) {
echo '<li>';
the_category(' </li> <li> ');

if (is_single()) {
echo "</li> > <li>";
the_title();
echo '</li> ';
}
} elseif (is_page()) {
echo '<li>';
echo the_title();
echo '</li> ';
}
}
elseif (is_tag()) {single_tag_title();}
elseif (is_day()) {echo"<li>Archive for "; the_time('F jS, Y'); echo'</li>';}
elseif (is_month()) {echo"<li>Archive for "; the_time('F, Y'); echo'</li>';}
elseif (is_year()) {echo"<li>Archive for "; the_time('Y'); echo'</li>';}
elseif (is_author()) {echo"<li>Author Archive"; echo'</li>';}
elseif (isset($_GET['paged']) && !empty($_GET['paged'])) 
{echo "<li>Blog Archives"; echo'</li>';}
elseif (is_search()) {echo"<li>Search Results"; echo'</li>';}
echo '</ul>';
}
?>
… 15 more words
WP Tips

WordPress Tips and Tricks

  1. When you do a return in a post or page, you always get a double space. If you want it single, simply press <shift> <return> on your keyboard.
  2. 719 more words
WPTricks

WordPress Tips and Tricks

  1. When you do a return in a post or page, you always get a double space. If you want it single, simply press <shift> <return> on your keyboard.
  2. 719 more words
Wordpress