async upload not working when not logged
I had to change /wp-admin/async-upload.php to /wp-admin/admin-ajax.php to make the hook work.
I had to change /wp-admin/async-upload.php to /wp-admin/admin-ajax.php to make the hook work.
You’ll want to enqueue the script in your functions.php (If this is in a plugin, you could do a little differently). Here’s a sample: function owl_scripts() { wp_enqueue_script( ‘owl-carousel’, get_stylesheet_directory_uri() . ‘js/carousel.js’, array( ‘jquery’ ), ”, true ); wp_enqueue_style( ‘owl-style-min’, get_stylesheet_directory_uri() . ‘css/carousel.css’ ); } add_action( ‘wp_enqueue_scripts’, ‘owl_scripts’ ); This is assuming: You’re using a … Read more
It looks like bp_is_group() is “does the current page belong to a single group” (as opposed to bp_is_groups_directory()): /*** Redirect non logged-in users to registration page if they visit a profile page or a group page other than the groups directory ***/ function gwangi_bp_logged_out_page_template_redirect() { if( ! is_user_logged_in() && ( bp_is_user() || bp_is_group() ) ) … Read more
Change auth_cookie_expiration for specific roles and specific login times
How can I order a post query’s results based on the number of matching taxonomy terms?
One solution may be to get all position ids, where project id matches and compare them with the ‘OR’ comparer. $position_ids = get_positions_in_project($project_id); foreach ($position_ids as $id) { $meta_query[] = array( ‘key’ => ‘feedback_position_relation’, ‘value’ => $id, ‘compare’ => ‘=’, ); } $meta_query[‘relation’] = ‘OR’; $query->set(‘meta_query’, $meta_query) But the problem with this is, that meta … Read more
<?php wp_footer(); ?> remove include and add a semicolon at the end.
Count Gutenberg blocks on the front-end?
How to unset a function from a action inside a class, that is called in another class
Admin Custom Plugin List Files in admin Table