0
votes
1answer
97 views

I need to exclude from a query a category and a few custom taxonomies

I need to exclude from a query a category and a few custom taxonomies. Is this code right? This query don't exclude any post, the one with the category, or the custom taxonomy. What am I doing wrong? ...
0
votes
2answers
64 views

Create menu locations for each category in wordpress

I need display a special menu in each category page in wordpress, for example I have 3 category: horse,dog,cat So I must have 3 menu in Menu Settings locations with name: horse,dog,cat with this ...
0
votes
0answers
76 views

wp_get_archive for category returning different URLs on different but similar sites

I have this code on two different sites in the sidebar: <ul class="news"> <?php wp_get_archives('cat=2&show_post_count=true'); ?> </ul> and this code in the main content ...
0
votes
1answer
73 views

!in_array doesnt recognize category

I want to fill an array with categories and tried to prevent duplicates with in_array: if ( $query->have_posts() ) { $categories = array(); while ( $query->have_posts() ) { ...
0
votes
1answer
246 views

How To Pass Array To get_the_category_by_ID() and Get An Array Back?

I am trying to pass an array of category IDs to get_category_by_ID() in order to get an array of category names back. Since I'm still trying to get this to work I'm just using var_dump() on the ...
0
votes
1answer
45 views

Matching usermeta at registration to categories of content

I'm trying to connect some user_meta data from registration form to some categories set up in admin to filter the presentation on the page. This one is tripping me up because the question has multiple ...
0
votes
1answer
436 views

Exclude a 'portfolio' custom category?

I have a custom post type called 'portcat' and I want to exclude one portcat category ('weather' - ID='5') from the page. I've tried 'category__not_in' => array( 5 ) but apparently this doesn't work ...
1
vote
1answer
126 views

Resort get_categories

I have a get_categories array $args=array( 'orderby' => 'id', 'order' => 'ASC', 'taxonomy' => 'wpsc-variation', 'hierarchical' => 1, 'hide_empty' => 0 ); ...
0
votes
1answer
263 views

Using multiple variables to assign categories to an array

I have php set up in a template file to check a form and see if 1 or more of 5 categories is selected. Based on which one is selected, I want the custom query I'm using to change in that the array for ...
0
votes
1answer
524 views

Get categories names as an array to use it in theme settings

I am building a theme and for the Theme Settings Page I followed this tutorial: http://wp.tutsplus.com/tutorials/using-the-settings-api-part-1-create-a-theme-options-page/ What I want now is to have ...
-2
votes
1answer
365 views

How to define category ID in an array?

I have the following: <?php if ( array( 'is_category', 'is_tag' ) ) { ?> What I want to do is (that doesn't quite work): <?php if ( array( 'is_category('13')', 'is_tag' ) ) { ?> So ...
0
votes
1answer
477 views

Listing all posts from current category on page

I'm trying to list all posts from a certain category, in a list, on the category page that already lists the posts out in blog form. I'm trying to do it in the header area so that you can get an ...
0
votes
1answer
405 views

Use premade array as categories in wp_query?

I have a theme options panel that the user can set which categories they want to use which is then saved as an array $blog_cat[0] etc. They can select as many categories as they want for the array ...
0
votes
1answer
123 views

Array: What is this value based on?

I need to do an import of an array of checkboxes, but there is a value that I don't how it is determined. The array is based on a user meta option that I created that shows a list of category ...
0
votes
1answer
276 views

Categories Listing and Highlighting current category item

My query is on Wordpress and related to categories. I have a set of categories for my posts: All, Cat-a, Cat-b and Cat-c. a. When I click on the link to my posts page, I want to show an archive for ...
0
votes
1answer
715 views

Return array of categories to php function

I am looking for a function that will retrieve the names and ids of all categories that will output a checkbox, or give me the data so I can perform a loop. <input type="checkbox" name="category" ...