Custom Fields are fields that can holds arbitrary extra information known as meta-data.

learn more… | top users | synonyms (2)

0
votes
1answer
360 views

Geocoding an Exploded Custom Field Array

So, I'm having a little problem with crossing signals in WordPress between Google Maps' API and an exploded custom field. I want to be able to geocode an address that's been exploded from a custom ...
0
votes
1answer
255 views

Loop to display random posts only if a custom field matches category

Working on a website and need loop that will show posts ONLY if custom field value is equal to the current category name. I have category 'fun' and custom field 'genre'. I would like to show on ...
1
vote
1answer
2k views

get_pages sort alphabetically by meta value

I operate a real estate website, and I have a list of homes we are selling. I am using a bunch of custom fields to store information about the homes. When you click on a home in the home listing page ...
0
votes
2answers
366 views

Split the_title

Is there a way to just split the_title into two different lines without a custom field? The titles in my blog are like small header above the maintitle. The Problem is, that at the moment I am ...
0
votes
1answer
193 views

Querying meta values within an array

Okay so I'm using the relationship field from Advanced Custom Fields against a custom post type. The relationship lists countries, when these are saved they are within a serialised array: [country] ...
2
votes
1answer
819 views

Wordpress Search documentation: how to improve search query using taxonomy terms, custom meta fields?

I'm trying to understand how Wordpress search works. I haven't found much info on the Codex. Arguably, search is not the best WP feature. Even Wordpress.org uses Google Search. I would like to make a ...
0
votes
1answer
560 views

Adding external field to my post form (admin side) and to post show (frontend side)

I would like to add a "Source" field to my posts form so I can show from where I get the published info. Didn't know if this exists already because I'm just starting with WP. So I do some research and ...
1
vote
1answer
1k views

How to get a meta value from all post

I searched for a while but I didn't find any solution. I used the functions listed here. It outputs something like this: Array ( [0] => 15 [1] => 30 [2] => 50 ) But I want ...
1
vote
2answers
686 views

custom field to always to .get_the_title()?

Is there a way to have always the the_title(); tag also includes a custom field called subtitle? I want to have a title like this: "subtitle-custom-fild: Posttitle" Like "Cool: The new TV show from ...
1
vote
1answer
589 views

Use meta_query to get title of associated post

I have two post types that I've associated in one direction by assigning Post A as a custom meta field of Post B. I need to search based on the titles of Post A and return the associated Post B ...
0
votes
1answer
2k views

Create & Save multiple Meta-boxes

I created a custom-post-type and multiple metaboxes which needs to be saved. I have a function that saves one metabox, but I can't figure out how to reuse this function to save all the metaboxes. ...
1
vote
1answer
326 views

Metabox with multiple fields added by user and upload box

I'm trying to build system, where user can add as many fields as he needs to the post. I'm using code from this thread. Everythings works fine, except I can't get my upload working. Here's code I've ...
0
votes
1answer
743 views

Adding extra fields to front end signup form

I've been reading around and looking for a front-end signup form (not using plugins!) and came across this - ...
-1
votes
1answer
27 views

Add Field To All Pages

I'm trying to add a custom field to the built in Page content type. I've found lots of tutorials on how to do this for a single page, but I want to do this for all pages in my theme. Please point me ...
0
votes
1answer
1k views

$wpdb query a post type within a specific taxonomy term while ordering posts by custom meta value?

I have a custom post type 'event', a custom meta field 'event_date' and a custom taxonomy 'locations'. I want to query $wpdb to retrieve posts in this way posts must be of the 'event' post type ...
0
votes
1answer
98 views

Filtering posts by WORD in custom field

I need to filter my posts in categories pages, by showing only posts that have specific WORD in custom field value. I need php code that i should add in loop for this category. Details: I need loop ...
2
votes
1answer
189 views

how to save multiple custom fields for a post in one go?

I want to save multiple custom fields for a custom post in one go. Something like get_post_custom() except for that I need to set it this time.
3
votes
1answer
3k views

passing argument to get_template_part() or a better way to code

