0
votes
0answers
11 views

Creating a filter to modify links ending in .pdf

I'm trying to create a filter that checks for links that are to PDFs, and append the href attribute with something like /form?file=[path to pdf]. For example, starting with: <a ...
0
votes
1answer
40 views

Filter and display a specific custom field value [closed]

I am developing a travel website for an agency. I'm trying to to make the user able to select an option like "Select your departure" and filter the loop with all the departures available for the ...
0
votes
0answers
16 views

Sort WP_Query by one meta key and post_date [duplicate]

I want to order by post to check for the existence of a meta key ('featured') and include those posts first and as a secondary option I want to sort by post_date, similar to 'sticky' posts on a ...
0
votes
1answer
39 views

query post based on comparison

Each post in my site can be rated as 'good' , 'ok' , 'bad'. The values are stored in custom fields. I now need to show top 10 posts with maximum 'good' and it should not display posts with greater ...
0
votes
1answer
51 views

How to filter post using custom feild value in shortest and longest duration?

I am working on a video blog. On the front page I have a sort by option. You can try the option at the following link http://cricketclips.net/ Can't figure out how to make the shortest and longest ...
0
votes
1answer
92 views

Let Users Filter Posts by Custom Fields

I'm using the Advanced Custom Fields plugin to add custom fields to my posts, but was wondering what is the best way to go about creating a filter box for the user to filter through posts. I've ...
0
votes
0answers
59 views

Display Category only if there are posts of custom type

I need to do a small modification on WP site done by someone else. And my WP experience is close to zero. But I'm comfortable with PHP. Wordpress Version: 3.8 Plugins: ONLY Advanced Custom Fields ...
0
votes
0answers
94 views

Query Posts Via WordPress URL

I wanted to learn more about querying post types and their custom fields in WordPress. I've got two questions... I've followed this tutorial on Advanced Custom Fields and am trying to understand what ...
0
votes
0answers
31 views

Custom field in title

I'm trying to change the posts with no titles to 'custom field' + 'mystring'. So far I got this code. add_filter( 'the_title', 'ta_modified_post_title'); function ...
0
votes
0answers
67 views

Set post title and slug from meta fields not working

I have a custom post type where I have the post title disabled. I want to set the post title and slug from some custom fields. I was using this and it worked great, but since I've upgraded by site to ...
0
votes
2answers
181 views

How to Wrote Simple Calculations by Using Custom Fields in Loop?

I am building a website with whole bunch of custom fields and need to implement several custom fields that will auto calculate values by using values from other custom fields. All files which I need ...
0
votes
0answers
59 views

How to create filter for site

Good afternoon. Learning WordPress, I would like tips on how to make the filter on my website (not in the admin panel). For custom fields using magic fields 2 to display all the records I've just ...
0
votes
1answer
1k views

Apply the_content filter to a custom field with multiple values

I have a custom meta box set up that allows users to paste the Youtube URL of a video so that it can be embedded into a post/page. The meta box can be repeated so that a user can add as few or as ...
1
vote
1answer
628 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 ...
1
vote
2answers
317 views

global function to apply filter to custom field

I have an action hook which works perfectly for the_content. I would like to apply the same hook anytime a handful of custom_fields are requested. The custom fields are 1) myfieldone 2) myfieldart 3) ...
1
vote
3answers
431 views

Change content before writing to database

I've searched around but I can't quite pin down the answer for this. I am attempting to use the content of a custom field as post_data and save it to the database as such when a post is created or ...
0
votes
2answers
241 views

Custom Theme Fields in Settings Menu - apply filters to one of those fields?

I found an interesting concepts of adding an additional option to the "General Options" in Wordpress. /** * Custom Theme Settings * see http://digwp.com/2009/09/global-custom-fields-take-two/ */ ...
0
votes
1answer
51 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 ...
1
vote
1answer
2k views

Filter results with custom field values and dropdown

I need to filter posts by a custom field value. My specific example: User browse to products > category 1 > subcategory A. ALL "subcategory A" items (products custom post type) are displayed as ...
0
votes
1answer
71 views

How to display childrens custom fields?

