230 reputation
110
bio website flyingtrolleycars.com
location Seattle, WA
age 31
visits member for 2 years
seen Oct 10 at 18:13

I'm a developer living in the Seattle area.


Oct
10
comment the_content() behavior on attachment.php versus single.php
Yeah, I might open a larger topic in general: "what's the best way to alter page content after it's left the editor?" I've seen filters, capturing a buffer and altering, JavaScript, etc.
Oct
10
comment the_content() behavior on attachment.php versus single.php
Great clarification. It seems odd to have something in the template hierarchy that behaves differently. YOu can probably guess what I did: copy the single.php to attachment.php and then discovered the behavior. As a follow up: I'm trying to find a good filter to update the <img> tags in all posts. Is there a filter you'd recommend?
Jun
17
comment Redirect to a page after a few seconds
If your goal is to misdirect a search engine into believing the content is there then JavaScript won't help. Google's engine is sophisticated enough to realize you're changing the URL. If your intention is to have a URL actually redirect to correct content then you'll want to use wp_redirect() as below. There isn't really a great reason to show a page for 5 seconds.
Jun
17
comment get_plugins() doesn't work after plugins_loaded
There is no way to "not include the file". The codex explains that the function is, really, only designed for use in the admin side of WordPress - not for themes. If you want to use it in your theme go ahead and include the file as shown.
Jun
17
comment get post author id outside loop
It's also your own question. You can edit it to clarify.
Jun
17
comment Pages displays correctly but returning a 404 error in http header.
It certainly could. Unfortunately the magic that happens under the hood for finding old slugs is difficult to deal with. It also leaves a trail of records in your database. You can forcibly disable it by adding this to your functions.php: remove_action( 'template_redirect', 'wp_old_slug_redirect' );
Apr
16
comment Get Authors Role
If my answer worked please mark it as the solution.
Apr
12
comment What is wrong with this wp_query?
Just a quick side-comment. Why not just use "get_posts" instead of juggling all that stuff with the $wp_query variable? As far as the main question, my guess would be a mismatch with the time value stored in the DB compared to date('g:i A').
Apr
12
comment Get Authors Role
You question is a little confusing. The first code echoes a user's role. The second code adds a template part based on their role. What, exactly, are you trying to do?
Apr
4
comment Removing fields from the Media Uploader/Gallery
I agree. For now I've opened a ticket over on Trac. If they're going to make it the same as any other post it should respond to remove_post_type_support(), at least.
Apr
3
comment $form_fields from attachment_fields_to_edit returning empty array
After investigating the only thing I could figure out was to catch admin_head and admin_footer to forcibly modify the HTML. It's pretty klugey.
Apr
3
comment $form_fields from attachment_fields_to_edit returning empty array
Yeah, @Dan. I'm running into the same thing. This comment on trac would seem to verify your thoughts about the new media manager working differently. Did you have any luck figuring this one out?
Apr
3
comment Removing fields from the Media Uploader/Gallery
This Trac comment makes it clear that the solutions below will no longer work. Does anyone have an updated anser to this question? core.trac.wordpress.org/ticket/22664#comment:7
Apr
3
comment Removing fields from the Media Uploader/Gallery
Doesn't appear to work any more. $form_fields is empty for this filter.
Mar
26
comment Settings API - save multiple tabs at once
Thanks for the heads up, Chip. You're absolutely right. I guess what I should suggest is that you register an option of "my_theme_has_been_installed" and if it hasn't been set then do the init and set it. I rather like your more detailed answer, though. :)
Mar
25
comment How to change post format from Aside to Image for all posts?
If there aren't enough posts displayed on one page you can also open the "Screen Options" section at the top of the page and display more posts per page.
Mar
25
comment Save list from a custom meta box?
Please mark the answer below as accepted.
Mar
25
comment replace html entities in posts between pre tags
Have you tried Raw HTML and wrapping your <pre> blocks in the Raw HTML tag provided?
Mar
24
comment Hook 'wp_enqueue_scripts' priority has no effect
I'm going to try to make this clear one more time. Your priority is not ignored. That is the order in which they are added to the list. But the list gets rearranged. You can add them in wp_head, and it may work for now, out of sheer luck. But if you upgrade or add a plugin, it might fail. Just because they are added in order doesn't guarantee they will stay in order. The only way to guarantee that is using dependencies.
Mar
22
comment Is there an alternative way to upload html without using TinyMCE?
Most of the sanitizing happens in the WordPress code and not while editing in TinyMCE. This means that the behavior can be changed with plug-ins.