filter a list by gender

There is a convenient helper function in WP core called wp_list_filter(). Easy as: $male = wp_list_filter( $list, [ ‘gender’ => ‘male’ ] );

Print specific content [closed]

You can create a shortcode that will print table into your page or page content. You can call shortcode using this syntax. e.g. [your-shortcode-name] see this link. https://codex.wordpress.org/Function_Reference/add_shortcode You can pass arguments and parameters also. add_shortcode(‘shortcode-name’,’my_shortcode_handler’); function my_shortcode_handler($arg) { return “<some table tags>”; }

Get URL for featured image for posts? [closed]

The function to use would be: $url = get_the_post_thumbnail_url(); However, that’s not the most helpful for you right now, so we have a meta field with placeholders that you need to swap out for URLs before outputting. breaking that down we get these smaller steps: // grab the field // grab the URL // swap … Read more

How to store wordpress title in a variable

You’re example is totally unclear. What is ngegrab, what is $unity, $yesPage and what do you mean with “WordPress title”? Short: what are you trying to do exactly? To get the title of a post, use get_the_title() as mentioned in the other answer. To get the document title (<title></title>), use wp_get_document_title().