The Stack Overflow podcast is back! Listen to an interview with our new CEO.
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 13418

A function is a sequence of program instructions that perform a specific task. It is packaged as a unit that can be used wherever the according task should be performed.

1
vote
You can remove dashboard widgets/metaboxes using the following action, wp_dashboard_setup: Example 1 function remove_dashboard_widgets() { global $wp_meta_boxes; $wp_meta_boxes['dashboard' …
answered Feb 13 '16 by Adam
8
votes
difference between right and wrong is a matter of opinion, lets not forget. Also this applies to NOT only Syntax Style but also Best Practice methods for using proper WP Core functions over less … preferred hack-jobs or unconventional functions to perform certain tasks. Here are two links that can help you understand what WordPress thinks is acceptable coding standards syntactically, most of which you …
answered Jan 26 '13 by Adam
1
vote
This is how you do it... function update_post_template($post_id, $post){ //set $post_parent_id however you wish if ($post->post_parent == $post_parent_id) { //unhook save_post ac …
answered Jun 28 '13 by Adam
2
votes
Ok, first of all, lets (temporarily) disregard the code from wptuts-user-log so as not to confuse that code with the basic objective first. For the record however, that code was written by our very …
answered Jun 21 '14 by Adam
0
votes
The following is a crude example, it can be improved to ensure you're dealing with integers etc and also shortened overall for brevity but this should get you started. add_filter('frm_after_create_en …
answered Oct 4 '12 by Adam
1
vote
Here is an example; add_action( 'template_redirect', array( 'someClass', 'init' )); class someClass { protected static $content = 'oh yeah, private!'; public static function init() { …
answered Oct 2 '12 by Adam
2
votes
the_post_thumbnail() echoes data immediate, what you want to try is get_the_post_thumbnail() which returns data so that you may concatenate properly. WordPress core functions that are prefixed with … the_ usually echo, those prefixed with get_ usually return. See: https://developer.wordpress.org/reference/functions/the_post_thumbnail/ https://developer.wordpress.org/reference/functions/get_the_post_thumbnail/ …
answered Feb 19 '16 by Adam
0
votes
From within your external script try calling wp-load.php - example; require( '../your-path-to-your-wp-base-directory/wp-load.php' ); See how you fair then...
answered May 4 '12 by Adam
5
votes
Remove the = sign after your echo statement... echo = "<p>Text Goes Here</p>"; ...becomes echo "<p>Text Goes Here</p>"; Final add_action( 'woocommerce_review_order_after_shipping', 'action_wooco …
answered Mar 3 '16 by Adam
0
votes
/reference/functions/get_the_post_thumbnail/ $image_home = get_the_post_thumbnail($team_home, 'large' ); $image_away = get_the_post_thumbnail($team_away, 'large' ); ?> <!-- print your …
answered Aug 30 by Adam
0
votes
Change, str_replace($to_search , $replacement, $post->post_content); to.. $content = str_replace($to_search , $replacement, $post->post_content);
answered Feb 15 '13 by Adam
4
votes
You need to wrap the first three || conditions in additional parentheses so they are evaluated first BEFORE the last && condition: Psuedocode example: here here …
answered Jul 23 '15 by Adam
8
votes
You can hook onto pre_insert_term, check the taxonomy and whether or not the user has the specified role as follows: function disallow_insert_term($term, $taxonomy) { $user = wp_get_current_user …
answered Jul 5 '15 by Adam
31
votes
The default response from admin-ajax.php is, die( '0' ); ...by adding your own wp_die() or exit() or die() after returning your desired content prevents the default response from admin-ajax.php bein …
answered Oct 4 '13 by Adam
1
vote
Hopefully this helps, function mat_image_credit() { global $post; $args = array( 'post_type' => 'attachment', 'post_parent' => $post->ID, 'post_mime_type' => 'imag …
answered Oct 8 '12 by Adam

15 30 50 per page