|
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):
Is providing the category list for both the category page and the post page? The code might be within; $currentcategory = '¤t_category='.$myCat; } wp_list_categories('depth=1&title_li=&orderby=id&exclude....
|
|
What's the best way to generate HTML which has a heading for each Category, and Products under that category in a Django template?
I toyed with the idea of having a passing a dictionary, or an ordered list...
Started by geejay on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Used a sorted list in the view code,
sorted(dom_obj.objects.all(), key=lambda d: d.sort_key/#regroup
With it you could do something like this:
{% regroup products by category as products_by_category %} {% for c in products_by_category....
|
|
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):
Look here Template Tags/wp list categories « WordPress Codex for the template....
I don't understand what you want to do.
I found a plugin that does work with 2.9:
http://wordpress.org/extend/plugins/wp-no-category-base without a plugin.
|
Ask your Facebook Friends
|
Hi there, I'm building a Magento store and want to be able to display a list of categories and have each category link to its own page.
I have a 'Brands' category with an ID of 42 and I want to display a list of the sub-categories and ensure that each...
Started by Neil Bradley on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
I typically use this in app/design....
:)
If you're comfortable editing your theme, this code snippet will bring you a list of all sub-categories of the current category (from the session, so this should work anywhere in your theme).
|
|
Hello
I have 3 tables:
category doesnt matter
item2cat: itemID|catID
item: id|name|desc
I want to list the items that are in the given category, but I don't know how to do it in a simple way. (With PHP and MySQL)
I need this table-structure because I ...
Started by Richard Mre on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Item.desc FROM item INNER JOIN item2cat ON item.id = item2cat.itemID WHERE item2cat.catID = [category_id JOIN item2cat ON item.id = item2cat.itemID INNER JOIN category ON item2cat.catID = category.id WHERE category.id IN ( [category....
|
|
I want to create a page in Magento that shows a visual representation of the categories.. example
CATEGORY product 1 product 2 ANOTHER CATEGORY product 3
My problem is, their database is organised very differently to what I've seen in the past. They have...
Started by alex on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
However, I grepped through the Mage codebase with
grep -i -r -E 'class.+?category (Mage_Catalog_Block_Seo_Sitemap_Category)
$helper = Mage::helper('catalog/category'); $collection'
Which returned....
A list of categories.
|
|
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 want to display the linklist widget only on a certain category.
The current way the sidebar is fetched is:
if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(1))
Which doesnt give me a say in the calling of the links widget. If i put an if ...
Answer Snippets (Read the full thread at stackoverflow):
To print the Category you are on use the_category(' '); Example : <p>Categories: <?php the_category(' '); ?></p> Also have a look at the Documentation http://codex.wordpress.org/Template_Tags/the_category....
|
|
I would like to generate all posts that has say a category name of X and a tag name of Y with in wordpress.
query_posts('cat=X List&tag=Y');
I above works to an extent but not fully since I need to repeat this list and just echo the_title(). The problem...
Started by CrazyCoderMonkey on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
'List Category Posts' allows you to just drop in one line of code$my_query = new WP_Query('category_name=cool&tag=hot'); while ($my_query->have_posts()) : $my into the page or post you want ....
Be able to do the trick for you.
|
|
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.
|