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

Exclude a category from the filed under list

I have found an answer at this article entitled “Excluding Categories from the_category();”: function the_category_filter($thelist,$separator=” “) { // list the IDs of the categories to exclude $exclude = array(4,5); // create an empty array $exclude2 = array(); // loop through the excluded IDs and get their actual names foreach($exclude as $c) { // store the … Read more

Categories post-meta Tags genesis-theme-framework, post-meta, terms

update custom post type meta from a shortcode

I hope you will pull the code from here. Now you have table id get_option(‘table_press’ .$table_name .”_”. $table_id); so you can chage shortcode id dynamiclly using do_shortcode().

Categories custom-post-types Tags custom-post-types, metabox, plugins, post-meta, table

update a post meta from a single table cell TablePress

The code is quite tricky and difficult, cause table press math evaluation class has some protected method. By the by I solved your issue. Just the code in the functions.php in the theme.. just copy and paste it should be work. You can use multiple row sum. require_once TABLEPRESS_ABSPATH . ‘classes/class-tablepress.php’; $formula_evaluator = TablePress::load_class( ‘TablePress_Evaluate’, … Read more

Categories custom-post-types Tags custom-post-types, metabox, plugins, post-meta, table

Custom URl parameter

Solved using this code. add_filter( ‘category_link’,’append_parameter’, 10, 2 ); function append_parameter( $link, $my_parameter ) { $my_parameter = $_GET[‘sort’]; //get sort value if ( isset($my_parameter) ) { $link = add_query_arg( ‘sort’, $my_parameter, $link ); } return $link; }

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

Would this post meta be better added to the post table rather than post_meta table

Would this post meta be better added to the post table rather than post_meta table

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

How to break meta values into different items and avoid duplicates?

This is just a basic php array question – not a WP question. function unique_authors ( $authors ) { $newArray = array(); foreach( $authors as $item ) { $itemArray = explode( “, “, $item ); $newArray = array_merge($newArray, $itemArray); } $newArray = array_unique($newArray); return $newArray; } $authors = unique_authors( $authors ); foreach( $authors as $author … Read more

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

How can I include meta box content when searching?

try the Relevanssi plugin.

Categories custom-post-types Tags custom-post-types, metabox, post-meta, search

Why is my get_post_meta always empty

get_post_meta as seen here is nothing more than a wrapper for get_metadata. Now when you say the meta you’re getting back, if its not null but rather an empty string, it means you’re hitting the end of get_metadata as seen here. With true defined as the third variable of your get_post_meta call, you should be … Read more

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

Update meta values with AJAX

Couple of things: 1: When you include the script after jquery, localise it using the wp_localize_script function: $nonce = wp_create_nonce(“vote_nonce”); $yourscript_info = array( ‘ajaxurl’ => admin_url( ‘admin-ajax.php’), ‘nonce’ => $nonce ); wp_localize_script( ‘yourscript’, ‘yourscript’, $yourscript_info ); $.ajax({ type: “POST”, url: yourscript.ajaxurl, data: { id: id, vote: vote, nonce: yourscript.nonce, action: “stn_voting” }, 2: Add some … Read more

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

How to sort by meta value?

Your meta value is a serialized array. What you’re asking it to get for you is all posts with a meta with the key ‘Notes’ and the value ‘price’. Your meta value is not ‘price’, though, it’s a:6:{s:5:”width”;s:3:”580″;s:6:”price”;s:3:”99″ The first thing you need to do to order by price is to start using a helpful … Read more

Categories query-posts Tags post-meta, query-posts
Older posts
Newer posts
← Previous Page1 … Page176 Page177 Page178 … 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