Check if the Post has Certain Number of Image Attachments
The following snippet of code will check to see if your post or custom post type has any attachments and then allows you to use an if else statement. You…
The following snippet of code will check to see if your post or custom post type has any attachments and then allows you to use an if else statement. You…
The following will list the categories of the current post type. If you want to exclude one of the categories so it does not show add this:
The following snippet will give you just the url for the featured image without wrapping it in any tags. Code credit to: http://www.wpbeginner.com/wp-themes/how-to-get-the-post-thumbnail-url-in-wordpress/
Here is how to setup a custom Wordpress excerpt function with the following criteria: This will allow you to limit the amount of characters displayed in the excerptWhile limiting the…
The following snippet will allow you to show content only if a comment exists for the current post or page. //Comments do not exist // Comments Exist