Tagged Questions
1
vote
2answers
36 views
Where do posts get the sidebar from?
I'm trying to add an if statement on the sidebars that are displays in POSTS. I want posts to show a specific sidebar if it's in category x and display a different sidebar if it's not in category x.
...
0
votes
1answer
37 views
How to change links in the 3 main categories, on widget category, to a javascript function call
I'd like to know..
How could I change my 3 main categories links, so they call a javascript function?
I'm using Snapshot Theme from WooThemes.
Here's the current state of the website:
...
0
votes
1answer
20 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 ...
0
votes
1answer
42 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
40 views
How to exclude 2 Portfolio Categories from page?
I want to exclude 2 Portfolio categories (IDs 4 & 23) from a page using the code below but it still displays all categories. Similar code works for 'Posts' but not for 'Port' - can anyone see what ...
0
votes
1answer
54 views
go to home page when i select default in select-box
I'm new for WordPress. I'm using following code,
<div id="cat_list">
<?php wp_dropdown_categories(array('show_option_all' => 'Categories') ); ?>
</div>
And my JavaScript ...
0
votes
1answer
37 views
Remove the_content From Loop
I'm trying to display a custom loop with only certain elements in it.
My loop currently contains the title, creation date, author & content.
However I am trying to remove the content for each ...
1
vote
4answers
85 views
Different backgroundg-image by category
I am trying to put different body background-image for each category.
body {
background-color: #000;
background-image: url(img/bg.png);
background-repeat: no-repeat;
background-position: center ...
0
votes
1answer
40 views
Older entries link within a category page
I have set up a category called 'blog' and have all of my posts displaying from this category. I have selected to display 4 posts / page therefore there is a link at the bottom that says older ...
0
votes
1answer
66 views
Stop header code from showing in category page?
Hi I'm using the code below to show different header images in my custom template archives.
Only problem is that it is also showing the headers in the category templates.
go to ...
0
votes
2answers
122 views
How do I remove a category from a wordpress loop>
I have a question. I need to have, in my archive.php file, a exclusion of a specific category. given what I have now, how would I make that happen?
Here is the code:
<?php
...
-1
votes
2answers
58 views
Fix incorrect related posts code snippet
Can anybody fix this incorrect related posts codes snippet?
function related_posts() {
if (is_single()) {
global $post;
$current_post = $post->ID;
$categories = get_the_category();
...
0
votes
0answers
9 views
Is there wordpress function that will subscribe a user to a specific blog category [duplicate]
Possible Duplicate:
Help integrating subscribe2 category subscribe into another plugin. (1 post)
Maybe this is more specific to the plugin I'm using (subscribe2), but is there a function I ...
2
votes
2answers
69 views
Categories Template Assistance
I have found a tutorial online for creating a custom categories template for my archived posts within a particular category. This however is targetting a specific category ID (see below), is there ...
1
vote
1answer
169 views
Archive listing of posts by publish year (multiple years)
I have an archive page showing all blog posts (in a specific category). With a growing number of posts, I want to separate these by publish year. For example (simplified), I'd like the following:
...
0
votes
1answer
121 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
2answers
207 views
Display all posts in current category
I am looking to create a behavior as shown in the following link:
http://www.javaexperience.com/java-role-of-serialversionuid-in-serialization/
Here all posts from the same category are being ...
0
votes
1answer
31 views
displaying the categories post
I have this php code below for displaying the post from the specific categories.
<ul id="sliderx">
<?php query_posts('category_name=slideshow&showposts=10');
while (have_posts()) : ...
0
votes
2answers
215 views
Categories from front-end, checkbox selection doesn't work
I'm using the plugin Post from site, which sets up a WP front end writer. I changed some line of code because I need to select categories with checkboxes and not with a multiple select (as it was ...
0
votes
1answer
70 views
Display static pages instead of category, in code
I'm very new to programming and not sure how to go about this. The following code returns 3 category names and feature images and then outputs them on the page.
<div id="footer">
<div ...
0
votes
2answers
189 views
Get unique post in parent category
I have a parent category and several child categories. I also have several posts that belong to the child categories. Each post can be belong to several categories. I want to know how to query the ...
1
vote
1answer
379 views
Using WP Category Lists Plugin to Dynamically Display Category (PHP)
I am trying to use the Category Posts (WP-CPL) plug-in on a blog I'm working on to filter 'Recent Posts' by category. Basically, when someone clicks on the category name on the blog, I would like it ...
0
votes
1answer
217 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 ...
0
votes
1answer
112 views
Define specific category name in PHP
Might be a really simple question... I am trying to pull out a category name in PHP and display it on my page. I have multiple category sections on this page, and each need to pull their respected ...
-1
votes
1answer
195 views
how to set category name for a post
how to set category name for post:
this is my code ,this is not working ,why?
$post_title = $vname;
$categ='category name';
$post_content = '[newpage link="'.$videos.'"]';
...
-1
votes
2answers
874 views
category.php + pagenavi + custom post types + /page/2 = 404 errors
I'm seriously going to go crazy if I dont figure this out. I have tried a million different things from googling,a nd I've been staring at this same problem for days now.
Pagination for a custom ...
-1
votes
2answers
187 views
Different Output for “Every Other” Foreach Statement?
I'm currently using the following code in order to get subcategories in a category page and getting the posts foreach subcategory. In the part where it echos "span-12" (line 14) i want it to echo ...
1
vote
1answer
83 views
Woo Framework: woo_cat_featured not populating
In framework settings:
$options[ 'featured_cat' ] = array( "name" => "Featured Category",
"desc" => "Featured Posts will display in the main rotator on the homepage.",
...
0
votes
1answer
729 views
how to edit wp category widget
how to edit wp category widget, so it would not show one of specified category? For example, it shows all categories in list, and I need to remove category Books, from it, how can I do it?
Best ...
0
votes
2answers
313 views
Display latest post from Wordpress Featured Category that is also in X,Y,or Z categories
I want to display the latest post from a "featured" category (id=1) that may also be in either X category, Y category, or Z category (id=2,3,4 respectively). Note, there are other posts in categories ...
0
votes
1answer
203 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
419 views
Explode() expects a string
I currently am getting this error:
Warning: explode() expects parameter 2 to be string, object given in D:\...\portfolio.php on line 12
Here is my portofolio.php:
<?php
$current = ...
1
vote
3answers
286 views
Implementing a tricky wordpress menu (nested categories + thumbnails)
I'm trying to make a layered wordpress menu, out of categories. Here's how it's going to look:
I have no clue how to develop this, can't do it with get_posts (not sortable by parent/children), or ...
1
vote
1answer
489 views
in_category() works in single.php but not in page.php?
I'm using in_category(array) inside The Loop to detect whether a post is categorised into the Discussion category (or has one of a couple of slugs). This works beautifully on single.php but doesn't ...
0
votes
1answer
129 views
Call Current Category
I'm using this in a file named category-portfolio.php which is for the archives page of my portfolio. I don't want to use cat= to specify a specific category. But when I don't use cat= it pulls up ...
0
votes
2answers
629 views
Category.php template for custom posts
I'm trying to use my category.php file to display all posts of a certain custom post type (say "Company") with a given category. However, when I try to use it by navigating to ...
0
votes
1answer
242 views
Show the categories the current post has
I have a custom post type; posts of this type can have either one or two categories associated with them. I need to display the names of the categories that are associated with each of these custom ...
0
votes
1answer
76 views
Page permalink rewrite
I added the following code which allows categories on my 'Page' post type.
add_action('init', 'edit_page_type');
function edit_page_type()
{
register_taxonomy_for_object_type('category', ...
1
vote
1answer
240 views
Taxonomy filter all children
I have a custom taxonomy filter that will filter all the pages in the selected taxonomy. I would like the code to select the pages in that taxonomy, and the children of thous pages.
Heres the code.
...
1
vote
1answer
323 views
Add title, post content, and category like add_post_meta and update_post_meta
How can I update/add a new title, post content, and category to a post with hard PHP code similar to add_post_meta(), update_post_meta()?
1
vote
1answer
114 views
Code to pull in a PHP file named after the category ID
I use this code to pull in an image based on a post's category. Images are named after the category they represent, so a post in category 50 pulls in 50.jpg.
<?php
foreach((get_the_category()) as ...
0
votes
1answer
290 views
Post thats in Two Categories, only want to display name for one
In my Wordpress site I've created, I'm having issues hiding or not displaying one of the category titles I set up. I'll try to explain better.
Wordpress Admin Side
I have a post that is in two ...