I need help, I have a page that I want to display content from the page children, I get the content but not the custom fields! I've tried this but it dosnt work, what am I doing wrong? <?php ...
0
votes
1answer
311 views

How to change permalink on headlines in rss feeds?

On mysite.com/feed the headlines of my posts listed in the feed are linked to that posts permalink, for example mysite.com/my-first-post. This is standard behaviour. But sometimes I would like this ...
0
votes
1answer
200 views

How do I filter a custom post type loop by a field?

OK, very simple task, I'm just not good at PHP. I have a page where I want to list some staff using a styled list. Here is the page all working fine, I just need to divide the results - ...
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
1answer
390 views

Force hide custom field metaboxes

How can I completely remove the custom fields and the collapse button in the Edit Post/Edit Page custom screen, but without removing the capability to add custom fields with a PHP function?
0
votes
1answer
150 views

Create widget that filters posts on current page based on entered value

Can somebody point me in the right direction wouldnt have a clue how to start programming this. I want to filter post based on price (custom value) thru a widget. So lets say you click on a post ...
0
votes
1answer
167 views

How do I assign this filter to a variable? (Appending php & markup to the_content)

===I HAVE SOMETHING THAT WORKS NOW, JUST NOT CORRECTLY. PLEASE READ THE WHOLE POST, I AM GOING TO LEAVE IT ALL UP HERE BECAUSE OTHERS MAY BE ABLE TO BENEFIT FROM ME BUMBLING THROUGH THIS PROCESS!! I ...
5
votes
1answer
8k views

Add filter menu to admin list of posts (of custom type) to filter posts by custom field values

This answer is very close to what I am looking to do, but instead I would like to specify a specific custom field and display a select menu of its available values. Thanks!
0
votes
1answer
545 views

Filter search posts by post meta?

I'm working with a custom post type with custom taxonomy and custom fields and trying to filter the displayed results (on admin post listing page) by the custom field values... I've been trying to ...
0
votes
1answer
619 views

Including inline Custom Fields info with add_filter in functions.php

I have a function set up to place some standard text in each post for a Custom Post Type. However, within that standard text I want to pull some unique text from a few custom fields. Not sure what is ...
0
votes
1answer
745 views

How to query posts by month based on date custom field?

I currently created a custom field for a custom post type that stores a date in the format dd/mm/yyyy is there a way to query the posts by the month? I "kind of" got the functionality I need using ...
0
votes
2answers
877 views

Sort posts after filtering them through multiple taxonomies

I'm using scribu's Query Multiple Taxonomies to filter posts through multiple taxonomies (which works great!). However, I'd like to allow people to perform further sorting on the results based on ...
2
votes
1answer
943 views

How to filter a dd/mm/yyyy date from a custom field in a query

I'm trying to build a query in order to sort some posts by a date custom field, where the dates are formatted dd/mm/yyyy. It works by querying the database directly with get_results like in this ...
1
vote
3answers
988 views

Saving custom profile fields

I'm adding a custom profile field to users of a specific role, like this : function add_custom_profile_fields( $fields ) { // get current user ID $user = new WP_User( $_GET['user_id'] ); ...
0
votes
2answers
783 views

Filter or order based on custom field

I have added a custom field to some posts called 'frontpagerank' The plan is to order the posts by this value but first I just want to filter out any that don't use a front page rank. I have achieved ...
4
votes
3answers
9k views

Filter by one custom field, order by another?

I have a custom post type "Listing" and I want to get all Listings that have a custom field gateway_value != 'Yes', and order the results by another custom field, location_level1_value. I can get the ...
4
votes
2answers
9k views

Filter WP_Query for posts having a certain meta-value

How to filter WP_Query for posts having a certain meta-value, without using a Custom Select Query? I have a custom posttype with meta-key: "open", and meta-value options: "yes" or "no". I would like ...
3
votes
2answers
2k views

Archive sorting functions by custom fields (front-end)

I want to give the users the ability to sort the posts in the archive by some custom fields that I pre-define. The end result would be en a tabbed container, and the user will click on the relevant ...
1
vote
1answer
611 views

How to order posts by one custom field and filter them by another one?

In my WordPress blog I have events I want to order and filter by custom fields. The order should be done by the custom field "event_date_end" which means that every event that is still running should ...