228 reputation
514
bio website
location Northeastern USA
age
visits member for 3 years, 2 months
seen Jan 20 at 20:42

I'm a Web Developer, and IT & AV Professional


Apr
30
comment get_search_link() redirects to 404 template page
Details matter ;) Anyway, I was able to figure it out. The template page needs to be named page-search.php. A page named "Search" must be created in the wordpress dashboard.
Apr
30
comment get_search_link() redirects to 404 template page
Those instructions are for wordpress 2.5 and don't work with 3.5.1.
Mar
6
comment Shortcode attribute “title” doesn't appear in $atts array
I found another interesting thing. If I use [bhours show_title="true"], the show_title attribute doesn't appear. if I misspell "title" like this: [bhours show_ttitle="true"], then the attribute show_ttitle` appears. There is something strange happening whenever I use the word "title" in an attribute--it seems like it's ignored every time for some reason. I don't understand it.
Mar
6
comment Roles for Custom Post Types
So far, I've only needed the first loop.
Feb
15
comment Roles for Custom Post Types
ok, I put your code in my functions.php file just to test it out. I had to change the add_action command to add_action('admin_menu', 'hide_menus'); Worked like a charm. The while loop for "hiding admin menus again" doesn't seem like it would be necessary. Have you encountered a situation where it was needed?
Feb
15
comment Roles for Custom Post Types
Would be more practical to specify access while registering the post type? The custom post types are created in some custom plugins I built.
Feb
1
comment Adding custom text in items titles from wp_nav_menu()
The line remove_filter( 'wp_setup_nav_menu_item', 'remove_my_setup__function' ); should be remove_filter( 'wp_setup_nav_menu_item', 'my_item_setup' ); instead. Otherwise, a very good example.
Jan
23
comment Disable sticky option for specific categories
Nothing, that's the problem. I keep getting pages of irrelevant search results.
Sep
19
comment Custom post type - order field
Nevermind. Setting hierarchical to false gets rid of it.
Sep
19
comment Custom post type - order field
using page-attributes presents both the order field and the parent field. How do I get rid of the parent field?
Sep
9
comment Remove link on full-size images
To not have the image linked by default
Sep
9
comment Remove link on full-size images
Is there a way to do this without requiring an extra step for users using the editor?
Sep
9
comment Remove link on full-size images
@Otto No code as of yet. There didn't appear to be a simple and obvious built-in approach, so that's why I'm asking. Any image you insert in a post/page using the editor exhibits this behavior. The theme doesn't matter for this question.
Sep
6
comment altering search terms
As a workaround, I put a if(!empty($wp_query->query_var['s'])){} before have_posts() in the search.php template.
Sep
6
comment altering search terms
It works, but if the new query var ends up being an empty string, all posts and pages are returned. How can I prevent that?
Sep
5
comment using new WP_Query in save_post function alters $post
@StephenHarris how would I retrieve the post ID withing the have_posts() while loop without touching $post?
Sep
4
comment How to validate custom fields in custom post type?
ok, I think I got it. The magic is with the add_option and get_option wordpress functions to store and retrieve the variable, and the shutdown hook is useful to call the add_option function only once per session after everything is done.
Sep
4
comment How to validate custom fields in custom post type?
I'm not quite clear on what are you using to allow variables to persist across requests. Is it the inclusion of the $instance variable? Or is it one of the add_action statements? Or both? Something else?
Aug
30
comment How to validate custom fields in custom post type?
Example code: pastebin.com/vTxv9cw1
Aug
30
comment How to validate custom fields in custom post type?
This only appears to work when the page is loaded for the first time. If the "Update/Publish" button is clicked, no notices are displayed.