How do you change the site preview description/thumbnail

For stock WordPress, this is inside your site’s dashboard (example.com/wp-admin/) head to Settings > General. There you should see the title and description of your site. If you have an SEO plugin (like Yoast or SEO Framework), then you would need to check inside the settings of the plugin. Finally, if those don’t work, you … Read more

How to display category and tag descriptions in a post

First of all, remember that a post can have multiple categories, so you’ll have to handle an array and then print the results. To get see what categories are attached to your post, print the value from the get_the_category function inside a <pre></pre> (which formats the code): $categories = get_the_category(); echo ‘<pre>’; var_dump($categories); echo ‘</pre>’; … Read more

How to test If a post has a particular term

You can test if a post has a particular term assigned to it with the has_term function. E.g. if ( has_term( ‘term-slug’, ‘taxonomy-slug’ ) ) { // do stuff } With this you can test if your “post” has a particular “term” ( aka if your “product” has a particular “product_cat” )