default image
Add post formats to Custom Post Types
Add this to your functions.php file. Make sure your change the prefix name to your own. // add post-formats to post_type 'my_custom_post_type' functio Read more
default image
Make WordPress generate additional custom-sized images
Add this to your function.php file and change the highlighted sizes and labels to what you’d like. Visit the WordPress Codex for more informatio Read more
default image
Customizing WordPress Jetpack Related Posts
WordPress’ Jetpack Related Posts module is the best solution in displaying related posts because it doesn’t tax your server resources inst Read more
default image
Alter the amount of posts that are displayed
By default WordPress displays all homepage, categories, post archives, tags and custom post archives based on the number you set in the admin page. Bu Read more
default image
Alter the display of the post count number in WordPress categories
Drop this in your functions file. In the snippet below, I remove the default parentheses around post count numbers and replace them with span tags. Th Read more
default image
Change the WordPress excerpt length
Drop this in your functions file. Change the number to how many words you want to display before the excerpt is truncated with a “read more̶ Read more
default image
Display something only on the last page of a paginated post
In a project of mine, I only wanted Jetpack’s Related Posts to display on the last page of a paginated post. There was no need for the reader to Read more
default image
Automatic link to blog post page
Add this code to your functions.php file: // Generate Link to posts page function archi_get_post_page_url() { if( 'page' == get_option( 'show_on_front Read more
default image
Automatically number each post in WordPress
In some cases I need to automatically number each post starting with the very first being number one. I’m not talking about using post ID here, Read more
default image
Displaying user info
Get current user’s info: <?php     $current_user = wp_get_current_user(); // set variable     echo 'Username: ' . $current_use Read more