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

Search post overlapping dates – meta_query with meta_key

Search post overlapping dates – meta_query with meta_key

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

Display current ranking of post as a number in post title

Could make it work already 🙂 class MY_Post_Numbers { private $count = 0; private $posts = array(); public function display_count() { $this->init(); // prevent unnecessary queries $id = get_the_ID(); echo sprintf( ‘<div class=”post-counter”>Post number<span class=”num”>%s</span><span class=”slash”>/</span><span class=”total”>%s</span></div>’, $this->posts[$id], $this->count ); } private function init() { if ( $this->count ) return; global $wpdb; $posts = $wpdb->get_col( … Read more

Categories post-meta Tags meta-value, post-meta, wpdb

Add post’s category as a meta tag to the post

You can use the below snippet to achieve the result. add_action( ‘wp_head’, ‘so_407790_add_meta_tags_to_post’ ); /** * Add category meta tags to post. */ function so_407790_add_meta_tags_to_post() { // Get the current page categories. $categories = get_the_category(); if ( ! $categories ) { return; } // Category slug into list with comma separated. $category_list = implode( ‘,’, … Read more

Categories post-meta Tags post-meta

Related Post Category Filter

Related Post Category Filter

Categories theme-development Tags filters, post-meta, theme-customizer, theme-development, theme-options

Filter posts by meta key

By passing the meta key parameters. you can filter you posts. $args = array( ‘post_type’ => ‘post_type’,(optional) ‘meta_key’ => ‘age’, ‘meta_query’ => array( array( ‘key’ => ‘loan_min’, ‘value’ => $amount, ‘compare’ => ‘>=’, ), array( ‘key’ => ‘loan_min’, ‘value’ => $amount, ‘compare’ => ‘<=’, ), ), ); $query = new WP_Query( $args ); You can … Read more

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

Cant create or update meta fields using WordPress REST API

Cant create or update meta fields using WordPress REST API

Categories post-meta Tags post-meta, rest-api, wp-api

Custom Meta Data is not being saved

As you may have noticed from the notes at the top of that page, you may want to consider using WPAlchemy Meta Box for creating your meta boxes instead as it would make your dev a lot easier.

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

get_post_meta printing empty fields, but it shouldn’t be

The get_post_meta function returns an empty string if the key has not yet been set. That means the unused fields are going to result in $link having a value of ”, NOT a value of NULL. The isset function returns TRUE if the variable exists and has value other than NULL. As $link is not … Read more

Categories loop Tags loop, post-meta

How to remove date from showing in meta description

I havent tried these yet but I was actually looking at the exact same thing the other day. http://magstags.com/wordpress-seo/remove-date-meta-descriptions-wordpress-seo/ and http://seo-ho.blogspot.com/2011/02/how-to-remove-date-from-meta.html

Categories post-meta Tags post-meta, seo

troubles with get_post_meta (and saving it)

here’s the complete code : if somebody could try it, i might doing something wrong, but i can’t find out what. (the whole code is inside a widget page) /* * * add meta box : habillage * */ add_action( ‘add_meta_boxes’, ‘myplugin_add_custom_box’ ); add_action( ‘save_post’, ‘myplugin_save_postdata’ ); /* Adds a box to the main column … Read more

Categories post-meta Tags post-meta, save-post
Older posts
Newer posts
← Previous Page1 … Page74 Page75 Page76 … 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