• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

wordpress

Change plugin text in WordPress

October 17, 2013 by Webhead

Using the Codestyling Localization plugin and some steps from this awesome post, replace text in WordPress or any plugin is easy.  Install the plugin follow the steps and you’re done.

http://www.ostraining.com/blog/wordpress/language-strings-wordpress/

 

Filed Under: Coding Tagged With: localization, wordpress

Additional P tags in Contact Form 7

September 3, 2013 by Webhead

Problem

I noticed that I had paragraph (<p>) tags around some of my contact form 7 elements.  I tried adding this to the functions

define ( ‘WPCF7_AUTOP’, false );

but that still didn’t work.

Solution

It wasn’t another plugin like in an earlier problem with p tags, it was actually contact form 7 this time.  I had label html tags and apparently this caused p tags to be added around these label tags.  I replaced the label tags with div and the paragraph tags went away.

 

 

Filed Under: Coding Tagged With: wordpress

What is box-sizing and border-box?

August 24, 2013 by Webhead

Problem

In the latest WordPress theme, twentythirteen, I noticed styles that had padding didn’t affect the width of my box.  Whenever I add padding, the inside just got smaller and the outside stayed the same.  Was I dreaming all this time thinking the padding affected the overall width?  What world was I living in where you say this div is 100px wide, but if there’s 10px padding on each side the width should actually be 80px?

Solution

No, I wasn’t dreaming.  The WordPress twentythirteen theme has a style called

box-sizing:border-box

.  This causes the width to stay the width and the padding to be on the inside and not affect the width.  This is amazingly supported in IE 8 and up, and, with some prefixes, webkit and firefox.    I will always be using the below code from now on.

* {
 position: relative;
 -webkit-box-sizing: border-box;
 -moz-box-sizing: border-box;
 box-sizing: border-box;
}

Filed Under: Coding Tagged With: css, wordpress

template_include vs template_redirect

August 19, 2013 by Webhead

WordPress has a filter called ‘template_include’ and it also has an action called ‘template_redirect’.  The filter allows you to change what template file to use by returning a file path while the action is usually used to write whatever you need to and then exit.

According to this issue for bbPress template_redirect can cause incompatibility issues with other plugins using this hook.  Also using this hook exits WordPress abruptly not allowing WordPress to run through it’s normal procedure (according to one blog).  It is probably best to use ‘template_include’ unless you have a specific reason not to.

Filed Under: Coding Tagged With: optimize, wordpress

WordPress htaccess Explained

August 14, 2013 by Webhead

A great post explaining each line of WordPress’ htaccess file.

 

http://randomtype.ca/blog/the-wordpress-htaccess-file-explained/

Filed Under: Server Stuff Tagged With: htaccess, wordpress

WordPress 3.6 update caveats

August 6, 2013 by Webhead

The main problem in updating WordPress is the version of jQuery that is used is also updated.  jQuery is updated from version 1.8.3 to version 1.10.2.   Below is a record of what I’v gone through.  It’ll grow as I update more sites.

 

  • GravityForms (ajax) in PrettyPhoto – Using PrettyPhoto’s inline lightbox it creates a duplicate of the content you want in the lightbox.  Because of this, GravityForm’s replaceWith() call when using ajax replaces the original form, not the duplicated form in the lightbox.  The effect is you’ll need to press the submit button twice to see the form’s confirmation message.  To resolve this you need to bind to the ‘gform_confirmation_loaded’ event and have the replaceWith work on the form in the lightbox.  See form_display.php in GravityForms plugin for help.
  • Comprehensive Google Map Plugin v7.0.31 – This plugin requires that you have jQuery version 1.3 and above.  Seems right except mathematically, 1.3 is greater than 1.10.  So the plugin will popup a message saying you are using a version of jQuery older than 1.3.  To fix this if it’s not yet updated, find assets/js/cgmp.framework.min.js and find where it checks the version.  Details here.

Filed Under: Coding Tagged With: jquery, wordpress

  • « Go to Previous Page
  • Go to page 1
  • Interim pages omitted …
  • Go to page 3
  • Go to page 4
  • Go to page 5
  • Go to page 6
  • Go to page 7
  • Interim pages omitted …
  • Go to page 12
  • Go to Next Page »

Primary Sidebar

Topics

apache apple block editor chrome cms css debug eCommerce embed firebug firefox git gmail goDaddy google hosting htaccess html html 5 IE crap image iPad iPhone javascript jquery linux localization mac os x ms sql mysql open source optimize php php 5.3 responsive rest api seo svg tinymce woocommerce wordpress wpengine xss yii youtube




Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools