155 reputation
110
bio website
location
age
visits member for 2 years, 9 months
seen Jun 29 at 22:40

Dec
22
revised How to add custom post types to normal category pages
added is_main_query check
Dec
22
comment How to add custom post types to normal category pages
I think it must have been a caching issue (I use W3TC). I added the $query->is_main_query() check back and cleared the caches of W3TC and it still working fine. I don't have anything special in category.php, its just the loop.
Dec
22
comment How to add custom post types to normal category pages
Not really, at least not that I know of unless some plugin is doing it. All I have is the usual loop. But it IS working now. Unless the problem was being caused by some weird caching issue and I thought that this change solved it... I could try putting in the is_main_query() check again and see.
Dec
22
comment How to add custom post types to normal category pages
It seems to be working fine so far. What should I look out for?
Dec
22
comment How to add custom post types to normal category pages
For the is_category() I was referring to this codex.wordpress.org/Function_Reference/is_category. Its not a method of the $query.
Dec
22
comment How to add custom post types to normal category pages
@PieterGoosen The problem was that in both my original method and in yours we are both using is_main_query(). For some reason when I removed that, the custom posts appeared as I wanted. The nav_menu_item is required however when the is_main_query() is removed, because otherwise menus stop working.
Dec
22
answered How to add custom post types to normal category pages
Dec
22
comment How to add custom post types to normal category pages
The problem is not related to register_taxonomy. As I mentioned above, the checkboxes for the categories already display fine in the admin screen when editing the custom post type.
Dec
19
asked How to add custom post types to normal category pages
Nov
26
asked Specify token in facebook plugin
Oct
30
comment How to set up plugin project with XDebug remote debugging in PhpStorm
LOL, PHPStorm is an awesome IDE though and in the latest version they added support for Wordpress development of plugins. I use it too (syntax highlighting and code completion does give you a warm fuzzy feeling inside that notepad doesn't) but I didn't get PHPStorm to recognize wordpress functions and auto-complete them so not sure what the advantage of setting the project as 'Wordpress Plugin' are. I don't debug using IDEs so not sure what the OPs problem is, but I would also leave it here, it might prove useful to others too if someone answers.
Oct
30
asked Post type archive pages with custom query
Jul
29
revised Pagination for categories with a different amount of posts on first page not appearing on 2nd page
added 88 characters in body
Jul
29
asked Pagination for categories with a different amount of posts on first page not appearing on 2nd page
Jul
2
awarded  Curious
Jun
3
awarded  Critic
May
21
comment Limiting allowed html elements/strip harmful scripts from editor
This doesn't apply for the latest wordpress versions because TinyMCE changed. For instance, the block formats needs to be like this instead now: $initArray['block_formats'] = 'Paragraph=p; Address=address; Heading 1=h1; Heading 2=h2';
Mar
17
awarded  Notable Question
Mar
13
comment Disable wordpress widget automatically on error
Not sure what you mean. I have no difficulty with my code, its whether it is possible to tell wordpress 'don't show this widget completely' what I am asking. By don't show I mean not even the title or the background box or anything. Of course I can have an If statement or a try - catch to handle the exception, its hiding the widget altogether if it happens I am asking about. Maybe there is a flag in WP_Widget or some way. I don't know what I should give you because its just my code which is irrelevant for what I am asking. Just assume I have an error code from my function call...
Mar
12
asked Disable wordpress widget automatically on error