830 reputation
519
bio website jeremyclarke.org
location Montreal, Canada
age
visits member for 3 years, 8 months
seen Apr 6 at 20:32

Oct
7
awarded  Popular Question
Aug
13
awarded  Yearling
Aug
2
answered Excerpt Word Count
Aug
2
comment Excerpt Word Count
The question is asking for the simplest code to get a word count for excerpts in WP, which is relevant for this site. It happens that the question already contains all the wp-specific stuff (i.e. the right hooks, as debugged by others on the original wpsnipp) but still, I'm glad the solution was here on WordPress Answers.
Jul
12
comment How can I replace an oEmbed URL in post with actual embed HTML
I updated the question to clarify why this answer doesn't help. Twitter is already a built-in oEmbed provider so I don't need to register them. What I want is a reliable way to replace the embed URL with the embed HTML inside the post content in the database, rather than only having it replaced at load time.
Jul
12
revised How can I replace an oEmbed URL in post with actual embed HTML
added 436 characters in body
Jul
11
revised How can I replace an oEmbed URL in post with actual embed HTML
deleted 2 characters in body
Jul
11
asked How can I replace an oEmbed URL in post with actual embed HTML
May
28
awarded  Nice Question
Apr
11
answered Change size of featured image in Edit Post screen
Apr
10
answered Using the on-board image editor for featured images: edits are not being used
Apr
10
comment Using the on-board image editor for featured images: edits are not being used
Agree it's a horrible bug at this point. I can't believe I didn't notice it until now. It's both obnoxious and confusing because it's so hard to believe that it would work this way! The radio buttons that say "apply all changes to" and offers 'thumbnail' and 'all other sizes' is particularly heinous in that it teases the obvious functionality, but no combination of them will fix the custom intermediate sizes :S
Apr
8
awarded  Notable Question
Jan
31
awarded  Popular Question
Jan
1
awarded  Nice Answer
Dec
12
awarded  Nice Answer
Sep
28
comment Mixing Tweets with Posts
I think the idea that Twitter's TOS precludes you saving tweets to your site is not something you should worry about. Tons of plugins do exactly this and ethically you have a right to back up your tweets. The answer implies this but I felt it's worth making explicit. If you wanted to merge two custom post types you can just give an array of post types to WP_Query in the 'post_type' argument.
Sep
28
answered Using Query Posts With Multiple Post Types And A Taxonomy
Sep
21
comment Echo current custom post type
Once a post is fetched from the DB calling get_post() again isn't a serious issue. It's all cached internally for the duration of the pageview, the only overhead is a fast function call to retrieve the object from cache. In this case get_post_type() actually does pretty much nothing beyond return $post->post_type so your optimization actually makes sense, but it should probably have a filter or something, in which case using get_post_type() would be the API way to go.
Sep
21
comment Include Custom Posts Type in Year/Month/Date Archive
It's tangential to your question, but instead of using remove_action in this case (which avoids affecting subsequent queries in the sidebar and stuff) you can just use is_main_query($query) at the start of the function. That will ensure it only fires on the "main" (first, core) query of the page and not others.