Hide empty custom field

I’m assuming what you want is to hide the text when meta is empty. You can put a conditional check for meta before print: add_action( ‘woocommerce_single_product_summary’, ‘also_available_on_ps4’, 38 ); function also_available_on_ps4() { global $product; if ( has_term( ‘ps4-games’, ‘product_cat’ ) ) { if(get_post_meta( get_the_ID(), ‘also_available’, true )){ echo ‘<b>Also available on:</b>’ . get_post_meta( get_the_ID(), ‘also_available’, … Read more

Shortcode displaying outside the div [duplicate]

You could put all the html in a variable and return it $r = “<div id=\”” . $s[‘id’] . “\”…”; if (!empty($s[‘fb’])) { $r .= “<a href=\” . $s[‘fb’] . “…”; } $r .= “title=\”Follow Us On Facebook\” “; $r .= “target=\”_blank\” “; return $r; But every shortcode on your site should do this, for … Read more

Multiple Notifications SetInterval

There’s two approaches you may want to use here, depending on the notification behavior desired: To notify each user any time there are new notifications: You need to make sure your sql query returns the notifications in a sorted order (preferably with descending data timestamps) and includes a unique identifier/primary ID [PID] for the rows … Read more

Link to an externally created photo albums

You can embed the photo album in a page as follows: As mentiontioned by @amari, load your photoshop album to the server using FTP Create a new Page or Post in WordPress In the editor using text input enter the iframe tag and point it to your uploaded photoshop album as follows: <iframe src=”https://link-to-your-gallery” width=”100%”></iframe> … Read more

Enqueue JS + CSS via a child theme functions.php file?

Your issue is the dependency: array( ” ) That’s setting your stylesheet to have a dependency on a stylesheet whose name is an empty string. If you want to say that there’s no dependency you need to use an empty array: array() Also, your second bit of code is missing an endif, which will cause … Read more