Tagged Questions
1
vote
1answer
64 views
Gravity Forms field entries into wp_query loop
I have a simple function that filters the page content when form (ID 18) is submitted. It simply displays the entry of field (ID 13)...
add_action("gform_after_submission_18", "set_post_content", 10, ...
1
vote
1answer
65 views
When tax_query used, results disappear (0 =1 produced)
I'm trying to perform a dynamic query that uses a dynamically passed taxonomy and post_type, and displays results accordingly —
A user makes a selection from 3 drop-downs on a form, each have a ...
0
votes
3answers
76 views
Show only one category in main query, issues on tag page
I altered the following code from Ashfame:
add_action('pre_get_posts', 'block_cat_query' );
function block_cat_query() {
global $wp_query;
if( is_home() || is_search() || is_tag() ) {
...
1
vote
1answer
78 views
list tags with count in author profile page
I would like to list tags with count in author profile page just like this page
If the user click the tag, then I would like to list the tagged posts.
Can someone help me?
4
votes
2answers
405 views
Build a content and excerpt grid loop with paging and options for # of posts
What I'd like to do: on index.php, a loop that shows a selectable number of full posts using the_content and then below that shows a selectable number (the number of posts can be hardcoded in the ...
0
votes
0answers
79 views
Hit counter adding hits to unrelated posts [closed]
I have created a simple hit counter by adding an additional table into my wordpress table
The table has columns (id, post_id, hits, post_type, date).
This is the function I've created:
function ...
1
vote
2answers
95 views
Having a Function Inside of the Loop
I am trying to make a frontend product editor for WooCommerce, and have a loop that returns all of the products for the current user. I am trying to use gravity forms as the editor, so a single ...
0
votes
2answers
51 views
Query is not work
I use this codes in my functions.php to track post views.
/* Functions to track Post Views*/
function getPostViews($postID){
$count_key = 'post_views';
$count = get_post_meta($postID, $count_key, ...
1
vote
1answer
336 views
Display tags that only appear in one category
I'm trying to get this less manual than it currently is. I want to display tags that appear in only a single category, so if they are in a post that has two categories, I want that tag ignored.
The ...
0
votes
1answer
95 views
Custom Query Not Paginating
I have a site that uses a custom query to filter posts:
<?php //Search Region table to retrieve array of country names
$regionresult = mysql_query("SELECT * FROM gallery_regions WHERE ...
0
votes
1answer
203 views
Replacing global wp_query
I have a site that uses a custom query to search for posts by country.
The search results come back fine, but the pagination at the bottom reflects the total number of posts in the site, instead of ...
1
vote
2answers
545 views
WP_Query in functions.php
I've got some code that I want to turn into a function. It works great until I wrap it in said function:
$args = array(
'posts_per_page' => -1,
'post_type' => ...
0
votes
1answer
144 views
How to apply the 'current_page_item' class to an archive page in `wp_list_pages()`?
So I have the following custom wp-query working on my site:
function custom_front_page($wp_query){
if($wp_query->get('page_id')==get_option('page_on_front')){
...
2
votes
1answer
735 views
How to use a custom post type archive as front page?
I'd like to use a custom post type archive as a site's front page, so that
http://the_site.com/
is a custom post type archive displayed according to my archive-{post-type}.php file.
Ideally I ...
-1
votes
1answer
248 views
Integrating custom API for post content into Admin interface & Public Website [closed]
EDITED question to be more specific and added bounty in hopes someone has a solid coded solution:
So, here is an interesting task I have been trying to find a solution for. I have added a bounty ...
0
votes
1answer
315 views
Filter for replacing the WP_query object for a given category
I'm looking for a action/filter to replace replace a category archive page with the contents of a page. I'm thinking of testing the category ID, and replacing the WP_Query object with a new one ...
