Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

post-meta

Metabox not show in categories custom post type cmb2

Metabox not show in categories custom post type cmb2

Categories custom-post-types Tags custom-post-types, custom-taxonomy, metabox, plugins, post-meta

Meta value does not save for scheduled posts

I had a similar problem with a custom metabox. The problem was the use of $post_id inside the save-function. Using global $post and then $post->ID solved the problem for me. function save_metabox(){ global $post; if(defined(‘DOING_AUTOSAVE’) && DOING_AUTOSAVE){ return $post->ID; } $myData = $_POST[‘my data’]; update_post_meta($post->ID;, $myData); }

Categories posts Tags metabox, post-meta, posts

Update postmeta Parent when post_status child change

From WP 3.7 you have the option to hook to the save_post hook directly for you post_type. For example: function update_post_parent_status_on_complete( $post_id ) { if(!isset($post)) $post = get_post($post_id); // checking the status you want and also that has a parent if ($post->post_status == ‘completed’ && $post->post_parent !=0 ){ $parent_id = $post->post_parent; update_post_meta($parent_id, ‘screening_status’, ‘screen’); } … Read more

Categories custom-post-types Tags custom-post-types, customization, post-meta, post-status, posts

Can’t access post meta on new post creation (cpt)

I found out that actually, in a new Post creation, the Post Meta is not actually available yet! I was trying to get something that wasn’t available! Check – How to access the post meta of a post that has just been published? …. which says … “when you publish the post and ‘publish_post’ is … Read more

Categories post-meta Tags post-meta

Add Custom Taxonomy for Blog Meta Info

get_the_terms() is the function you need to get terms of a custom taxonomy associated to your post. It is similar (but not identical) to get_the_category() for the default category taxonomy. [Edited to answer the first comment below] Adapting the code you have for categories, here’s how you can display either categories or terms: <?php $categories … Read more

Categories custom-taxonomy Tags advanced-taxonomy-queries, custom-taxonomy, post-meta, taxonomy-meta

Documentation for post meta

There is no official documented list of all possible post meta keys in core. The closest I could for anything unofficial was this answer on Stack Exchange: You probably don’t want to use the following post meta keys: _thumbnail_id – Used to store the featured image ID _edit_last – Used by the Heartbeat API _edit_lock … Read more

Categories meta-query Tags meta-query, post-meta

delete all post with certain meta_keys

delete all post with certain meta_keys

Categories menus Tags menus, post-meta

result from custom filter admin table list backend does not work

result from custom filter admin table list backend does not work

Categories customization Tags customization, filters, post-meta

Set default value field meta_Value [closed]

Set default value field meta_Value [closed]

Categories woocommerce-offtopic Tags post-meta, save-post, woocommerce-offtopic

What WordPress function to use to get meta value by using meta keys?

As the solution suggested in comments worked out for you, I’ll just post that as answer over here. You need to replace the_ID() function in your get_post_meta(the_ID(), ‘nova_price’, true); call. Because the_ID() directly outputs the post ID which is then getting printed for you instead of the meta. Right code would be: get_post_meta( get_the_ID(), ‘nova_price’, … Read more

Categories functions Tags custom-field, functions, meta-value, post-meta
Older posts
Newer posts
← Previous Page1 … Page131 Page132 Page133 … Page204 Next →
+ More

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
Next Page »
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress