0
votes
1answer
40 views

List of Events with Multiple Dates: Only NEXT Date

I am currently developing a site http://madstheatre.com that will serve as a resource for Performance and Audition information in Madison, WI. A feature that is preventing me from starting to go ...
0
votes
0answers
100 views

Check if values exists DB

I am getting nutts with this one. I want to check if the email introduced in the form already exists in the database before creating a new record. But for some reason the email is empty at search ...
0
votes
1answer
221 views

Custom Search Query

I'd like to set up a custom search page that does the following: User checks off several items in a form that he'd like to see returned in his search (essentially choosing from a list of tags). ...
0
votes
0answers
40 views

Multiple Taxonomies Using Custom SQL Query

I am running a custom SQL query, and I am trying to pull posts with two taxonomies assigned to it. Here is my query which works: $querystr3 = "SELECT *, events_startdate.meta_value AS ...
1
vote
0answers
23 views

Order posts with a custom field but also without

I am querying and ordering posts with this code but my theme adds the custom field (cb_vote_nb_vote) only if someone clicks the "vote" button, since I am doing a listing, posts created without that ...
0
votes
1answer
21 views

Custom Same Page Search

I've added a custom form to one of my page templates. It submits to itself $_SERVER['REQUEST_URI'] in hopes I can grab the $_GET values and modify my query using pre_get_posts, but instead it goes to ...
0
votes
0answers
48 views

query custom post type by date

I created a custom post type envent. I d like to filter out post in the futere. I did use the advanced custom fields plugin to make a date picker. I used following code, but somehow id does not filter ...
0
votes
1answer
85 views

get_var result empty for query of custom table in plugin admin

(There are a lot of related questions to this but none I can find with answers that have worked.) get_var returns empty when I query a custom table from a custom plugin for multisite. What am I ...
0
votes
1answer
567 views

Fatal error Call to a member function insert() on a non-object [closed]

I am running Custom Query on functions.php: function subscribers(){ if(isset($_POST["email"])){ $email = $_POST["email"]; echo $wpdb->insert($wpdb->easymail_subscribers, ...
0
votes
1answer
42 views

search meta field for a value in all posts

Hi I want to search meta field for a value in all posts. Code below shows what i want to accomplish (im wp and php beginner and cant manage to make it work by myself). If in meta field "voted_IP" ...
0
votes
3answers
392 views

Dynamically switch template on click

I have a custom post type setup with a couple custom fields. I am creating a page where I display all of the custom post types, except I want to have multiple views. See the examples below. One is a ...
0
votes
0answers
24 views

Query users base on custom meta data

I have no idea how to write this and need a helping hand. What would be the query for users with custom role of "gamer"and by custom meta "location" and SORT by custom meta "position"? I've tried ...
0
votes
2answers
299 views

custom query for both category and pages using global $wpdb;

I have a custom query returning categories, but I also need to return some pages with a particular post ids. How would I add those? They obviously have no taxonomy and are page post types. Below is ...
0
votes
0answers
69 views

Custom Post from Custom Query with Multiple Custom Taxonomy Terms with Pagination

I have a page template like having code, (on the link below) http://pastebin.com/mZaRLKp2 Actually it's the problem of getting custom post list having all the multiple custom taxonomy terms with ...
0
votes
1answer
166 views

display certain category on custom template page

i duplicated a portfolio column page template ... On this page I want to show only one category , instead of all categories... I tried a lot, but couldn't get it worked... this is the original code ...
-1
votes
1answer
54 views

Highlighting Sub topic in a post?

Have seen this sub topics highlighter in many blogs. It gives a special attraction to a sub topics used in the post. Is this a plugin or part of code? How can I add this? http://imgur.com/UbGpz7j
0
votes
2answers
18 views

How to have more post in a page than in your home page

I am new to the world of WordPress. I own a new site and I'd like my home page to display the latest news and articles (which I accomplished to set in Settings > Reading), but I'd like another page to ...
0
votes
3answers
153 views

custom user meta query

I've been trying to get this query to work but it keeps failing to return any rows SELECT a.ID FROM wp_users a, wp_usermeta b WHERE b.user_id=a.ID AND ( (b.meta_key='firstname-groom' AND ...
0
votes
1answer
86 views

Custom Wordpress SQL Query 4 posts per custom taxonomy

I'm currently developing a Wordpress website that has a large navigation that lists the 4 most recent posts within a hierarchical taxonomy. I dont have any experience with $wpdb, but it seems like ...
0
votes
0answers
82 views

Order custom fields by string length

I am trying to reorder a custom field from one of my Custom Post Types. I'd like to get the custom field string which is called 'first name' and order all of the first names by their string length. ...
0
votes
1answer
319 views

How to add a prefix to existing custom fields over MYSQL query?

I've got the problem that after a plugin update I can make the custom fields on our directory site searchable, but only custom fields which get the prefix booking_ to them. Now there are some pages ...
0
votes
2answers
538 views

How to display only one category in a custom post type?

I have a custom post type called 'portcat' and I want to display the results of only one portcat category ('games' - which has an ID of '3') on my page. The below code displays all of the categories ...
0
votes
0answers
136 views

Custom query on Wordpress custom table

I am working with a custom table where some values will be inserted or updated if they already exists, I have checked and rechecked the syntax and it seems to be working fine, if I run the same query ...
0
votes
0answers
121 views

Special Query: Title, Terms, Content - %LIKE%

I'm working on a them theme that is search-heavy, and my users are putting huge priority on an improved search function. I think I will have to use a special direct query to search these things: ...
1
vote
1answer
64 views

Wordpress Custom post query sorting does not work

I created a custom WP query to collect products that have 3 different taxonomy values in them and sorted them by price using the following: $my_products = new WP_Query( array( ...
0
votes
1answer
433 views

Load more posts with multiple queries

I've been developing a theme which uses the load more ajax plugin, everything is setup and working great with the main query. But, once I setup a new query for popular posts, the load more posts ...
0
votes
2answers
1k views

SQL query to get posts from multiple categories but not in a category

I need to get the last posts' ID and the post_tile within categories 1 and 2, and exclude those within category 3. It must be SQL, because if I use WP_Query it retrieves too much info and I only need ...
0
votes
2answers
140 views

Custom MySQL query to list post

I have the following query: SELECT p.* FROM orders_items oi INNER JOIN products pr ON pr.`post_id` = oi.`product_id` INNER JOIN posts p ON p.`ID` = pr.`post_id` AND p.`post_type` ...
1
vote
1answer
1k views

Custom search page and search by title, content and tag

Can someone review my code , I need to know better solutions or any bug. Okey ! , I made a PHP file to get search results by parameters and search by title , content and tag PHP's head look like: ...
0
votes
1answer
120 views

Custom Query Arguments

I want to run a query base on the following $args. My question that how to pass variable number of arrays to tax_query as currently i have two arrays within tax_query it can be 1 , 3 or 5 and so on. ...
0
votes
3answers
656 views

Split wordpress loop to multiple layouts

OK so I've searched a lot and couldn't find a straight forward answer to my question. I am simply trying to use one category loop that will display posts in a category page in a wordpress site. lets ...
0
votes
1answer
49 views

Custom Query for Taxonomy

What is the correct wpdb custom query for this: taxonomy=pa_main-genre&post_type=product&orderby=name&order=asc Basically i am trying to do is,list all the terms for pa_main-genre. ...
0
votes
1answer
167 views

Recent activity query WordPress

Does anyone know how I can get a list of posts based on their recent activity? Activity such as a new comment, an edit, a new post, et cetera. Some Q&A wordpress themes seem to be using this but ...
2
votes
1answer
3k views

WordPress Paginate $wpdb->get_results

Due to a complex multisite config, I have a query which combines the posts from two blogs and I would like to paginate the results. I am grateful for any help. I have posted my query. ...
0
votes
1answer
78 views

How can I add more code to this?

<?php $my_query = new WP_Query( "cat=11&posts_per_page=1" ); if ( $my_query->have_posts() ) { while ( $my_query->have_posts() ) { $my_query->the_post(); ...
0
votes
1answer
444 views

Custom SELECT Query With Multiple Meta Values (Ordering Problem)

I have two custom meta values that I am using for an events list and have almost got everything working perfectly except for the ordering. I have two dates (event_date and event_enddate). One of these ...
0
votes
1answer
898 views

How to query term_id of a Custom Taxonomy by name

I have created a custom taxonomy "Birthday" within which i have created various dates like "December-12", "April-15" How to get the term_id of the "December-12" by a query. Thanks.
0
votes
1answer
279 views

query usermeta from custom field

I am using a plugin to create custom fields in the user registration. I have created a check box field called g300 which is the name of the meta_key stored in wp_usermeta. It looks like the value ...
0
votes
3answers
341 views

Custom Select Query - Selecting the Year?

I have a query were I'm grabbing all post types of "news" in 2010, but it doesn't select the posts from that year. What am I doing wrong? $querystr = " SELECT $wpdb->posts.* FROM ...
0
votes
1answer
230 views

How to query an out put value?

I have this custom query that Im working on and I need to be able to query output values as well as actual stored values. Example: $string = "This is #*&^% a test"; $string = ...
0
votes
1answer
715 views

Searching with Multiple (Parallel) Criteria on Custom Fields?

I'm just an basic Wordpress user. I need to make search box with multiple criteria inputs (multiple conditions) to search inside various Custom Fields. For example including following Custom Fields: ...
0
votes
1answer
433 views

Trying to exclude custom posts based on date, while sorting by custom field

I have a custom post type named "performance". I have a custom post query that orders posts by a custom field value (order-date). Now I want to exclude posts that have order-dates that are in the ...
0
votes
1answer
416 views

Query Multiple Custom Taxonomies

I registered 2 taxonomies: festival_year and art_genre. I would like users to search for a specific year and genre but am not sure the best way to do this. I have tried various plugins but none have ...
0
votes
2answers
154 views

custom post-type query just returns two posts

I'm making a custom activity calendar for a client here: http://arbeidshesten.com/aktivitetskalender/ The backend is a custom post type "aktiviteter", with custom fields for the date ("dato") and ...
0
votes
1answer
369 views

How Can I Always Display A Particular Post First Using WP_Query?

My apologies if this question has already been asked somewhere else, I searched but couldn't find anything. I am working on a tours website, there will be individual package pages that show some text, ...
0
votes
1answer
93 views

Number of posts in the archive

How do I show 10 posts on the first page of the archive, and 20 on others (>1)? My custom post type name is "apartments". Cheers!
0
votes
1answer
319 views

Prioritising and Ordering Posts By Category Name Using A Custom Loop

I have a custom loop pulling out videos all assigned to various categories. However there is a category called "new-video" and I need to pull out all videos using my custom loop, but I would like the ...
1
vote
2answers
2k views

Adding Variables to post query

How do I add custom variables to the wordpress query without having to hit the database twice. In the example below I want to add some meta filters. All this code works fine but I have been running ...
0
votes
1answer
32 views

Is there a (preferable built-in) way to check what custom queries are used in a theme?

I've build a theme using custom post-types with queries like $my_custom_post_type_query = new WP_Query( array( 'my_arg' => 'value' )); Now I'm writing a plugin where I need to do something like ...
0
votes
2answers
1k views

Multiple Category Query

Is it possible to display a wordpress category page but have it pull posts from mulitple categories? For example, let's say I need to pass in params for cat_id in this fashion ...