0
votes
1answer
29 views

Show all posts of all categories but excluding a category on custom blog page with pagination of my theme

<h3>Recent Posts</h3> <?php // Display blog posts on any page @ http://m0n.co/l $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $temp = $wp_query; $wp_query= ...
1
vote
1answer
40 views

How to query_post custom posts within default taxonomy?

I'm trying to query_post custom posts. It works very good with custom taxonomy, but not with default "category" taxonomy. I tried using "category_name" and "tax_query", but it doesn't work for me. ...
0
votes
1answer
331 views

How to pass multiple checkbox values to wordpress query?

I am working on a website that has multiple check boxes and I want to show results based on what user has selected. There are about 16 check boxes for music, 8 check boxes for venues and 6 radio ...
0
votes
1answer
59 views

How can I list custom post by custom category?

From some references I wrote a code for create custom post type (journal) and taxonomy using following code. It works fine. Next I am add a new category from admin side for my custom post type ...
0
votes
0answers
161 views

Display newest posts from multiple categories ordered by date

I have the categories listed below in my post post type. Category Name: Test 1 ID: 1 Category Name: Test 2 ID: 2 Category Name: Test 3 ID: 3 Category Name: Test 4 ID: 4 I'd like to retrieve for ...
0
votes
2answers
123 views

Set colors depending on category

I have this function which outputs the last 6 posts of categories 1 and 2. <ul> <?php query_posts('cat=1,2&showposts=6'); ?> <?php if ( have_posts() ) while ( have_posts() ) : ...
0
votes
1answer
235 views

How do I query_posts in cat=1 AND not in cat=2

Let's say I have 3 categories, College (cat=1), Corporate (cat=2), and Idea of the Week (cat=3) There is a home page for College and a home page for Corporate. On the College home page, in one ...
0
votes
0answers
52 views

Show post when both categories are present but not one of them

I'm having issue filtering posts by category. There is the A category for posts (which is the default and also applies when no category has been set explicitly) and B category with subcategories for ...
0
votes
1answer
449 views

WordPress displays post on subcategory only

I'm using WordPress on developing a site and a self-made template. I got 1 page to display all categories with its post. This is what I want to do: Main Category subcategory1 post 1 subcategory1.2 ...
0
votes
1answer
94 views

How to get posts ordered by using their categories?

I have a page where I've got all the products on a single page. -- Link to the test site. What I'd like to do is to get the products ordered using their categories. Juices, nectars, concentrates, ...
0
votes
0answers
42 views

Custom Fields & Posts

I've got one template, which I use on many different pages. The problem is that I want to show different posts according to their "pagename" category. Ex. "About" is going to show "About category" ...
0
votes
1answer
368 views

Checking for two categories in query_posts

How can I check two category_name values in the following query_post? <?php query_posts('category_name=recent-work&posts_per_page=1'); if (have_posts()) : while (have_posts()) : ...
0
votes
2answers
75 views

4 posts per page from single category

I've been trying to display posts that I've categorized as "news-categories". My goal is to only display 4 posts on sidebar of "cbs-news" slug underneath "news-categories" category. By below mention ...
0
votes
1answer
144 views

Return category slug / title from category ID

I have a custom field set up that returns the category ID of a chosen category, I'm looking to use this category ID to show, in one instance: category slug, and another instance: category title. The ...
0
votes
2answers
29 views

wordpress taxonomy query posts

