Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

New answers tagged

2 votes

Drawbacks of making the default post-type: post hierarchical

I think it's safe to turn the default post type as hierarchical. The only difference is that it will have the field post_parent filled on DB, so you can correctly link one post to another with ...
Bruno Cantuaria's user avatar
0 votes

When inserting media file in a post or page, show file name under the thumbnail

By default, WordPress doesn't provide a built-in option to sort media attachments by file name in the media library interface. However, you can achieve this programmatically or with the help of ...
Jahid Shah's user avatar
0 votes

How to get total posts count for each date?

Instead of the second loop, do the following: Count the posts per date Display them as you will // Count the posts per date $count = []; foreach ( $posts as $post ) { $date = get_the_date( 'Y-...
Mulli's user avatar
  • 126
0 votes

Delete post with all files attached to it

I am from China. Your code and plug-in are very helpful, but they seem to only work when the post format is standard. If the post format is pictures or videos, they seem to be invalid.I need your help
happy day's user avatar
0 votes

How to create frontend Post filter using meta query

Do Typo Correction: The line $wp_qunew WP_Query($args); seems to be a typo. It should be $wp_query = new WP_Query($args);. Do Variable Correction: In the foreach loop towards the end of the code, you'...
Aman Singh's user avatar
0 votes

Get value from an input field and pass into update_meta_data as $meta_value

You can use below code in your active theme functions.php file or active child theme add_action( 'woocommerce_checkout_update_order_meta', 'save_recipient_email_to_order_meta', 10, 2 ); function ...
Ankur Modi's user avatar
0 votes

Is it possible to create dynamic templates for block themes directly from the site editor?

Two block markup examples are the post-title block: <!-- wp:post-title /--> and the post-content block: <!-- wp:post-content /--> that you can use in your single post template. See more ...
birgire's user avatar
  • 67.3k
0 votes

Mark menu item as current-menu-item for category

Marking terms in menus as active while on the term archive screen This question is very old and it seems that since it was asked, this became part of core, or at least it already works for me, so the ...
jerclarke's user avatar
  • 3,043

Top 50 recent answers are included