All Questions
Tagged with custom-field post-meta
422
questions
0
votes
0
answers
20
views
SQL query based on two different custom field values
I have custom post type "store" that has two different custom fields: Coutry and City. When in the single country page I list all the stores in that country.
What I would like to do is to ...
2
votes
1
answer
342
views
Block Editor - Meta values not saved, meta changes to empty array on update
Issue TL;DR
I have a block that updates meta values, but when I click 'update', the values are not saved for the post. Additionally, the meta values I get from useEntityProp load as an object with ...
1
vote
1
answer
36
views
What is the best way to get a different post's custom field/postmeta with js?
In gutenberg I want to get a postmeta (it's a json string) that belongs to post #123. I want to check the editor's content against it. Let's say that postmeta's key is "blocks".
So I made ...
0
votes
1
answer
200
views
get Custom field label (select/dropdown) on front end
I have custom field added to product posts.
This is dropdown field and displaying on front end it pulls the option value which is not display friendly, for example select option value is "...
0
votes
0
answers
279
views
Extend search query to search meta keys values based on search string
I want to create an autocomplete AJAX search and I'm trying to have it where when the user starts typing, the list populates titles matching that search string.
My issue is in the WP_query, because I ...
1
vote
0
answers
120
views
Saving multiple custom meta box fields
So,
I have a custom metabox, with multiple fields on it, and the amount of boxes is variable (could be 3, could be a lot more, depending on order quantity number)
I'm trying to write a save function ...
0
votes
0
answers
118
views
How to add new Metadata options (Date, Author, etc.) for Posts?
I would like to know if it's possible and how to create new Metadata options (like Date, Author, etc.) to show about a Post.
I tried using Advanced Custom Fields, but I can't seem to use the custom ...
0
votes
0
answers
14
views
Site uses wpdb to fetch meta_keys but just displays first meta_key from a page (the post uses the same meta_key "filmmaker" more than once)
My page should display all filmmakers, that have been tagged as "filmmaker" in my posts. I do have posts that feature more than one filmmaker (meta_key = filmmaker) in custom fields, but ...
2
votes
2
answers
2k
views
Update post meta custom field using block editor
I have a custom mapping plugin that (among other things) saves/updates coordinates to a custom field when the user drags a map marker within a custom block. Everything works as expected except for the ...
0
votes
1
answer
162
views
Meta field bulk editing no longer working in WP 6.0 [closed]
Until recently, I was using the following PHP and jQuery code for adding bulk editing support for a meta field (price) in a custom post type (Book):
PHP:
function show_bulk_edit_book_metabox( $...
0
votes
1
answer
158
views
Conditionally run function based on custom meta value?
I’m looking for a way to conditionally display an image within certain Woocommerce hooks that I choose based on whether a value is true within a custom meta field for the products on my site.
For ...
0
votes
1
answer
66
views
What snippet do I need to type to show my ACF field show up on my theme?
I've been trying all kinds of things but I can't get it to work cuz my Theme single.php looks different that usual.
I made a field in ACF named Region and then enter for example USA which I need to ...
0
votes
1
answer
80
views
Is there a way to make [Table Of Content] plugin while not using revision data?
I have a problem while using TOC plugins 'cause all of TOC plugins use revision data to recognize header tag. I'm using my own metadata (custum field) plugin and the data doens't show on the revision ...
0
votes
0
answers
739
views
How to change text color depending on the number value (Using javascript)
I'm trying to change text on the table depending on the meta value I give (number).
if meta value >= 7, number text on table changes to green.
else if meta value >= 4, number text on table ...
0
votes
1
answer
944
views
how to get serialized post meta
I have posts that have video content and these videos stored in database like this (serialized) a:1:{s:9:"video_url";s:0:"";}
This serialized data have post video urls but can ...