Rewrite rule not working, but only when parameter is text
Rewrite rule not working, but only when parameter is text
Rewrite rule not working, but only when parameter is text
I can’t comment due to lack of reputation, so I’ll address the issue rudtek mentioned. Personally, I never came across a host that disables PHP’s rand() function, but in case there is such a lousy host, you can opt for a more efficient way of doing things. What you can do is to get all … Read more
It’s best not to edit theme files directly, because when you update the theme, your changes are lost. Instead, if you need to change things, create a child theme and you can do whatever you need there. To restore the previous file you can either download a fresh copy of your theme, or look through … Read more
The code you have currently is going to create a new post rather than update the post where the shortcode is in use. In order to update the post, you’ll need to include its ID (see the documentation). Here’s how you can update your code to include the ID: global $post; // Use the global … Read more
How to defer javascript from within the functions.php file without losing all styling?
Sorry if I’m being dumb but your query says that br_type must be equal to esc_attr($values[‘category’]) so to put it in a variable you would just: $br_type = esc_attr($values[‘category’]); Or if you want to get it from $query you would look in one of the places mentioned here: How do I get a meta value … Read more
Try get_field() instead of get_field_object().
I don’t think I would use cron jobs for this at all. If I was writing code for it I would probably have a check on the page that just says if the user is part of x group and date is greater than the event start date then render the page, otherwise return a … Read more
PHP “warning include_once(): Failed to open stream” Simple HTML DOM in WordPress Child Theme
I ended up using the the_post hook to add the definitions as the posts are setup. This of course costs another trip to the database for every post but dealing with the duplicate entries proved too difficult. function add_definitions( $post ) { if ( ‘word’ != $post->post_type ) ) return; global $wpdb; $query = “SELECT … Read more