I have categories and sub -categories with same name.. but I want to show only the categories which is on the top level and not in the sub categories $qry=query_posts( array( 'post_status' ...
5
votes
1answer
4k views

Get posts from sites in Multisite?

I'm trying to pull multiple sites posts. For example, I can pull out a single site posts by a category and total posts 10. But I'm trying to pull out both posts from two separate Multisite blogs 1 ...
1
vote
2answers
131 views

Trying to find a way to query post like normal search would do. within search.php page

I have a costume search in a site i am making. When a user search a certain term, i want to display category list with a count of how many posts are found with in that category. I thought of a way ...
0
votes
1answer
52 views

PHP dynamical conditional post display

I'm trying to get the WordPress loop to display only the post has an ID that reflects whatever $category_name is equal to, as shown in the line of code below. It ends up showing everything and not the ...
0
votes
0answers
54 views

Displaying posts by year

I'm trying to display posts on the homepage from the current year only. I am using the following: <?php if ( is_front_page()) { ?> <?php $current_year = date('Y'); ?> <?php ...
0
votes
1answer
36 views

Show the latest post from child category?

How do i show the latest post from a child category? I have the category Photos, but I want to only show the latest post from the Child category "Paparazzi" what do i add to the code below to do ...
0
votes
1answer
403 views

Posts of specific category on page and excluded from index.htm

hope things are going well. I'm trying to create a member's only section specific for posts of about job opportunities. My goal is to have posts of this category displayed on this page and excluded ...
0
votes
1answer
361 views

new WP_Query issues

My default wordpress set hold 10 posts per page. In category.php , I want to override this with 999 post per page, the problem is that isn't working at all. When I use the following code. it ...
0
votes
1answer
812 views

Pagination on category.php and tag.php not working

i'm using a query-loop on my template pages like this: <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query = new WP_Query(); ...
0
votes
1answer
2k views

Paginate WordPress Category Pages

I am using the following query on my category.php template: <?php $paged = (get_query_var("paged")) ? get_query_var("paged") : 1; query_posts("posts_per_page=2&paged=".$paged); ?> ...
0
votes
1answer
66 views

single.php fires more than once after clicking on any post to view with different post id each time

I am now experiencing a wired problem with my wordpress installation. I was surprised when I saw post view counter of another post also increased including the the post on which I clicked to try and ...
0
votes
2answers
94 views

Getting posts from some categories plus some individual posts

I want to display list of all posts under a couple of categories and some individual posts. If I use the following code, it does not return anything, as it looks for those individual posts in the ...
0
votes
3answers
102 views

how can i hide category?

Please help me I am new baby in wordpress, how can i hide that 'course or call' category from the page.. i have var dump the variable which is passing as parameter to query_post $args = ...
0
votes
1answer
83 views

How can i listing current category and Featured Category post list?

I have a Featured Post Category. Im marked some post Featured. When i viewing a category page(e.g. Sport), i want to list on sidebar both marked post list (e.g Featured and Sport,) I tryed with that ...
2
votes
3answers
212 views

Exclude category from loop not working

I have this code in my index.php file. I have a different template for a static home page, this is the blog page. I'm trying to exclude all posts with the category "new" which is tag_id "13" <?php ...
0
votes
2answers
809 views

Display all posts from specific categories on a page

I want to display all posts from specific categories on a single page. Therefore I edited the page.php file in my theme folder. I added an 'if-clause' to check which page currently being displayed and ...
0
votes
1answer
2k views

List all posts in a category with query_post() function

I'm a C programmer, konw little about PHP. I built a Blog with wordpress. Yestoday, I try to create the page www.abc.com/server, this page would list all posts which belong to server category. I ...
1
vote
2answers
293 views

Query Posts Exclude Entire Category

I am using the standard wordpress loop that looks like: <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <h2><?php the_title(); ?></h2> ...
0
votes
1answer
353 views

Problem with different query loops (and “main loop”) on category template page!

so, heres the problem: i've created a category-template (category.php) with two query loops and the main loop (in which the content from the category should get looped in). if i now click on a ...
0
votes
1answer
180 views

query_posts not reading correct categories

I'm using this code (below) to display posts from a category on two separate pages. The first page lists category 32 and the other lists category 31. However, on the second page it displays posts from ...
1
vote
1answer
2k views

How To Modify The Loop in archives.php To Have 11 Posts Per Page and CSS Styling

I edited my loop in archives.php in order to work with pagination and with the Category Post List Widget. I basically pieced it all together from random code and ideas and am now so far from the ...
0
votes
2answers
2k views

Display one latest post from multiple categories

This should be very easy, however for some reason I can't find a working snippet anywhere on the web.. I basically need to display one latest post from 6 categories (can be changed to 7,8, etc etc) ...
1
vote
0answers
121 views

Order by category titles

I have a category page called 'features' this is all fine, but the posts in the features category also belong to a certain genre of film, and it's this what I want to order the posts by on the actual ...
0
votes
1answer
191 views

Displaying links to all posts of the same category on the post page

I want to display the links to all posts of the same category of the current post on that page. I wrote the following code in the single.php file. <?php $categories_of_this_post = ...
1
vote
1answer
71 views

Have parent category contain only one post?

Projects <-contains basic info about projects -Proj1 <-detailed info about proj1 -Proj2 <-detailed info about proj2 -Proj3 <-detailed info about proj3 I have a post attributed to the ...
0
votes
1answer
22 views

Post not found when filtered by category ID

On my home page I am trying to filter by a category type and limit it to one post; but I keep getting "no posts found". Here is my following code: <?php query_posts('cat=34&showposts=1'); ...
2
votes
2answers
2k views

List posts by category exclude current post

I'm trying to get a list of posts from one category, echo the title and the permalink of all posts on that category but exclude the permalink and the post name IF the current post is on that list. It ...
0
votes
1answer
1k views

Query only Posts from Both of Two Category?

I have 3 categories, 1.OnGoing projects(cat id='5') 2.Completed Projects(cat id='6') 3.Upcoming Projects(cat id='7') and also i have another 2 categories:(Not a Sub Category) chennai (cat ...
1
vote
1answer
233 views

Category Foreach keeps looping?

I'm using the following code to acquire all the child categories of a category and displaying the child posts of the child categories. <?php $cats = get_categories( 'child_of='.get_query_var( ...
1
vote
1answer
8k views

How to show related posts by category

In my gallery site i want to show other pictures under the current picture (in single post). I seen more codes but it i asks to specify the category, but i dont want want specify the category manually ...
0
votes
4answers
1k views

Exclude categories from postquery

I asked this question without a clue what was going on. I got an answer with the code below. It worked when I got it. I tested it with shirts only, assuming it worked with the other cats. it doesn't ...
0
votes
1answer
293 views

How to have a category not show up in query post with page panigation?

Basically I have this loop that shows all post. Inside of it I want to exclude post's from categories including shirts and hoodies, also the gallery category. Here is what I have so far. the code ...
1
vote
1answer
982 views

how to query posts and auto assign category if post title has keyword

how can i query posts by current date and auto assign category based on keyword found on post title, something like if title contains 'oranges' auto assign it 'oranges' category maybe something like ...
1
vote
2answers
521 views

How do I call posts with a certain tag?

I use this to call posts: <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $per_page = get_option('to_count_archives'); ...
0
votes
2answers
5k views

Sort posts alphabetically by category/custom taxonomy, insert divider between different types

first of all I'd like to thank you for all the great work you're doing. I've found a lot of useful infos and tricks taking a look around in Wordpress Answers. Well, I'm here to ask so that's my ...
0
votes
1answer
762 views

Query pages by category

Trying to query pages based on the category they are associated with. I am passing in the cat_ID, but it doesn't seem to be working. Always returns a single post with the title "Hello World" while ...