How to hide WooCommerce product title and short description to non logged in users?

Your $description is shown because you concatenated it is your condition in $description = ‘ ‘ . sprintf( __( “To check if this item qualifies for a discount %s an account.”), ” . __(“Log In or Create”) . ” ) . ‘ ‘ . $description; Does the below code helps ? add_filter( ‘woocommerce_short_description’, ‘add_text_before_short_description_for_guests’ ); … Read more

Custom blog post summary on blog index page

I think the easiest way is using the Excerpt field in the editor or add a custom field to enter your summary and then filter https://developer.wordpress.org/reference/hooks/the_excerpt/ to return the right text. Because recognizing automatically the right div will force to parse HTML, and it’s more complicated.

Hide Author By-Line if After Certain Date

It’s probably getting the date as you expect, but the > is essentially a mathematical operator and you’re trying to use it to compare two strings. You can use strtotime() to convert the dates to integers (# of seconds elapsed since 1970-01-01), and compare those. // Hide By-Line add_action(‘wp_head’,’my_head_css’); function my_head_css(){ $excludeDate = date(“2021-06-02”); $postDate … Read more