I have this include … event-list.php <?php /** * The loop that displays upcoming events */ ?> <ul class="event-items"> <?php $yesterday = time() - 24*60*60; $args = array( ...
3
votes
1answer
2k views

Search ONLY by meta key / meta values

I'm almost there on this one. On functions.php i have this: function base_home_product_post_type( $query ) { if($query->is_search() && $_POST['box'] == 'sku') { ...
0
votes
2answers
533 views

How to add an extra field in a post and show it on the template

I'm extremely new to WP. I want to add an extra field to the Post interface and show the content on a template. I don't want to show the content of the Post, but just the content in the extra field. ...
0
votes
2answers
45 views

Can You Build Page Templates Without Extra Files

I'm very familiar creating page templates in WP and for this project I really just have one page template with an option to switch the sidebar from the right side to the left side. The problem is that ...
0
votes
1answer
653 views

Problem uploading different files as custom fields with front end post form

I have a front end post form that I'm having some problems getting the right path for the media to save as custom fields. The path to the file gets saved as ...
0
votes
1answer
893 views

Order custom posts by taxonomy, then by meta_key

I've created a custom post type called Player Manager, where I have all the players of a football team. The CPT has four different categories - goalkeepers, defenders, midfielders and strikers. I also ...
4
votes
2answers
5k views

How to validate custom fields in custom post type?

I wrote a plugin that creates a custom post type with custom fields. To prevent users from entering incorrect information, how can I validate the data? I assumed that the save_post hook function ...
4
votes
1answer
314 views

Storing meta fields multiple times OR once with multi dimensional array?

I got some options that I expand using a repeater type field. The values I save for each field is already an array so in essence I'm saving a multi dimentional array per option. (See this weekly ...
0
votes
1answer
2k views

How do I insert a custom field in a user submitted post?

Please help! I have a form for users to submit posts, and I want them to be able to choose photos already in the media gallery based on category selected. I want to include radio buttons to choose ...
1
vote
1answer
745 views

Add Paypal Button programmatically

I've setup a post type-Product with custom fields containing price and other attributes. I'm reading Paypal Documentation right now, What i've read till now is "HTML-Buttons" can be pasted from ...
0
votes
1answer
95 views

How to change order of posts in admin

Hi I have set a custom post type with some custom fields, one of the custom fields is a date field which is different from the publish date of the post itself, which is by default used by WordPress to ...
1
vote
2answers
133 views

Plugin for custom posts and fields [closed]

I need a plugin to do the following: Add custom posttypes such as "Books" or "Cars" Add custom fields such as "Url", "Label", "Number of wheels", "Name of passenger" or "Age of passenger" There ...
1
vote
1answer
59 views

Delete custom fields when deleting posts

When I delete a bunch of posts their custom fields remain in the database, is there a way to remove them as well on deletion?
1
vote
1answer
409 views

search also in taxonomy, tags and custom fields

I have found many answers separately for Taxonomy, Custom fields and Tags, most of them outdated. But how to combine a search in: - designed custom fields of a custom post - custom taxonomy terms - ...
-1
votes
1answer
114 views

How to automatically create a custom field when a post is published?

I'm trying to add custom fields on post publish with this code which I added to my functions.php : add_action('publish_page', 'add_custom_field_automatically'); add_action('publish_post'. ...
1
vote
1answer
95 views

Limits, not all post are showen when querying for posts by view count

I'm having some difficulty getting a loop that gives me post by most viewed. I started by following this tutorial ...
3
votes
2answers
453 views

How to set a default meta value for custom field

I have setup a custom meta_key for attachments. Since it is a radio button with Yes/No options, and the default value is always Yes, I need that this default value is saved into the db when the ...
0
votes
1answer
253 views

Display newest post's custom field content on homepage, daily

Ok, so I'm pretty confident on how to display a certain post's custom field content on my home page, or wherever I wanted it. But what I'm trying to do is this: I have my main home page that I want to ...
0
votes
1answer
659 views

Copy/clone/associate Custom field to Custom Taxonomy

I'm looking for a solution to "clone or copy or associate" custom fields data to custom taxonomies. example: Custom field "location" should copy data of that posts custom field to Custom Taxonomy ...
0
votes
1answer
99 views

Use Metabox to enter Post Title

I would like to use a custom meta box to build the UI for the post title, instead of the usual field 'title' supplied on WordPress post screens. I've build the meta box, the question is now how to ...
0
votes
1answer
76 views

How to store meta field values

I would like to store a few extra details for my custom post type, using meta boxes. Should I store all the values under one meta key in an array, or create several meta key and value pairs?
0
votes
5answers
3k views

Preserving line breaks when saving and displaying custom fields data

I'm collecting data via a form plugin and saving that data in form of a post with several custom fields. I then display the content of the post and the custom fields on my post template using... if( ...
0
votes
1answer
25 views

Creating entries with image attachements within posts and managing them in a list

I need help with choosing a suitable meta box or other means for listing, adding and sorting entries, relevant to the containing post. For each entry it should be possible to attach a set of images, ...
0
votes
1answer
695 views

Changed PHP handler to DSO - weird custom fields problem [closed]

I have a problem for my website. The homepage lists articles (external links) that are put in categories and that also mention the article source (website where the article is published). These ...
0
votes
1answer
217 views

Parse Shortcodes in Theme's Custom Field?

I have a theme which has a "PRICE" custom field that only accepts numerical values. Is there anyway to parse shortcodes in that custom field so I can dynamically display the price using another ...
0
votes
1answer
894 views

How to sort by custom field value?

I am using these code to sort most Commented, Most viewed Posts <?php $params = $_GET; unset($params['orderby']); unset($params['order']); unset($params['v_orderby']); unset($params['v_sortby']); ...
1
vote
0answers
387 views

Meta query with multiple custom fields for archives page ordering problem

I'm modifying the query for archives pages so that the posts showing up on year, month or day pages are queried by there custom field (start-date and end-date) and are sorted by custom star-date ...
3
votes
1answer
1k views

Adding meta values to permalink

I have publications and I want to simply add year and month to the permalink. Currently the year and month of publication is added to the post as a meta value. I've set up publications as a custom ...
1
vote
0answers
72 views

Why orderbyb meta_value_num won't affect the generated SQL Query order?

I've exhausted myself with this and I couldn't figure out why when I do this $myposts = new WP_Query( array('numberposts' => 5, 'offset' => '0', 'post_type' => 'noticias', 'orderby' => ...
0
votes
2answers
340 views

Vimeo thumbnails

I use Advanced Custom Fields to show Vimeo videoes on a site I am creating for a client - The client pastes the vimeo ID (the last letters in the url) in a field, and the video is shown. But I would ...
0
votes
1answer
80 views

I want to understand plugin implementation of custom posts / taxonomies / metaboxes

I want to find a long-term GUI/plugin-based solution to working with custom posts types, custom taxonomies, and custom fields/metaboxes. To this end I have been reviewing all the major custom ...
0
votes
1answer
732 views

Adding a Custom Field to be used by Posts 2 Posts

I'm trying using Gravity Forms and allow for a user to submit a post to my CPT, and choose an optional Connected Post Type. I have two CPTs, CPT1 and CPT2. When they're viewing my form for creating ...
1
vote
0answers
245 views

Multi-select field for Taxonomy can't save the value

I'm trying to create a multi select field for Taxonomy pages, and the problem is in saving all the selected values, for example if I choose couple of elements in the select field and save it, it will ...