Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options answers only user 1685
2
votes
Store global plugin settings in the options table - update_option(), get_option() etc. Store content in the posts table (either as regular posts/pages, or custom post types) Group/categorise content … with taxonomies - wp_set_object_terms() etc. Store content-specific settings in the post meta table - update_post_meta(), get_post_meta() etc. …
answered Jul 11 '12 by TheDeadMedic
1
vote
You can use the wpmu_new_blog action to automatically set the default to 6 for new installs: function wpse_139900_default_posts_per_page( $blog_id ) { update_blog_option( $blog_id, 'posts_per_pag …
answered Apr 1 '14 by TheDeadMedic
5
votes
Drop this in a plugin & activate. I should note this doesn't take into account things like child themes - it's purely for toggling which theme renders based on SOME_FLAG. add_filter( 'stylesheet', 's …
answered Jul 19 '12 by TheDeadMedic
9
votes
...because your input (POST) name needs to match the one in your register_setting call: register_setting( 'first_tab_options', 'first_tab_items' ); .... <input type="text" name="first_tab_items"... …
answered Aug 11 '12 by TheDeadMedic
2
votes
The best hook I can find is wpmu_new_blog (line 1086, wp-includes/ms-functions.php, wpmu_create_blog()) - it passes 6 arguments like so; do_action( 'wpmu_new_blog', $blog_id, $user_id, $domain, $path …
answered Mar 18 '11 by TheDeadMedic
5
votes
no purpose ($ev_options will never be false). It seems you haven't quite understood the Settings API. The whole point is so that you don't need to save the options yourself, WordPress does it for you … ! I'm sure you've checked out the Settings API already, although it is a little lacking. The following go into a little more detail, and also cover how to use the API to store options as an array. Press Coders: Settings API Explained Otto: Settings API Tutorial …
answered Mar 15 '11 by TheDeadMedic
0
votes
You can't. If you're using the settings API correctly, here's what happens when you try to save your options: Form posts to options.php WordPress handles $_POST and runs update_option on your … registered settings Your sanitize callback from register_setting is applied Any data that fails/you don't return in your callback isn't saved WordPress redirects back to your options page (GET) Now …
answered May 16 '15 by TheDeadMedic
1
vote
You just need to move the capability check "inwards": function wpse_230369_quote_of_the_day( $user ) { $quote = esc_attr( get_option( 'quote_of_the_day' ) ); ?> <div class="visible-only-for …
answered Jun 21 '16 by TheDeadMedic