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

Move Entry Meta Above Title in Archives (Genesis + Brunch Pro)

Move Entry Meta Above Title in Archives (Genesis + Brunch Pro)

Categories post-meta Tags post-meta

Rename image filename using ‘media_handle_upload’

I cannot test this because I don’t have your code, but maybe you can get some ideas from it: add_filter( ‘wp_unique_filename’, ‘custom_image_name’, 10, 2 ); $img_id01 = media_handle_upload( ‘img_main’, $postID ); remove_filter( ‘wp_unique_filename’, ‘custom_image_name’, 10, 2 ); function custom_image_name( $filename, $ext ) { global $postID; $post = get_post( $postID ); return $filename . ‘-‘ . … Read more

Categories post-meta Tags post-meta, uploads

wp_insert_post inside save_post adds wrong metadata to inserted post

The reason for that is the save_post loop. When you call wp_insert_post, it triggers save_post and thus inserts the student meta. what you can do is, to check if the post type is correct while inserting the meta. like: add_action( ‘save_post’, ‘save_student_meta’, 10, 2 ); function save_student_meta( $post_id, $post ) { if ( ‘student’ !== … Read more

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

gettext localization is not working

It depends how and where you use this string. Possibly, you have to localize the date according to the site settings: <?php $date_format = get_option( ‘date_format’ ); $timestamp = strtotime( get_the_time() ); $localized_date = date_i18n( $date_format, $timestamp );

Categories post-meta Tags localization, post-meta

Get post content before rendering

Get post content before rendering

Categories post-meta Tags post-meta, the-content

How to add/update post meta to use in query?

You can use this function, which you’d add to the theme’s functions.php file, to update the average post rating which is saved in a private meta named _avg_rating (but you can of course rename it) — private meta has their name starting with an underscore (_): function update_post_avg_rating( $comment_id, $post_id = 0 ) { if … Read more

Categories post-meta Tags comment-meta, post-meta, rating

Attachment metadata has value of ‘1’

Attachment metadata has value of ‘1’

Categories post-meta Tags attachments, core-modifications, media, post-meta, rest-api

Export media library with metadata and import into new blog

Export media library with metadata and import into new blog

Categories post-meta Tags media, media-library, post-meta

Using a comma instead of a pipe to separate metadata

The default way WordPress separates different types of meta data, such as in the post meta data, is using a pipe |. For example, Author Name | Date | Cat1, cat2, cat3 This isn’t correct. WordPress doesn’t have a default way that it displays this information. It’s entirely up to the theme developer. if you’d … Read more

Categories post-meta Tags post-meta

Display multiple meta_key/meta_values by single SQL query

Display multiple meta_key/meta_values by single SQL query

Categories post-meta Tags mysql, post-meta
Older posts
Newer posts
← Previous Page1 … Page12 Page13 Page14 … 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