wp_get_attachment_image returns different image size

Handle built in sizes right I wrote a class that handles all the different stuff for built in image sizes. To redefine the built in sizes, use an extended class (the upper file in the linked source) To unset a class and skip it’s useage completely, just set w & h to 0. http://static.steffenvogel.de/wp-content/uploads/2011/07/octocat_construction.gif Click … Read more

How to edit bbPress template files – WordPress + BuddyPress + bbPress? [closed]

I have found the answer for myself actually. Yes, I love the fact that bbPress is not obtrusive! It almost doesn’t matter at all how I am trying integrate BuddyPress here. So this narrow downs to customise bbPress template when installed as a plugin to WordPress. The answer is here: http://codex.bbpress.org/legacy/step-by-step-guide-to-creating-a-custom-bbpress-theme/ Thanks for Zaerl on … Read more

How to Loop Plugin Option Field Set?

I figured it out after a little work. To start, I ended up using a single callback: array($this, ‘txs_loop_callbacks’) using the same add_settings_field registration above. Then I altered the final argument in the field resgistration, making each unique to that specific field: array(‘field’ => ‘txs_opacity_’.$i). Then in the loop callback I stored each field’s HTML … Read more

Disabling pingback and trackback notifications

To disable pingback and trackbacks, add this code to your functions.php file in your child theme: add_action( ‘pre_ping’, ‘wpse_190346_internal_pingbacks’ ); add_filter( ‘wp_headers’, ‘wpse_190346_x_pingback’); add_filter( ‘bloginfo_url’, ‘wpse_190346_pingback_url’) ; add_filter( ‘bloginfo’, ‘wpse_190346_pingback_url’) ; add_filter( ‘xmlrpc_enabled’, ‘__return_false’ ); add_filter( ‘xmlrpc_methods’, ‘wpse_190346_xmlrpc_methods’ ); function wpse_190346_internal_pingbacks( &$links ) { // Disable internal pingbacks foreach ( $links as $l => $link … Read more

Shortcode putting html such as

This behavior is most likely intended, and can be disabled. However it might break other features too. There are a couple of workarounds, that you can try. Break the Image URL and File Name You can pass the arguments to your shortcode in the following way: [theimg path=”https://s.w.org/about/images/logos/” filename=”wordpress-logo-simplified-rgb.png” ] This will prevent the editor … Read more

Build a content and excerpt grid loop with paging and options for # of posts

The $wp_query properties allow “alot” Actually it’s not that hard if you use parts of the $wp_query object like current_post. Here you can see some examples that make some tricky use of things like is_paged(), $wp_query->current_post and $wp_query->posts_per_page. You can switch MarkUp depending on if you’re on the first or later pages, if you got … Read more

Autogenerate wordpress shortcodes using array?

Auto-generate shortcodes from an array: You can try the following Shortcode Automat: /** * Setup the Shortcode Automat * */ function shortcode_automat_setup() { $settings = array( “get_address” => “mg_admin_address”, “get_phone” => “mg_admin_phone”, “get_fax” => “mg_admin_fax”, “get_email” => “mg_admin_email”, “get_hrs_mon” => “mg_work_hrs_mon_frd”, “get_hrs_sat” => “mg_work_hrs_sat” ); $sc = new ShortCodeAutomat( $settings ); $sc->generate(); } add_action( ‘wp_loaded’, … Read more