How to create custom boxes with text inside?

In the page editor, switch to code-editor. Now your text will be within tags… probably a <p> tag. Add css to the tag so it reads: <p style=”border: 1px solid gray”> … </p> Currently, to switch to code-editor, click the 3-dot-menu-button in the right top of the screen/window and then “Code Editor”.

Custom query to filter posts that have current post as a taxonomy [closed]

I made it through! I’ll share how I did in case some other person lacking the php knowledge like me lands in the same spot. add_action(‘elementor_pro/posts/query/projects_designs_query’, function($query) { $post_id = get_the_ID(); $meta_query[] = [ ‘post_type’ => ‘designs’, ‘taxonomy’ => ‘projects’, ‘value’ => $post_id, ‘compare’ => ‘in’, ]; $query->set( ‘meta_query’, $meta_query ); } ); What this … Read more

Query custom post type by category slug

I’ve got an answer that worked perfeclty for me in another forum, so I’ll post here if sometime anyone gets a similar problem $argsPost = array( ‘post_type’=>’album’, ‘orderby’=>’date’, ‘order’ => ‘DESC’, ‘posts_per_page’=>’4’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘albuns_categories’, ‘field’ => ‘slug’, ‘terms’ => array( ‘ANYTERM’ ), ‘operator’ => ‘IN’ ) ) ); =D

Change custom taxonomy after certain time – CPT template

You’ve got a number of issues with you code… if (is_array($expirationtime)) is redundant because get_post_meta will always return an array if the third parameter is false. implode($expirationtime); requires a separator, e.g. implode(‘ ‘, $expirationtime);. strtotime can fail to parse your input resulting in a false value. You will get an error when trying to perform … Read more

Add custom parameter to REST API request of a custom post type?

I solved following this answer and writing: public function query_wasb_messages_by_status( $args, $request ) { if ( ! is_null( $request->get_param( ‘message_status’ ) ) ) { $args[‘meta_query’] = array( ‘_wasb_message_status’ => array( ‘key’ => ‘_wasb_message_status’, ‘value’ => (int) $request->get_param( ‘message_status’ ), ‘compare’ => ‘=’, ‘type’ => ‘numeric’ ) ); } return $args; } add_filter( ‘rest_wasb_message_query’, array( $this, … Read more