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

Custom Fields help

I don’t know what $dorigen is – but you can’t find your </h3> because of your if/else condition. I don’t see why the else is needed at all. Replace else { ?> </h3><?php } ?> with </h3> in both places it is used. That said, if you only want to show the entire post-meta div … Read more

Categories post-meta Tags advanced-custom-fields, post-meta

Top 30 Songs using Custom Post Type

If I understood correctly, that Peak Postion is based on longest period the song was in same position (which I found odd), here’s what you could do: Have three meta fields :: song_meta_peak :: song_meta_weeks_now :: song_meta_weeks_peak First time song enters the list, you set peak meta to whatever the position is and both weeks_now … Read more

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

Write query according to post_meta

change the $args to this: $args = array( ‘posts_per_page’ => 20, ‘paged’ => $paged, ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’, ‘meta_query’ => array(array(‘key’=>’favpost’.$userID, value=>’1′, ‘compare’ => ‘=’)) ); That is if the post_meta value is 1 when the user select that post as it favorite, or it could also be ‘true’ you will have to … Read more

Categories post-meta Tags post-meta

Recommended Post Structure for DB Storage

It’s almost always superior to use the standard WP tables. All WP functionality and plugins ‘know’ about those tables, and have access to them. They are completely oblivious to custom-built tables.

Categories Database Tags database, post-meta

updating meta_key from the frontend

I don’t have time for a detailed reply but some ideas: 1) Use arrays in the front end. Make your input ID’s like add_task_assigned[] and add_task_complete[] – these appear as arrays in the back end. It’s not great practice, but it works. 2) Use an array in the backend. Store the meta as array( [0] … Read more

Categories front-end Tags front-end, post-meta

delete attachment for one post without deleting actual attachment post

delete attachment for one post without deleting actual attachment post

Categories ajax Tags ajax, attachments, plugin-wp-e-commerce, post-meta

Access Serialized Post Meta Values

Access Serialized Post Meta Values

Categories post-meta Tags post-meta

Display meta data from a custom field within plugin Category Grid View Gallery

You should be able to pass the name of the custom field in the shortcode: [cgview title=”fieldname”] Not tested; I just took a look at the source code (and now my eyes hurt).

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

How do I retrieve a value from a multi – dimensional array using get_post_meta? [duplicate]

How do I retrieve a value from a multi – dimensional array using get_post_meta? [duplicate]

Categories array Tags array, post-meta

get_post_meta image width for lazy load

Looks like you have the image URL saved as a custom field and not the attachment id so first get the attachment id using the URL using Philips awesome function and then use wp_get_attachment_image_src() to get the attachment attributes : $attch_id = pn_get_attachment_id_from_url(get_post_meta($post->ID, ‘img1’, true)); $image_attributes = wp_get_attachment_image_src( $attch_id ); // returns an array //$image_attributes … Read more

Categories post-meta Tags post-meta
Older posts
Newer posts
← Previous Page1 … Page18 Page19 Page20 … 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