Use dedicated functions

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

Redirecting non-logged in users trying to view Group pages but not the Group directory

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

Filter custom post type admin list by custom meta column, where the column is another custom posts meta value

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