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

learn more… | top users | synonyms (2)

0
votes
1answer
102 views

How can I output WPAlchemy repeating fields meta values in my page template?

I have a custom post type, Downloads, which contains some custom metaboxes, including a repeating field. I'm able to output the values for all of them in my page template, but I'm not able to output ...
0
votes
1answer
27 views

Query Posts based on custom field value

Currently building a site and need to create a 'Schedule' to display a Presenter that is on air at a particular time. Using ACF plugin to enter a time that the presenter goes on air which saves the ...
0
votes
0answers
22 views

Changing the body of mail sent to new user registration

I am practically new in this community / forum, I hope to be as clear as possible about this question. I would like to change the body of the email sent to new users registered on my site, since only ...
0
votes
0answers
12 views

Saving sorted CPT with CF

I'm using WP-types to create custom post types and custom fields. Using CPT and CF, I've created photos gallery assigned to Posts. When I'm sorting them by "Wgraj zdjecie" and click save all, it ...
0
votes
0answers
16 views

How to format the various types of custom fields?

So i am ready to throw in my custom post type a bunch of custom fields. All these fields need specific handling for their input and validation. Exmaples: Numeric fields E-mails WYSIWYG editor ...
2
votes
1answer
127 views

How loop through posts based on custom fields

I want to loop through posts and show only those posts for which the custom field i.e _shopis not empty I am always confused with meta query and even not sure that if this is possible using this ...
0
votes
0answers
21 views

Problem saving meta data

I'm making my first WordPress plugin. I used an example to save text that an administrator enters when submitting a new post, but the meta data is not saving. Can anyone help on that? /** * Adds a ...
0
votes
0answers
11 views

Custom Search Doesn't FIlter Based on Custom Field

I am trying to search various post types based on a custom field equal to a certain value. However when I do my search, it's ignoring my filter. Here's my code: function ...
1
vote
0answers
27 views

Adding Page Templates to post but it ignored it

I follow the post to add the template metabox to a custom post type's editor, but it doesn't work. When I visit the post, it shows "NOT FOUND ANY POST" which looks like index.php or single.php ...
1
vote
1answer
30 views

Rewrite and custom post type: order by custom field not working

I have a custom post type "placement" with a custom field "position". What I want to do is, on the placements archive page, to order results by the "position" value. I have the following URL rewrite ...
0
votes
0answers
18 views

create custom field dropdown

so far I'm using custom field on my theme to display dynamic content, for example: <?php echo get_post_meta( get_the_ID(), 'product', true ); ?> <?php echo get_post_meta( get_the_ID(), ...
0
votes
1answer
17 views

Using custom field as 'orderby' value causing post grouping by publish date

I am using WP_Query. Here is my query: $my_query = new WP_Query('category_name=test-category&posts_per_page=-1&meta_key=sort_name&orderby=meta_value_num&order=ASC'); Why is it ...
0
votes
0answers
23 views

Filtering by custom fields select?

I have a custom template listing all the posts under a category x. This is how my current loop looks like: <?php query_posts('cat=522'); while (have_posts()) : the_post();?> All the ...
0
votes
1answer
32 views

Custom Fields with get_post()

I am using get_post() to call a single Wordpress post using it's post ID. I have successfully managed to pull the content / title of the post but would like to also pull custom fields also. The code ...
0
votes
2answers
22 views

How to properly get popular Posts by multiple Values

I am trying to display Popular Posts on my website, selected by a mixture of Views and Comment Count. Since views are always way more than Comments, I am multiplying the Comment Count by X, but it ...
0
votes
1answer
42 views

Creating connections programmatically with common fields on CPT's

I'm trying to create a programmatic connection between two CPT's that have a common field (id_number). For example: CPT "City": post_name:New York id_number:34 CPT "Color": post_name:Red ...
0
votes
0answers
25 views

Creating custom post type with custom taxonomy and custom fields programatically

I need to create a custom post type. This post type will have a custom taxonomy. Also this post type will have custom fields. I dont want to use any plugins to do it, i want to include the creation ...
0
votes
0answers
33 views

