How Can I Display the Category Description in a Theme with no Category.php or Archive.php?
How Can I Display the Category Description in a Theme with no Category.php or Archive.php?
How Can I Display the Category Description in a Theme with no Category.php or Archive.php?
Limit user description length in characters
How can I remove the product short description from the WooCommerce Mails?
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
esc_html__ is a translation API, specifically it’s equivalent to this: $var = esc_html( __( … ) ); Note that __( is not a language construct, it’s a WordPress function. Your problem is that esc_html escapes your HTML so that its safe to render as text. Swap it for wp_kses_post, and remove the __ function, you … Read more
Resolved! Had to disable the Open Graph option on the Theme control panel!
How to prevent tag “iframe” from being deleted from the heading description of rubric?
You’re not opening and closing the if statement correctly, so the div is always being output. While you can use if statements without the opening and closing parts like this if there’s only one line of code, that doesn’t work if the PHP tags are closed for HTML. So you need to have this: <?php … Read more
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
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” )