[wp-hackers] Fix for is_home() in combination with custom post type?

Bjorn Wijers burobjorn at gmail.com
Tue Nov 9 15:53:02 UTC 2010


Hi,

It seems I'm experiencing a known problem[1] with is_home reporting true 
on custom post index pages. I thought to have found a solution in 
somadesign.ca's class[2], but that does not seem to work.

I'm referring to using the template_redirect hook to set is_home to 
false on my custom posts index page. This does set is_home to false and 
then it is being set to true again.

I'm using this function which is almost a complete copy of 
Somadesign.ca's class (thanks!): https://gist.github.com/669261

What am I doing wrong? What can I do to fix is_home()? Do I need to use 
a different hook? Hints and tips most appreciated!

[1] 
http://groups.google.com/group/wp-hackers/browse_thread/thread/49f5355cd613f58a
[2] http://somadesign.ca/projects/smarter-custom-post-types/

Thanks in advance!

-- 

met vriendelijke groet,
Bjorn Wijers

* b u r o b j o r n .nl *
digitaal vakmanschap | digital craftsmanship

Werkdagen:
Van maandag t/m donderdag vanaf 10:00
Vrijdag is voor experimenteren en eigen projecten.

Concordiastraat 68-126
3551 EM Utrecht
The Netherlands

tel: +31 6 49 74 78 70
http://www.burobjorn.nl


More information about the wp-hackers mailing list