I’m using custom field data, but a couple of posts have a certain custom fields empty. So I’d like to echo something like “if custom field exists =
Tag: wordpress
require_once wordpress error with plugins_url
I’m working on a custom plugin for wordpress to show a maintenance mode screen to users. Ive followed a guide but I have some truble while I’m debugging the code. xdebug will show me these errors: …
Shortcode from ACF Default Value only working after post is saved
I have this shortcode which is saved in the Default Value text field of an ACF field. The field type is Wysiwig editor. I get the Default Value text by using acf_get_field(‘location_info’)[‘…
Empty alt tags wordpress
I’m using WordPress with Listingpro template, I’ve been looking around for a solution and I’ve found the following: // An attachment/image ID is all that’s needed to retrieve its alt and title …
How to send comment notification message to website admin and post Author using functions.php?
My question is “How to send comment notification to website admin and also post Author?”… In WordPress default function is “Post author received a comment notification message when user add any …
WordPress hook for newly published post that can access to post metadata
I need to do some actions only on newly published posts that requires post metadata. I’ve tried many different hooks, but they all also trigger for other “events” like updating post, or if they …
Trying to sort by price but not working in WordPress
I have a function that group the products and I want to sort in ascending order by the price. I even tried to use “sort() function but display any output. I have several options with Array_multisort(),…
Recent posts being queried to Custom taxonomy post
I was trying to show posts from custom taxonomy to the index page but when I query the results posts that were recently added and has no relation to the taxonomy are also found. $args = array( …
Woocommerce print simple product attributes on cart and checkout, like variable attributes
I want to show attibutes from a simple product, in cart and checkout. Just like variable products does, but there is only one attibute. See image below: Is this possible to achive with PHP? I was …
Search value of custom coulmn in Woocommerce Admin Orders list
I got a help from people here to create a coulmn in the woocommerce>orders table to preview the description of the first product in the order only. by the code below: Now how can i make it searchable …