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

WordPress creates new lines in postmeta table on post update

Advanced Custom Fields doesn’t just save the meta value, it also adds meta with information about the custom field used to save that meta. That’s what you’re seeing. Meta with the key _nom_adherent and value field_5b759e3860abd tells ACF when using get_field( ‘nom_adherent’ ) what custom field was used to create that value, so that it … Read more

Categories custom-field Tags advanced-custom-fields, custom-field, post-meta

How does WordPress treats attachments metadata in post content?

Like almost all content in WordPress, a Media item (aka attachment) is stored in the wp_posts table, and its metadata is stored in the wp_postmeta table. The wp_postmeta data is linked to the post by the post ID. If the Media item is set as an attachment to a specific post, then inside the wp_posts … Read more

Categories post-meta Tags attachments, post-meta

copy images from custom field to another custom field

UPDATE #2 In your import_the_photos() function, please change this: // Copy the meta value (attachments) to the `v_editor` CPT. $vid_pix = get_post_meta( $videoID, ‘vid_pix’, false ); // test //delete_post_meta( $videoID, ‘vid_pix’ ); foreach ( $prop_att_ids as $att_id ) { add_post_meta( $videoID, ‘vid_pix’, $att_id ); } $vid_pix2 = get_post_meta( $videoID, ‘vid_pix’, false ); // test var_dump( … Read more

Categories custom-post-types Tags custom-field, custom-post-types, images, post-meta

Filter posts by meta data using custom query

I assume that the fl_builder_loop_query_args hook is from Beaver Builder, which means that the $query_args are args passed to the WP_Query. source In that case you can push some custom field parameters to the $query_args to get all the posts with matching meta value. I think it should work something like this, function fl_builder_loop_query_args_filter( $query_args … Read more

Categories filters Tags filters, post-meta

How to properly use oneOf and anyOf in Rest Schema?

After some testing in WordPress v6.0.1, it seemed that: We need to set the (default/initial) type of the data.items to null instead of object. (and yes, the type must be set, or else the API response would be invalidated with many “undefined index” notices) For each item, i.e. an array in the oneOf or anyOf, … Read more

Categories post-meta Tags post-meta, rest-api

Generate metadata for cloud images

Regarding the metadata portion of your question…I wonder if you could use the exif_read_data function? https://www.php.net/manual/en/function.exif-read-data.php

Categories post-meta Tags amazon, cloud, post-meta, thumbnails, uploads

Update post meta within save_post action

The problem is probably that the $post_id parameter passed to via the save_post_$post_type hook is not the same $post_id as the original post – it’s the $post_id of the temporary post that’s created when you edit a post. To confirm this: add_filter( ‘pre_post_update’, ‘wpse_pre_post_update’, 10, 3 ); add_filter( ‘save_post’, ‘wpse_save_post’, 10, 1 ); function wpse_pre_post_update( … Read more

Categories posts Tags actions, advanced-custom-fields, post-meta, posts, save-post

Update post meta custom field using block editor

how to update post meta in a custom field in response to a user interaction in the editor? editPost() can be used for that, but https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#meta-source-deprecated stated that: Although attributes may be obtained from a post’s meta, meta attribute sources are considered deprecated; EntityProvider and related hook APIs should be used instead, as shown in … Read more

Categories custom-field Tags block-editor, custom-field, meta-value, post-meta

How do I manage custom meta in post revisions in the Block Editor era?

How do I manage custom meta in post revisions in the Block Editor era?

Categories post-meta Tags block-editor, post-meta, revisions

Suggestion to make posts have multiple associated items

You should be able to do this fairly easily with the save_post hook. When one of the child pages is saved your hook will fire and allow you to firstly check the post type, and then if the post is indeed a child of your main post, where you want to update the URL, version … Read more

Categories post-meta Tags post-meta
Older posts
Newer posts
← Previous Page1 … Page98 Page99 Page100 … 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