[wp-hackers] wp_get_categories modification
sean.newham at cantab.net
Wed May 18 13:30:38 UTC 2011
apologies, yes, this is what I meant. My temporary fix involves preg_replace
ing &type=post_type to the urls returned by the pc_list_categories function.
Which is just wp_list_categories with a custom filter hook.
But How would I make it do the walking part of get_categories?
Thanks for your reply,
On 17 May 2011 10:43, Konrad Karpieszuk <kkarpieszuk at gmail.com> wrote:
> where did you found wp_get_categories? :) do you mean wp_list_categories,
> i think you should use
> http://codex.wordpress.org/Function_Reference/get_categories there you
> can specify type of posts
> On Sun, May 15, 2011 at 10:18 PM, Sean Newham <seanseviltwin at gmail.com>
> > Hey guys,
> > I created a duplicatethe wp_get_categories function to try to only pick
> > categories of one type. Upon reading the code, I thought it would be as
> > as adding the 'type'=>'typename' variable to the default options, and as
> > calls get_category, I thought everything would be hunkydory, but it's
> > working - it gives exactly the same output as without. I tried reading
> > source of walk_category_tree, but tbh this is the first time I have seen
> > walker and I'm not even sure if that is remotely related to the problem.
> > Hopefully you can see I'm trying, you are my last resort wp-hackers list!
> > Best wishes,
> > Sean
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> (en) regards / (pl) pozdrawiam
> Konrad Karpieszuk
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers