Override admin selected page layout
Override admin selected page layout
Override admin selected page layout
Actually, it is not the widget itself that is responsible for the broad structure. That is determined when a sidebar is registered. The widget instance itself, for instance, only stores the title. The html around it (in your case currently <h2>…</h2>, which you want to change to <a><h2>…</h2></a>) is set at the sidebar registration stage. … Read more
Perhaps you could push the variable contents to error log for later inspection? Like so, function addFilter($views) { // error_log is native php function to log stuff // print_r prints human-readable information about a variable, // print_r second parameter makes the function return result instead of echoing it error_log( print_r( $views, true ) ); return … Read more
To add a filter of a class’s method you must use an array in the callback like this: add_filter( ‘woocommerce_credit_card_form_fields’, array( $this, ‘ggowl_auth_creditform’ ), 10, 1 );. Of course that method must be public and either static, or the object must be instantiated.
How to add markup to the wp-custom-header div
Apply pre_get_posts filter in a certain moment (just for a particular block of posts)
Alternatively, to dump variables you could use error_log($var) or error_log(print_r($var, 1)) for arrays and objects. Be sure WP_DEBUG_LOG and WP_DEBUG_DISPLAY constants are defined in your wp-config.php file and debug.log file will appear and update in wp-content folder.
How to wrap pattern-matches from the_content in [wiki]-shortcode tags
Here is one to create a search form with tag and category filters. For filtering posts this form uses the default text input way, where user can type some search phrase that is matched against post titles and content. 1) Added to theme’s functions.php function get_tag_ids_and_names() { $out = array(); $arga = array( // check … Read more
You passed the action an associative array, so your hooked function will recieve an associative array. It’s a little clearer if we retype it like this: $associative_array = array( ‘product_id’ => $product_id , ‘outbiddeduser_id’ => $outbiddeduser, ‘log_id’ => $log_id ); do_action( ‘woocommerce_simple_auctions_outbid’, $associative_array ); Thus: add_action(‘woocommerce_simple_auctions_outbid’, ‘test’, 10, 1); function test( $associative_array ) { It … Read more