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

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

You can use the $posted parameter to get the right value in your function. add_action(‘woocommerce_checkout_update_order_meta’,function( $order_id, $posted ) { $order = wc_get_order( $order_id ); $order->update_meta_data( ‘recipient_email’, $posted[‘recipient_email’] ); $order->save(); } , 10, 2); Verify that $posted is an array not an object with a var_dump on $posted. if it’s an object replace $posted[‘recipient_email’] with $posted->recipient_email … Read more

Categories plugins Tags email, plugins, post-meta, posts, woocommerce-offtopic

Custom post meta box as a sub form

What I ended up doing is not worrying about reloading the page. I have one row of input tags, with a select tag on top that I use to navigate rows. On change, the page reloads. Server side, the select box acts as an index for the input tag names and post meta.

Categories custom-post-types Tags custom-post-types, post-meta, wp-admin

Saving Child Terms on front end not setting parent

To fix all the older posts that you already posted with only the child term. You need run this function only 1 time and its will add you the parents terms. its for all the ancestors of the child term. Make sure to backup the DB before you run this function. function fix_terms_parents() { /** … Read more

Categories custom-post-types Tags custom-post-types, custom-taxonomy, front-end, post-meta, terms

Using Self Hosted Video URL With Custom Fields

This is what works. This gets the src URL entered into the custom field using get_post_meta and prints the video using wp_video_shortcode function video() { $self_hosted = get_post_meta( get_the_ID(), ‘self_hosted’, true ); $video_src_url = $self_hosted ? $self_hosted : wp_get_attachment_url( get_theme_mod( ‘customizer-video’ ) ); if ( $video_src_url ) { echo ‘<div class=”video-container”>’; $attr = array( ‘src’ … Read more

Categories post-meta Tags post-meta

How to Find List of Available Custom Fields for Theme?

How to Find List of Available Custom Fields for Theme?

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

How to save post_status using action save_post?

How to save post_status using action save_post?

Categories custom-post-types Tags custom-post-types, post-meta, post-status, save-post

Why doesn’t wp_oembed_get() for the video post format not work?

Why doesn’t wp_oembed_get() for the video post format not work?

Categories post-meta Tags oembed, post-meta

rendering open graph meta tags in wordpress

WordPress core supports embeds from a variety of sites, including Twitter. Embedding content is as simple as pasting the URL of the tweet (or whatever) into it’s own paragraph in the content editor. The embed will be displayed much like the examples you’ve provided.

Categories post-meta Tags open-graph, post-meta

Re-order Category Meta-data

Re-order Category Meta-data

Categories posts Tags categories, post-meta, posts

Unexpected issue when using attachment_fields_to_edit filter

Unexpected issue when using attachment_fields_to_edit filter

Categories plugin-development Tags attachment-fields-to-edit, attachments, plugin-development, post-meta
Older posts
Newer posts
← Previous Page1 … Page46 Page47 Page48 … 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