Questions tagged [custom-field]
Custom Fields are fields that can hold arbitrary extra information known as meta-data.
3,717
questions
0
votes
1
answer
12
views
Creating subpages for each custom post type
I have a custom post type (created with ACF), called shops.
Each shop has data for example about working hours, which are separated in each custom field (Monday, Tuesday, wednesday etc.).
I have all ...
0
votes
2
answers
948
views
Sort categories by meta value
How can I make a list of categories with 4 last posts in each where every category is sorted by meta_value.
For example, template without sorting by meta_value is http://pastebin.com/AeH6vx9b
It ...
1
vote
1
answer
1k
views
filter custom post in rest api with custom function
i have 3 custom post type : artists, songs, videos
songs and videos have a meta that sort artist id of songs or videos
filter in rest api couldn't return filtered post by artist id custom meta
so i ...
0
votes
1
answer
821
views
wordpress simple post multi rating with post_meta and user_meta
I am trying to create a multi criteria post rating function with simple form and post_meta and user meta.
The Goal
when users submits their ratings 2 things should happen:
1.the ratings is stored ...
0
votes
1
answer
2k
views
Adding tinymce to Custom Field boxes on Category edit page
I've managed to add the required custom fields to my category edit page (the code is below). All I'd like to do it have the textareas #Category_Extras_Features and #Category_Extras_Applications to ...
6
votes
2
answers
2k
views
Admin Area Custom Type Search By Meta Fields Without Title & Content
I have a custom post type that uses several meta fields. In the admin area I would like to be able to search by those meta fields. I have implemented this currently in my functions.php with this code:
...
0
votes
1
answer
825
views
Custom plugin issue - Notice: Trying to get property of non-object in
In my plugin to configure some basic values using a woocommerce function which is creating a select field, but for some reason it generate this error:
"Notice: Trying to get property of non-object in /...
0
votes
2
answers
869
views
How to display custom post type ordered by a custom field date
I have a custom post type for a timeline activities.
each post of them has a custom field type of DATE. field name :activity-date
I'm using TYPES plugin for Custom Post Type and Custom Fields
I ...
0
votes
1
answer
767
views
Where is get_post_meta value located?
I'm working on a wordpress website created quite long ago. In the header file I see the following code:
<?php
query_posts("page_id=63");
while ( have_posts() ) : the_post()
?>
<?php echo ...
0
votes
1
answer
1k
views
How to add custom fields to images for image source text and URL
How do I add two custom fields to images to allow me to put in text for source name example: Shutterstock
and then link that text to the second custom field URL field example: shutterstock.com
Some ...
1
vote
2
answers
4k
views
How to use thumbnail size of image if I'm only using src to get image
I have a custom field for an image, and using it this way:
<?php $item_img = get_sub_field('image'); ?>
<img src="<?php echo $item_img ?>" />
But I want to use the thumbnail ...
8
votes
3
answers
9k
views
Best way to programmatically remove a category/term from a post
I am working on a script to convert all posts in a given category to use a postmeta flag instead (testing of MySQL has shown me that on a site as large as mine this will lead to a meaningful decrease ...
0
votes
1
answer
775
views
How to add dynamic fields on wordpress custom post type page in admin section
I need to add dynamic fields with title and description for post in admin section. I want to add these fields dynamically on click add new title and description. I want to save them in database and ...
0
votes
1
answer
1k
views
Media Attachment Custom Meta Fields not saving in Media Uploader when using jQuery UI Autocomplete
I am trying to write a plugin that adds a custom meta field to image attachments to give images a credit field. I use the 'attachment_fields_to_edit' and 'attachment_fields_to_save' filters.
...
0
votes
2
answers
66
views
fetch from an external api call and display results in page
I have placed my external api call inside the functions.php file in the server and I created a shortcode for the api call.
I'm familiar with React and I was expecting Wordpress to be somewhat similar.
...