Run query with meta key via AJAX

I'm completely new to AJAX, and I can't seem to find anything that's pointing me in the right direction. I have a table that contains one row for each post in a post type. Each row contains the posts ...
0
votes
0answers
24 views

Tracking logged in users page visits

I need to be able to track logged in users (excluding admin) and know When a user was last active on the site When they last visited specific pages (and ideally their first visit to the page and ...
0
votes
0answers
19 views

Attempting to add an imagemap/ content to Front Page — shows up only in meta description

I'm dealing with a nasty old theme for a friend that uses a huge slider as its homepage background image. I'd rather not scrap and recreate the site, as back in the day I put in a good amount of ...
0
votes
0answers
43 views

Insert a custom taxonomy as a class in acf gallery loop

I am almost there, but not sure how to echo out a custom taxonomy as a class into my div containing my image. (see all the stuff below). All of the tutorials I see talk about using wp_query and then ...
0
votes
1answer
81 views

How can I sort get_users() by any value (last_name, user defined fields and more)

I want to sort the result of get_users() by last name, first name, user defined fields or whatever. How can I achieve this while still using get_users()?
0
votes
0answers
58 views

How to export data from a custom Meta Box added into categories

I have a custom meta box (text input) in the categories to insert the 'Meta Description', and when I export the data by using Tools > Export, this meta box is not exported. Actually, the content of ...
0
votes
1answer
27 views

Querying a large number of posts including their custom fields data

I'm building a SVG map separated into about 200 regions. For each region there are attributes that describe it, as well as a region ID. These regions are just polygons in the SVG. I setup a custom ...
4
votes
2answers
311 views

When using add_post_meta and update_post_meta, is there any way to give the individual arrays keys?

When adding arrays to post meta, using add_post_meta, new sub-arrays are added. I was wondering if there was a way to have those sub-arrays named. so instead of ending up with array([0](2,3), ...
0
votes
0answers
31 views

Login with user in custom created table

I was trying to add more features in login page, that i created a extra "myusers" table and trying to add two tabs in login screen,with the second tab i want login using my created users in 'myusers' ...
0
votes
2answers
30 views

Amend posts using wp_insert_post

I'm currently working with an XML feed to add posts to a custom post type using wp_insert_post(). It's all working fine but I was wondering if there's a way I can check if the post exists and amend ...
0
votes
0answers
31 views

Admin - Search Events by a custom field

I am using the events manager plugin and i created a new field using custom fields plugin. I don't know how to make the search from wp-admin to filter using the custom field i added. For details ...
3
votes
1answer
131 views

Multiple meta values for same meta_key adding on “Preview Changes” hit but not on saving or updating post

I'm taking multiple location values with each post, so it's an array (always). My post meta form field is like so: <select name="<?php echo $project_prefix; ?>offer_locations[]" id="<?php ...
1
vote
0answers
50 views

Custom dropdown field added to media gallery; how to get it to save properly?

I am using the following code to add a couple of custom fields to media attachments: //Add custom fields for attachments function kgal_add_custom_fields_to_artwork( $form_fields, $post ) { ...
0
votes
1answer
22 views

Sorting posts by meta values: 2 different orders

I have a meta value for a custom post type called workshop which is the start_time of the workshop as a UNIX timestamp. Right now I'm able to sort the posts ascending or descending with ...
0
votes
1answer
155 views

How to add google map to custom field

I need to show a map throw custom field Here's my code, the field name is 'show_map' <div id="view1"> <?php $location = get_field('show_map', 'options'); ...
1
vote
1answer
51 views

Masking Affiliate URL using $post_slug after “/go/”

I am trying to figure out how can I redirect a masked URL based on a custom field URL. If I have a masked URL: echo '<a href="https://domain.com/go/'. $post_slug .'/" class="button">Click here ...
1
vote
0answers
79 views

Custom User meta field display

I'm using PODS plugin (https://wordpress.org/plugins/pods/) to extend main types in wp and WP Tiles for tiles rendering (https://wordpress.org/plugins/wp-tiles/). I'v already added field position to ...
0
votes
0answers
29 views

How to add a default field Name to post Custom Fields

I would like to have the "Name" field in the Custom Fields section of of Wordpress backend to have a certain value by default. For example, when the user starts a new post, I would like the Name of ...
1
vote
1answer
143 views

How to Filter Posts by Custom Fields?

I would like to learn the best way to filter custom post types by custom fields. In the example I am working on, I use custom taxonomies to organize my posts and filter them. I would like to add ...
-2
votes
2answers
96 views

How to display search query as formatted text?

I am trying to display a site vistors search query on the search page. The form has custom fields so is not showing if it's "Search" and it doesnt show none of my custom fields. My search form - ...
-2
votes
1answer
51 views

How much worse is querying custom fields compared to custom taxonomies, quantitatively

OK, I know (because i've read it many times) why custom fields is less efficient than custom taxonomies when it comes to querying/filtering posts, but just how inefficient is it by comparison? I'd ...
0
votes
1answer
44 views

How to use a specific custom field in a custom post type as slug

I'd like use a specific custom field in a custom post type as the slug for the post. My custom post type is members and the custom field that I want to use as the slug is member_user. How can I do ...
0
votes
0answers
45 views

Search on Category and BETWEEN custom meta field

Background I am building simple car theme where I want to review cars, however, I'm really struggling with my search implementation. I have added a couple of custom meta fields to the post including ...
0
votes
1answer
65 views

Loop through two different sets of custom fields

I created a Custom Field ('custom_name') to allow content editors to specify a 'custom_name' (different from the title of the page) to any post created: custom_name - (Field type --> 'text') For a ...
0
votes
1answer
57 views

Custom Fields as Post Type Options

Im using a theme for vehicle listings and the WPUF Pro plugin for frontend submitting. WPUF plugin automatically reads the taxonomies of themes post_type (vehicle), but the theme got vehicle ...
0
votes
1answer
58 views

Loop through incrementing custom fields

I created 4 custom fields for a specific page. Field type: Post Object (I grab thumbnails and titles from the posts) Field names: featured_content_1 featured_content_2 featured_content_3 ...
0
votes
0answers
132 views

How to get posts ORDERBY a custom taxonomy term's custom field?

I have a custom taxonomy program_taxonomy : /* register a common taxonomy for DRAMAS & reality_shows to get post by terms in PROGRAMS page */ register_taxonomy( 'program_taxonomy', array ...
0
votes
0answers
29 views

Send email to different users depending on the field selected in woocommerce?

So, I've been searching high and low and I don't know if this is possible, but I figure this is the best place to try and see.. I have a checkout field added to my checkout page in woocommerce. It ...
0
votes
0answers
51 views

Trouble displaying custom fields within post type in WP_Query Loop?

I'm trying to write a query that displays a custom field within my custom post type 'Inventory'. The custom field name is category and the field type is taxonomy. The category is selected by a ...
0
votes
1answer
1k views

Create a full width responsive header image per page

I’m new to Wordpress - currently building a site that has a few pages (Home, Artists, History, Videos). Each of those pages need a custom header containing a responsive full width image (the image ...
2
votes
3answers
130 views

Order posts according to user defined order for meta values?

I have set up some CPTs and storing a meta key/val for each of them. When I get those posts, I need to order them by the meta value, but, the order of the meta values will be defined in an array by ...
0
votes
0answers
27 views

Custom elements for Wordpress Admin Menu Manager

Scenario: I want to allow users for a theme to set icons (fontawesome) to their menu items via the wordpress Menu Manger. To achieve this, one could set "screen options" to show css class field and ...
0
votes
0answers
21 views

View list of categories from values ​​in custom fields

Through the Advanced Custom Fields created a field to add values ​​in each category. example: Category A = Cars Category B = Aircraft Category D = Boats Category E = Aircraft Category F = Boats ...