Relate term to term?

Wow, it just works… I can use wp_set_object_terms() to set a term to a term… $term_taxonomy_ids = wp_set_object_terms( $bill_term_id, $microsoft_term_id, ‘company’ ); And I can retrieve the company connected to a person with wp_get_object_terms like… $bills_company_terms = wp_get_object_terms($bill_term_id, ‘company’); The only thing is, how can I put a backend interface on these relationships?

WP Query – Show custom posts only if user contain some user meta

You could approach in two steps. First get all the users that match your criteria $user_ids = get_users([ ‘meta_key’ => ‘activeacc’, ‘meta_value’ => true, // or whatever value you are storing ‘fields’ => ‘ID’, ]); and then run your WP_Query for only those users $properties = new WP_Query([ ‘post_type’ => ‘property’, ‘author__in’ => $user_ids, ]); … Read more

Create custom API endpoint to change custom header image

The header image falls under what WordPress calls theme modification values. To update that type of value, use the function set_theme_mod() function cs_set_logo($request) { set_theme_mod(‘header_image’, $request->get_param(‘new_header_image’)); return new WP_REST_Response(null, 200); } add_action(‘rest_api_init’, function() { register_rest_route(‘cs/v1’, ‘changelogo’, [ ‘methods’ => ‘POST’, ‘callback’ => ‘cs_set_logo’ ]) });

child theme font awesome icons not working

In your CSS, make sure you have this rule: .screen-reader-text{ display:none; } #menu-social li[class*=’fa-‘]:before{ content:”; } #menu-social li[class*=’fa-codepen’] > a:before{ content:’\f1cb’; } #menu-social li[class*=’fa-github’] > a:before{ content:’\f09b’; } #menu-social li[class*=’fa-youtube’] > a:before{ content:’\f167′; } What you’re seeing is labels intended to improve accessibility for the visually impaired so that their screen reader knows what to … Read more