Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

post-meta

Permalinks using event date (year & month) instead of publication date

August 3, 2022August 2, 2022 by Magenaut

The site http://www.bikefun.org is live and working, but the permalinks are not quite right. It is an event calendar site. Events are stored as a custom post type “bf_events”, with dates stored as integer postmeta values – integer as produced by strtotime().

Categories Q&A, Wordpress Tags custom-post-types, date, permalinks, post-meta, rewrite-rules Leave a comment

How to access the post meta of a post that has just been published?

August 3, 2022August 2, 2022 by Magenaut

I am using the hook publish_post to run my code where I need the post meta of the just published post. But the post meta value I am looking for is somehow not available at this point of execution. On checking the wp_postmeta table, I found that my meta key value hasn’t been created yet. Also, I want this to work for a post published for the first time. Is there any other hook that can give me access to it?

Categories Q&A, Wordpress Tags post-meta, publish Leave a comment

Orderby meta_value only returns posts that have existing meta_key

August 3, 2022August 2, 2022 by Magenaut

I have the following wp_query:

Categories Q&A, Wordpress Tags custom-field, post-meta, sort Leave a comment

How to get custom post meta using REST API

August 3, 2022August 2, 2022 by Magenaut

I am trying to create a REST APIs for my wordpress website which is used for facility listing using wordpress job manager plugin.

Categories Q&A, Wordpress Tags custom-field, post-meta, rest-api Leave a comment

what is the correct way to compare dates in a WP query_posts meta_query

August 3, 2022August 2, 2022 by Magenaut

I have a query_posts call in a WP template. Through the use of the More Fields Plugin I can give the site admin the ability to create an event (custom post type) and then enter a date which is formatted: YYYY/mm/dd.

Categories Q&A, Wordpress Tags custom-field, custom-post-types, customization, post-meta, query-posts Leave a comment

Echo all meta keys of a custom-post TYPE

August 3, 2022August 2, 2022 by Magenaut

Is there a way to dump a list of all meta keys being used by all posts belonging to a custom post type?

Categories Q&A, Wordpress Tags custom-post-types, post-meta Leave a comment

Order by optional meta key?

August 3, 2022August 2, 2022 by Magenaut

I’m building the sorting functionality for a custom post type, and I have a custom meta value for “Featured” posts. This value is set when you tick the checkbox, otherwise it is not set.

Categories Q&A, Wordpress Tags order, post-meta, wp-query Leave a comment

How to add category to: ‘wp-admin/post-new.php’?

August 3, 2022August 2, 2022 by Magenaut

I want to have a link to create a new post that sets the category also.

Categories Q&A, Wordpress Tags categories, post-meta, posts, rest-api, urls Leave a comment

Filtering posts by post meta data

August 3, 2022August 2, 2022 by Magenaut

I want to filter posts in such a way that only posts, for which get_post_meta($post->ID, "project_cat", true) (it returns a post ID) is equal to my specified value, are shown.

Categories Q&A, Wordpress Tags post-meta, query-posts Leave a comment

Front-end update_post_meta snippet displays white screen?

August 3, 2022August 2, 2022 by Magenaut

Thanks to @Anu’s correction I now have a function to update_post_meta from the front end.

Categories Q&A, Wordpress Tags post-meta Leave a comment
Older posts
Newer posts
← Previous Page1 … Page5 Page6 Page7 … Page9 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress