Post meta is a data set containing additional core as well as custom post information.
0
votes
1answer
22 views
filtering custom post types via meta data drop down
I'm trying to add drop down filters (that are populated by terms that are in use) to a custom search page for "opportunities" or listings page. Currently I am doing this with taxonomies but doing this ...
0
votes
2answers
42 views
Up/Down voting system for Wordpress
Looking in all posts with keywords "voting system, upvote, downvote", I can't find a satisfying solution for this issue, except accepting one of the available plugins, spend a lot of time undersanding ...
0
votes
0answers
23 views
Problem with custom fields for custom meta data
I'm trying to fix an problem in custom fields for meta data information. I already added the code to add some code:
add_action("admin_init", "admin_init");
function admin_init(){
...
1
vote
1answer
37 views
WP_query posts closest to todays date
I have written an wp query which I would like to order in a bit of a complicated way. Some posts have a meta value 'the_date' which is an end date for the post. I would like to order posts in date and ...
0
votes
1answer
25 views
Modify custom field from front end
If I need to manage a custom field under wordpress, but not from the admin area. In other words, I need that users modify the content of post custom fields from front end. What is the way to do so?
...
0
votes
0answers
13 views
_wp_attachment_metadata necessary for importing images into wp_postmeta table
I'm working on a project to convert an older custom developed PHP site into a WordPress site.
One of the problems I'm trying to figure out is how to import all the images from the old site and ...
0
votes
1answer
17 views
Adding an orderby filter, casting postmeta with multiple keys
I am using this filter to sort my query by a date field stored as text (legacy data)
add_filter( 'posts_orderby', 'my_posts_orderby_date', 10, 2 );
function my_posts_orderby_date( $orderby, $query ) ...
0
votes
1answer
27 views
How to update/delete array in post meta value?
I using post meta like..
$meta = get_post_meta(99,'_mymeta',true);
$value = $meta['somekey'];
echo $value;
But how to update $meta['somekey'] to some another value ?
How to use update_post_meta to ...
0
votes
0answers
20 views
Custom WP_Query for WordPress Search Results with meta_query
I am using a custom query to generate my search results. The code I am using works perfectly without the meta_query variables in my arguments array.
I am trying to compare multiple custom fields with ...
0
votes
1answer
19 views
New Table vs Post / Comment Meta
I am working on theme where I am adding vote functionality to comments and posts. What should I use, meta tables or create a new table?
1
vote
0answers
16 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:
...
1
vote
0answers
24 views
Copying Custom Meta Values from existing post to a duplicate post
I'm trying to revise an existing WP plugin BU Versions to accept different custom meta field values from items I've set-up using the Advanced Custom Fields (ACF) plugin.
BU Versions will copy over ...
0
votes
1answer
45 views
Custom query with category exclusion and post-meta “whitelist”
I have two widgets, one shows News while the other shows everything except News (We'll call the second one Blog). The blog portion is currently working correctly.
The News posts are either ...
0
votes
0answers
29 views
hide an author_meta on a post if the Co-author function is active
I want to hide an author_meta on a post if the Co-author function is active on a post.
For example: This is how it looks with one author
By Author Name | Contributor Published: 05/03/2013 2:00 ...
-3
votes
1answer
58 views
Custom Form Data save after Login User
This is form on my first page. I have to manage if user is not logged in, in that Case after submit form action is Login Page.
<?php/** Template Name: Form */
get_header(); ?>
<form ...
0
votes
0answers
39 views
Retrieve post data via WPDB class
I'm trying to figure out doing a custom query using the $wpdb Object.
I have custom type posts, event_posts, that have meta data, images, as well as event dates which are input in the post with the ...
0
votes
0answers
28 views
Wordpress custom field being lost on wp_update_post, with a twist
I'm using wp_update_post to programmatically add a title and tags to posts from the front end. I'm running into a hair-tearing issue with custom fields in the process: one of the two custom fields ...
0
votes
2answers
23 views
get meta value from page query
I need to check each page to see if it has a default template or another template assigned. If it's default, I want to do X if it's not, then I will do Y. Problem I found is that the query is not ...
2
votes
1answer
49 views
unable to save post meta on single field with multiple selects
I set up two select boxes in one meta field by putting two arrays inside the 'options' array of my callback. The HTML is outputting fine, but the meta is not being saved to the database...
Here is a ...
0
votes
1answer
29 views
Display meta data from a custom field within plugin Category Grid View Gallery
I am using this plugin, which creates a gallery of posts, fetching a thumbnail and the titles of the posts displayed in it.
I have enabled Custom Fields, and have created (and filled in values) a ...
1
vote
1answer
34 views
Get specific custom field keys from a post and put into an array
I have the following code to look up the longitude and latitude based off of a custom field upon saving the post. My address fields (street_1, city and state) are separate. I have searched and thought ...
2
votes
1answer
15 views
Set attached to state
In the media library every attachment post has an "Attached to" column. I've developed a plugin that adds author profile and a facebook like banner image.
I now discovered that the attachment posts, ...
0
votes
1answer
18 views
Get post category as a separate string and url
I need to figure out how to get post category as a string and link, both separate from each other.
So the return would be something like:
Uncategorized
http://link-to-the-category.com
however both ...
0
votes
2answers
38 views
Best way to achieve multiple links in a post title
Usually I would get a post title no problem, however now I need to achieve something like this:
The Example is written for this title
As you can see two words are links in the title, another ...
2
votes
3answers
26 views
Custom fields: In what order are they saved into the DB?
If I insert multiple custom fields to my article, they get sorted in "I don't know what" way. So when I insert some multiple fields in an article and call those via
$cf = get_post_custom();
foreach ...
0
votes
0answers
10 views
problem retrieving specific custom meta [duplicate]
I want to retrieve just 2 custom fields from my post, this is what I've tried:
<?php echo get_post_meta(get_the_ID(), 'CLUB','DATES', true); ?>
This code is retrieving just the first one ...
0
votes
2answers
44 views
display specific custom fields
I have few custom field assigned for each post, like:
"Club" with value "club1"
"Date" with value "date1"
and so on...
Now, I want to display from all the custom fields just those 2 " club" and ...
1
vote
1answer
35 views
Is it possible to store visitors IPs in wp_postmeta table?
Or in any of the other 11 Wordpress tables. I also need to store: submission date, name, contact number in the same table.
What approach would be best? A custom table or using a standard table?
0
votes
0answers
30 views
Access Serialized Post Meta Values
I am using the Humanmade fork of a custom meta box class, they give the ability to set up groups of repeatable fields, as such I have a post saved with post_meta as follows ...
6 meta_id entries in ...
0
votes
0answers
40 views
delete attachment for one post without deleting actual attachment post
I'm writing custom ajax calls for media attachments from FrontEnd, I have everything read to use, except the actual logic.
I'm using WP E-Commerce plugin, where I want many images for one post. And I ...
0
votes
1answer
45 views
My theme saves their custom post type's metadata as a serialized array, how to access the keys?
I've recently bought the WP Directory Portal theme from ThemeForest.
Since the theme doesn't do frontend posting of custom post types, I've resulted to using WP User Frontend Pro.
There's a problem ...
1
vote
1answer
78 views
How do I retrieve multi-dimensional arrays from the wp_postmeta table, & display on a website?
I would like to retrieve multi-dimensional arrays (that have been created with metaboxes), & display them on the front end of a website using shortcodes.
My Question: How do I retrieve ...
0
votes
1answer
33 views
displaying an error before update_post_meta
I'm trying to restrict how many items you can associate with a post so in my save function I have:
add_action( 'save_post', array( $this, 'save_custom_items_data' ), 10, 2 );
public function ...
0
votes
2answers
48 views
IF Custom field value equals ZERO
I am trying to use the following code to check for my custom field for a value of ZERO to then display my div
<?php
$mp_price_sort = get_post_meta('mp_product_price');
if ($mp_price_sort == '0') ...
0
votes
1answer
62 views
Select from wp_post and multiple meta_value from wp_postmeta
My lack of SQL skills has stopped me in my tracks here.
I'm trying to select post_id, post_title and two postmeta values - the first has the meta_key of 'search_country' and the second a meta_key of ...
0
votes
1answer
25 views
Recommended Post Structure for DB Storage
I'm trying to write a plugin that would help my local little league manage their league, and though I've read the New Table vs Post Meta question, it's still a bit unclear and I'm hoping someone here ...
1
vote
0answers
41 views
Attach time/date stamp on add_post_meta
we have an image viewer on our website where admins can tag images thought ajax (new feature on Wordpress 3.0). We are tagging just fine, but we need to filter when they were tagged. We are using ...
1
vote
0answers
58 views
Filter list by a unique meta value dilemma
I'm been racking my head at this for a while now, and I can't figure out how to fix the code.
Here's the issue;
I found a snippet of code online to filter my post results in edit.php based on ...
0
votes
0answers
42 views
Custom Wordpress Meta Query
I have a post type (course) that has some meta data associated with it, namely the following two:
City and State
The two pieces of data above are stored in the postmeta table, with meta_keys ...
3
votes
1answer
53 views
How to use multiple query with same meta key
I use these codes to print custom field query.
My custom field key is out_wiki
<?php if( get_post_meta($post->ID, "out_wiki", true) ): ?>
<div class="outlink">
...
0
votes
1answer
113 views
Displaying Meta Box Image
I have some problems displaying info from my custom meta box in my custom post type single. I'm using Reusable Custom Wordpress Meta Boxes by Tammy Hart.
I'm able to display the textfields using ...
6
votes
1answer
182 views
Save other metadata on image upload?
I am trying to have Wordpress automatically save the "credit" metadata that is stored within images I am uploading. I know this would be entered as a custom post meta field using update_post_meta().
...
0
votes
1answer
31 views
Write query according to post_meta
I have a front-end form which stores some data related to that post and adds that post to their favorite posts when the user clicks on it. So now my concern is when the user clicks on the favorite ...
0
votes
1answer
35 views
Add a class to post_class if more than one post shares same meta_value_num
I would like to be able to add a class such as .samedate to posts that share the same meta_value_num from a custom meta box.
So for example:
Say two posts share the same custom meta box value for a ...
0
votes
1answer
31 views
Author_meta ONLY if it exists
I'd like to ONLY show the authors website link if it exists, but I can't work out the exact syntax for it.
I have this
if ( get_the_author_meta('user_url') ) : // If a user has filled out ...
0
votes
1answer
30 views
Top 30 Songs using Custom Post Type
I have successfully created a Top 30 songs ranking via custom post type. Now im stuck with adding "Peak Position" post meta. I don't know how to program it. Peak Position is the position where the ...
0
votes
1answer
43 views
Custom Fields help
After read a lot in a lot of sites, finally I was able to do something similar what I was trying (read a lot because I don't know code at all), is the follow:
I want to use a background image for my ...
1
vote
1answer
80 views
Better post meta efficiency?
I work with websites which require using Post Meta for Post Objects within a particular Post Type.
I often add a Meta Box to a particular Post Type, to provide additional settings for the new Post ...
2
votes
3answers
100 views
Function to change meta value in database for each post
I have a meta key called 'prijs' in each post. The value of this meta key consist of numbers in the follow structure: 2,100.00
I want to remove the comma in the meta value to get this output: 2100.00
...
0
votes
1answer
32 views
Footnotes in custom fields
I am using Jquery Hover Footnotes plugin that allows adding footnotes and dynamically displays them on hover-over.
In other words, I use {{FOOTNOTE_NUMBER}}, Then I embrace the actual footnote text ...
