2,101 reputation
22048
bio website tomauger.com
location Toronto, Canada
age
visits member for 3 years, 9 months
seen yesterday

WordPress developer. Always learning. Hoping to contribute.


Jun
2
awarded  Critic
Jun
2
comment On the category page, get the category object
This doesn't actually make sense. In fact, this is the only response that ISN'T a correct answer. The OP wanted a way to get the cat object. is_category doesn't "check on which category you are" - it tells you IF you're on a category page. If you have the ID, then yeah you can use get_category(), but I'm assuming here that the OP was using ID=4 as an arbitrary example, but actually wouldn't know beforehand the ID of the cat he wanted to query.
May
28
comment How can I use AJAX to save/update a widget form?
Arg. so obvious. Thanks man. The link to the JS script is particularly useful. I didn't know where to look. Thanks!
May
28
accepted How can I use AJAX to save/update a widget form?
May
27
revised How can I use AJAX to save/update a widget form?
made the title more succinct
May
27
comment Pasting code into WordPress post - LFs being eaten
That's an interesting point. Well, it doesn't "change" when I switch back and forth. However I have discovered that when pasting into HTML view, the indents and linefeeds are preserved, whereas pasting into Visual has inconsistent results.
May
26
asked How can I use AJAX to save/update a widget form?
May
23
answered Why is my database import losing text widget data?
May
20
revised Pasting code into WordPress post - LFs being eaten
added 93 characters in body
May
20
comment Pasting code into WordPress post - LFs being eaten
Tried disabling the plugin and it didn't change anything.
May
20
answered Pasting code into WordPress post - LFs being eaten
May
20
revised Pasting code into WordPress post - LFs being eaten
stipulated I was using the visual editor
May
20
comment Pasting code into WordPress post - LFs being eaten
Visual editor - I've always pasted into the Visual editor. I'll update my question to reflect this.
May
20
asked Pasting code into WordPress post - LFs being eaten
May
20
answered Display navigation menu item conditionally based on user capabilities
May
20
comment Display navigation menu item conditionally based on user capabilities
Thanks for the clarification. Absolutely a custom taxonomy or custom field would be the proper way to go. Another option that I've come up with is based on the template. I don't like my solution as much because you shouldn't couple a template to built-in functionality like that, but there's a logical connection between the template (which ought to check whether the user has access to see the content) and the menu. I'm going to post my code in an answer, below, for other users with the same question.
May
17
comment Display navigation menu item conditionally based on user capabilities
So the walker is good for making sure that a menu item that is flagged as "protected" doesn't appear. But how do you create a menu item that is flagged as "protected", or, better yet, as belonging to a specific role or capability? Sounds like we're extending menu items and adding some more user-configurable parameters to the menu item form...?
May
17
comment What is the link to my default “archive” page?
Thanks Chip, that's a good resource.
May
17
comment Display navigation menu item conditionally based on user capabilities
Thanks for this!
May
15
comment What is the link to my default “archive” page?
Okay, sounds like I was dreaming when I thought you could get to some kind of built-in archive page. My question was a bit of a long shot.