|
I need to link to a category in my wordpress site. The following code works, somewhat:
<?php // Get the ID of a given category $category_id = get_cat_ID( 'People' ); // Get the URL of this category $category_link = get_category_link( $category_id )...
Started by Matrym on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If you want to output....
I found a plugin that does work with 2.9:
http://wordpress.org/extend/plugins/wp-no-category-base « WordPress Codex for the template tag for category menus that will include whatever category base you have set.
|
|
Hi Everyone,
I am building an EC website for a customer and the project manager came with some strange ideas and I am struggling to actually implement what he sold to the client.
Here comes my main issue and a quick summary how the system is setup: product...
Started by RageZ on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
About menu rendering: I assume you'd want the menu to render: - All ancestors of the chosen category - All siblings of the ancestors of the chosen category
So if you choose 'Speakers', you'd see accidentally clicks on the toppermost ....
|
|
I have a products table that contains a FK for a category, the Categories table is created in a way that each category can have a parent category, example:
Computers Processors Intel Pentium Core 2 Duo AMD Athlon
I need to make a select query that if ...
Started by Bruno on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
I suppose there's no limitation to the category hierarchy depth....
I have done similar things in the past, first querying for the category ids, then querying you want to find is the transitive closure of the category "parent" relation.
|
Ask your Facebook Friends
|
Using the category tag in RSS 2.0:
<category domain="http://mysite.example.com/tags"> Science and Technology </category>
How would I provide an additional URL to the page that shows all of the items in that category?
Since the spec doesn't...
Started by Simon Willison on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Which has to have a content matching a category and an attribute holding the URL to the page that shows all of the items in that category:
<rss version="2.0" xmlns:myns="http://mysite.example.com/namespace/"> <category domain....
|
|
Hi there, I'm trying to figure out a way of being able to click a link in a sidebar and skip straight to a single page if there is only one post in a category.
This is the website I've built for the company I work for. For example. If you click on the...
Started by Danny Tonkin on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Oops it should have.
If there's 1 then include the single page template or else display the normal category listing.
In the category template check for the number of elements in the $posts array.
|
|
I have a function below whose purpose is to create a listing of posts where the category assigned to each post is "top-menu". However, I first want to exclude any posts where the category is "hidden"...
How can I edit this code to do that?
global $post...
Started by Scott B on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You can always just use category and give it an id instead of category_name-menu'); $myposts = get_posts( array( 'numberposts' => 5, 'category__in' => array( $include_cat ), 'category__not_in' =....
Again if you need it.
|
|
So I have 2 entities:
Article Category
And I have a table that relates the articleID and categoryID:
articles_categories -articleID -categoryID
I am using xml for my mappings, what should I do here?
I want to be able to query for all articles in a given...
Started by mrblah on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You can set your Category class to have a Collection of Articles....
categories"> <key column="ArticleId" /> <many-to-many column="CategoryId" class="Category approach this in two ways, depending on how you want to do it.
|
|
Hi,
I have a mysql database populated with categories/subcategories, and I'm on the way to build a php/html/css presentation module to show the hierarchy above mentioned.
My objective is to have a simple and clean way to list those categories, widthout...
Started by yoda on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You could emulate Mac OS's Finder:.
How about a windows-like tree view? People are used to that .
|
|
Style-wise (and functionally, if there is any difference), for declaring private methods, which of these is better?
@interface MyClass() @interface MyClass(private)
Started by Elliot on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The two syntaxes serve different....
This can lead to problems because not control.
If you declare a private category on your own class (Private) category can exist in a given Objective-C namespace.
category named pairs must be unique.
|
|
My blog's main menu is made of the categories, displayed via the wp_list_categories function.
If i click on one of the categories, the current category is highlighted in the category menu, and the list of articles inside that category are listed. Everything...
Started by pixeline on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
It will only show one "current" category....
I found a good hack on the wordpress forum.
Is providing the category list for both the category page and the post page? The code might be within an is_category or is_post/is_page block.
|