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 can I make my plugin display custom post meta data on the front end?

How can I make my plugin display custom post meta data on the front end?

Categories plugins Tags plugins, post-meta

Why are my custom metaboxes not updating the post meta?

Why are my custom metaboxes not updating the post meta?

Categories post-meta Tags post-meta

How to check widget-cpt meta and display its custom css in the head?

I think this is what you are looking for You need to get the custom post meta and add it to the wp_add_inline_style( $handle, $data );, I advise using the “style” default handle. The position of your custom css will depend on the hook of your stylesheet.

Categories widgets Tags post-meta, widgets, wp-enqueue-style, wp-head

Use $wpdb->get_results with filter based on array

Use $wpdb->get_results with filter based on array

Categories query Tags post-meta, query, wpdb

Exclude category from DB query

I’m sure there’s a better approach, but this query should do what you want: SELECT DISTINCT meta_value FROM wp_postmeta pm WHERE meta_key = ‘Driver’ AND NOT EXISTS (SELECT * FROM wp_term_relationships tr JOIN wp_term_taxonomy tt ON tt.term_taxonomy_id = tr.term_taxonomy_id JOIN wp_terms t ON t.term_id = tt.term_id WHERE pm.post_id = tr.object_id AND tt.taxonomy = ‘category’ AND … Read more

Categories post-meta Tags exclude, post-meta, wpdb

Removing Meta Generator

I have managed to remove this. If anyone else is wondering how simply go to. /themes/theme-name/includes/helpers open up SEO.php. And do Ctrl+F for generator or Wow-Themes.

Categories metabox Tags metabox, post-meta

Saved Post Meta Array Returns as String

In the end it was a plugin and my code conflicting with each other. Both were saving my post_meta. Resulting in odd behavior of my code and functionality of retrieving the data.

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

how to get postmeta info based on multiple categories?

ok, I was close and I have solution: SELECT wp_posts.ID, wp_postmeta.meta_value FROM wp_postmeta INNER JOIN wp_posts ON wp_posts.ID = wp_postmeta.post_id INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_term_relationships AS tt1 ON (wp_posts.ID = tt1.object_id) WHERE 1=1 AND wp_postmeta.meta_key = ‘_application’ AND ( wp_term_relationships.term_taxonomy_id IN (31) AND tt1.term_taxonomy_id IN (14) )

Categories categories Tags categories, mysql, post-meta, query

Creating Ordered Query using Meta_key

I think the sort is either alphabetical or numerical. There is no API way to provide more elaborate sorting rules to the query and messing with SQL for it would be likely impractical. Since you are retrieving complete set of posts (don’t have to worry about pagination) the easiest way would be: Request no sort … Read more

Categories posts Tags custom-field, post-meta, posts, wp-query

Get original post ID after wp_insert_post

Ultimately the solution that I found was to use global $post; to retrieve the current post’s ID. Immediately after wp_insert_post( $new_cpta ); above, I added global $post; $currentid = $post->ID; Then I was able to update the post meta for the correct post with $currentid in place of $post_id.

Categories wp-insert-post Tags post-meta, wp-insert-post
Older posts
Newer posts
← Previous Page1 … Page38 Page39 Page40 … 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