Skip to main content
5 events
when toggle format what by license comment
Dec 5, 2011 at 18:18 vote accept Kalle H. Väravas
Dec 5, 2011 at 18:18 comment added Kalle H. Väravas Oh double sorry, Didn't see the $wp_query->query_vars['post_type']=='myposttype'. Works basically. This is a good basis for more dynamic solution for sure, thanks!
Dec 5, 2011 at 18:15 comment added Kalle H. Väravas Oh sorry, didn't see the $class = '';. However, cant I get the normal classes dynamically and also how to make the currently active link to work?
Dec 5, 2011 at 18:11 comment added Kalle H. Väravas Thank you for answering. This seems to basically work. However, the formatting of the URL needs some tweaking. And I was hoping maybe you know about WP more then I. So currently the url is: example.com/?post_type=myposttype but should be example.com/myposttype. Maybe simply $url = site_url() . 'myposttype';? And the classes are not being included, including the currently active one.
Dec 5, 2011 at 16:21 history answered Stephen Harris CC BY-SA 3.0