Blog Archives

Debugging Apache .htaccess Rewrite Rules

In Apache 2.4, open up httpd.conf and find the line that starts with LogLevel. Change that to: LogLevel alert rewrite:trace6 Your error.log (in \apache\logs\ typically) will have the detailed trace of the rewrite rules. Example: http://snippi.com/s/c75uk61 More info: http://httpd.apache.org/docs/current/mod/mod_rewrite.html#logging

Posted in Internet, WordPress Tagged with: ,

Unhooking Actions Hooked Inside PHP Classes With remove_action

Here is an example. The following snippet removes the action hooked from the SumoMe plugin – https://wordpress.org/plugins/sumome/ /** * Dequeue SumoMe inline script * * @author Arun Basil Lal */ function rocket_helper_dequeue_sumo_me_js() {      global $wp_plugin_sumome;   remove_action(‘admin_footer’, array( $wp_plugin_sumome, ‘append_admin_script_code’

Posted in WordPress Tagged with: , ,

Full Width Responsive WordPress YouTube Embeds Automatically

Add this to the functions.php /** * Add Response code to video embeds in WordPress * * @refer  http://alxmedia.se/code/2013/10/make-wordpress-default-video-embeds-responsive/ */ function abl1035_alx_embed_html( $html ) {      return ‘<div class="video-container">’ . $html . ‘</div>’; } add_filter( ’embed_oembed_html’, ‘abl1035_alx_embed_html’, 10, 3 ); add_filter(

Posted in WordPress Tagged with: , ,

Debugging WordPress With error_log()

If Debug logging is enabled, simply use the error_log() function and it will be written to /wp-content/debug.log . Refer this article to see how it can be done: Enable Debug Logging In WordPress You can also write the error_log to

Posted in WordPress Tagged with: , ,

Easy Tabbed Navigation With jQuery

Here is the HTML Markup <h4 class=”single-company-tab-wrapper hide-if-no-js”>   <a class=”single-company-tabs” href=”#info”>Info</a>   <a class=”single-company-tabs” href=”#contact”>Contact</a> </h4>   <div id=”info” class=”tab-content”>   <p>Content of info tab</p> </div>   <div id=”contact” class=”tab-content”>   <p>Content of contact tab</p> </div> And here is the jQuery jQuery( document

Posted in WordPress Tagged with: , , ,