Wordpress
Echo ACF taxonomy field within a foreach for another taxonomy
I am echoing thumbnails for a list of items within a ‘Show’ custom taxonomy. Within this taxonomy I have additional fields via Advanced Custom Fields / ACF:
How to retrieve taxonomy Metabox fields in frontend
I have a custom taxonomy with custom fields which are being populated with CMB2. I can’t seem to figure out why I am unable to populate this information on the frontend.
If X Amount of Time Has Passed Since Post Was Published, Do Something
if ( human_time_diff( get_the_time( ‘U’ ), current_time( ‘timestamp’ ) ) < strtotime( ‘7 days’ ) ) { echo ‘New!’; } I’ve also tried: if ( get_the_date( ‘U’ ) > strtotime( ‘-7 days’ ) ) if ( get_the_date( ‘U’ ) < strtotime( ‘-7 days’ ) ) if ( get_the_date( ‘U’ ) > strtotime( ‘7 days’ ) … Read more
AJAX wp_insert_user WORKS but responds with “The site is not enabled”
I have a form on my site which has an AJAX event attached. The AJAX event seems to be working up until I call the wp_insert_user function, I don’t understand why but when I put a wp_send_json_success before the function it works, but straight after, even just returning some text I receieve a “The site is not enabled” response.
Get all commenters on a post
I know there are several similar questions, but I couldn’t find the one I wanted.
I want to get all commenters’s on a post. But if there is a commenter who gives more than one comment, then he is not counted double. I don’t want to display them individually like:
Trying to create a shortcode to display categories with a specific product tag
I currently have the following and it is not working:
If I put the shortcode [tagtagtag=246] i get an array to string error
Page get parameter doesn’t work with is_single() function
If exist the page parameter in the blog post, I have to redirect to the 404 page instead of current post URL.
I tried to check the current page type (is singular) and try to get page parameter in the function.php, but I couldn’t. It’s doesn’t work together. I need to implement it only for blog post.
If possible .htaccess redirect also fine
custom plugin not visible to some user roles
My plugin have minimum configuration like below.I can see plugin via WP admin under woocommerce main menu.but cannot see plugin from different role.That role can see woocommerce submenu.Only my custom submenu link not visible.
Use “name” query string to refer to form field instead of pagename
I’m trying to auto-populate a form using url parameters (query strings). The problem is when I use the “name” query string (eg mysite.com/?name=xyz), it is referring to the pagename instead of the Name form field and showing a 404 error.