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

How to get post that has non zero or greater than zero meta value

How to get post that has non zero or greater than zero meta value

Categories plugins Tags custom-field, plugin-development, plugins, post-meta

How to hide meta from search result only on pages?

You can use this inside the WordPress loop: if (get_post_type() == ‘post’) { // do something }

Categories posts Tags author, date, post-meta, posts, search

WordPress delete mysql rows with string

Look at the documentation, $wpdb->delete() takes at least two parameters, the table name and the Where-conditions as an array(). LIKE isn’t supported for delete imho, so you’ll need to use ->query global $wpdb; $wpdb->query( “DELETE FROM $wpdb->postmeta WHERE meta_key LIKE ‘_cb_%'” ); $wpdb->query( “DELETE FROM $wpdb->posts WHERE post_type LIKE ‘webcam'” ); I assume the double … Read more

Categories plugin-development Tags customization, mysql, plugin-development, post-meta, post-type

Adding user meta to post meta wp_insert_post() not working

when you use add_post_meta with the argument $unique = TRUE and the meta already exist, the value is not changed https://codex.wordpress.org/Function_Reference/add_post_meta If you want to update a meta, use update_post_meta update_post_meta($post_id, ‘wpcf-branch-order’, $branch);

Categories PHP Tags php, post-meta, user-meta, wp-insert-post

Save, update, get and sanitize post meta as HTML not plain

Save, update, get and sanitize post meta as HTML not plain

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

Order posts by meta value hiding posts instead of re-ordering

Literally seconds after updating this post I found the solution….again, Must have looked at this previously and not entered the details correctly as I tried this one before. 🙂 add_action(‘pre_get_posts’, ‘add_special_sort’, 11, 1); function add_special_sort($query){ // Bail if not the main “hidden” query, as opposed to a ‘new WP_Query()’ call if(!$query->is_main_query()) return; $query->set(‘meta_query’, array( ‘relation’ … Read more

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

Custom Meta Fields that are Echo’d are removed on post update?

Custom Meta Fields that are Echo’d are removed on post update?

Categories post-meta Tags post-meta

Linking posts together with Advanced Custom Fields “both ways”

Linking posts together with Advanced Custom Fields “both ways”

Categories custom-post-types Tags advanced-custom-fields, custom-post-types, post-meta, query, wp-query

Re-pointing images to cloud storage

Re-pointing images to cloud storage

Categories post-meta Tags post-meta

Updating Lat and Lng of posts automatically gives sporadic results

Turns out it was an issue with not providing a geocode API! I needed to change $geocode=file_get_contents(‘https://maps.google.com/maps/api/geocode/json?address=”.$prepAddr.”&sensor=false’); to $geocode = file_get_contents(‘https://maps.google.com/maps/api/geocode/json?address=”.$prepAddr.”&key=’.$api_key); In other words, there needs to be the key parameter with the API key in that URL. I also removed the sensor parameter, as that does not appear to be needed.

Categories PHP Tags custom-field, php, post-meta
Older posts
Newer posts
← Previous Page1 … Page45 Page46 Page47 … 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