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

Update fields with post object and custom tax with wp_insert_post

Update fields with post object and custom tax with wp_insert_post

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

when saveing $meta_box i get Undefined index error

when saveing $meta_box i get Undefined index error

Categories metabox Tags metabox, nonce, post-meta

Media library orphans

Maybe it can be solved at run-time. wp_get_attachment_image says: Returns an HTML image element representing an attachment file, if there is any, otherwise an empty string. So, if the post meta is set, but an empty string is given, we should delete the post meta. $default=”<img src=”” . get_stylesheet_directory_uri() . ‘/img/team-logo.png” />’; if ( get_post_meta( … Read more

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

loop through custom post types with meta data

loop through custom post types with meta data

Categories wp-query Tags loop, post-meta, wp-query

get_post_meta is always empty when I use wp_mail

Can you check the argument passed $post_id and see if it is returning the post id else define post globally along with $wpdb like global $wpdb, $post and use $post->ID instead of $post_id.

Categories PHP Tags email, html, php, post-meta, wp-mail

Return only custom post types for the page, not all

your main problem is <?php query_posts(‘post_type=case_studies’); if ( have_posts() ) while ( have_posts() ) : the_post(); ?> This means if there are posts, then while there are posts, get from the current post. After processing, it will just keep iterating through the posts. Delete this line and the end while line. Instead, use this <p><?php … Read more

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

Custom Field: Display only if a specific key is selected outside the loop

Custom Field: Display only if a specific key is selected outside the loop

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

How to create a link for wordpress meta datas?

How to create a link for wordpress meta datas?

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

When importing posts to a new site if XML file has postmeta not setup on new server what happens?

wordress core and importer has no way to know how any of the data is actually being used. The importer will just import everything, if a meta data stopped being used then you will get some not needed stuf in your DB but nothing worse then that. Of course it is very easy to test, … Read more

Categories post-meta Tags import, post-meta, xml

how to show this part only in the single post page?

You can use is_single() in a conditional statement. <?php if( is_single() ){ ?> <ul> <li class=”Source”><a>source:</a></li> <ul class=”Source-Link”> <li><a href=”https://wordpress.stackexchange.com/questions/121060/<?php echo get_post_meta($post->ID,”source-link’, true); ?>” target=”_blank”><?php echo get_post_meta($post->ID, ‘source’, true); ?></a></li> </ul> </li> </ul> <?php }?> Be aware though that this will appear on any single page, meaning a single post page and a single page. … Read more

Categories custom-field Tags conditional-tags, custom-field, post-meta
Older posts
Newer posts
← Previous Page1 … Page21 Page22 Page23 … 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