Get Custom Post Type Posts
The following code will display the posts from a specific custom post type. <?php $options = array( 'post_type' => 'post_type_name', 'posts_per_page' => -1, 'orderby' => 'date', 'order' => 'ASC', 'paged'…
The following code will display the posts from a specific custom post type. <?php $options = array( 'post_type' => 'post_type_name', 'posts_per_page' => -1, 'orderby' => 'date', 'order' => 'ASC', 'paged'…
The following snippet will limit search results to display blog posts only on your search results page. Copy and paste the following into functions.php function SearchFilter($query) { if ($query->is_search) {…
The following will output a list of the current post's tags.
The following snippet will display the categories in a list for the post. The comma in the parenthesis separates each category with a comma.
Here is how to show the excerpt with a custom length of characters that will not cutoff the word. You also do not need to add anything to fucntions.php for…
Here is how to remove the p tag from automatically generating when you use the_content. In the template file you want to strip the p tag from simply add the…