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

Compare meta_query with a Regular Expression and do a less-than operation on it

Compare meta_query with a Regular Expression and do a less-than operation on it

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

Custom post meta values reset by autosave [duplicate]

I have managed to find the reason behind this and create a solution suitable for my needs. Under screen options on the post edit page is an option called “Custom Fields”. This lists all of the custom meta values that have been saved against the post and allows you to create new ones and edit … Read more

Categories post-meta Tags autosave, post-meta

get_post_meta($post->ID) returns empty string when in preview mode of custom post type

I solved this problem with 3 lines of code after calling get_post_meta(): if (!is_array($post_meta)) { $post_meta = array(); }

Categories post-meta Tags post-meta, previews

hide posts with specific meta data from admin page

hide posts with specific meta data from admin page

Categories post-meta Tags post-meta

Save an array of values in the post meta box

Just save the array to post meta as you save string- $data = array(“200”, “201”, “202”); //Update inserts a new entry if it doesn’t exist, updates otherwise update_post_meta($post_ID, ‘_parent_id’, $data); The for getting the post call get_post_meta like below- get_post_meta($post_ID, ‘_parent_id’, true); You’ll get the array. Then run for or foreach loop to show the … Read more

Categories post-meta Tags post-meta

Compare old meta with new post meta

Compare old meta with new post meta

Categories post-meta Tags post-meta, wp-insert-post

How to create a meta_query to get all posts with a specific meta data?

If you want to target meta key vendor and meta value farsi, you need to pass the following meta_query arguments: $args = array( ‘posts_per_page’ => -1, ‘post_type’ => ‘product’, ‘meta_query’ => array( array( ‘key’ => ‘vendor’, ‘value’ => ‘farsi’, ) ) ); Also to note, as Jiten highlighted, your meta key may be wpcf-vendor.

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

Unknown characters added to meta data values

The answer was that I was not referencing the 0 index of the json post-meta-fields array. It was trying to return an array instead of just the string. Instead of ‘color’ => $article_array[‘post-meta-fields’][‘color’] I needed ‘color’ => $article_array[‘post-meta-fields’][‘color’][0]

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

add_post_meta adds meta to one more different post

The proper way would be to check if you are on a single page, and if so, then check if your post has the oznamy set as one of its categories. Let’s rewrite your code the following way: if ( is_single() && in_category( ‘oznamy’ , get_the_ID() ) ) { // Get the current user $current_user … Read more

Categories post-meta Tags post-meta

Set Condition echo function get_post_meta

From your code, this is the part where you can get the mark, modified to get only one: $member_id = get_current_user_id(); $course_id = 1; //i am assuming the ID of the course $status = get_user_course_status($member_id,$course_id); if($status > 3){ $mark = get_post_meta($course_id,$member_id, true); echo $mark; }

Categories post-meta Tags post-meta, wpdb
Older posts
Newer posts
← Previous Page1 … Page33 Page34 Page35 … Page51 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