Sometimes we need to add references to scripts, metatags or conditional styles to the WordPress <head></head> section in header.php. WordPress has an action hook for this purpose. It's very easy to use. To add scripts, conditional styles or links to header.php, use the wp_head() action hook, like this: add_action('wp_head', 'function_name'); function function_name() { echo "\n"; /* New line */ /* function content */ echo "\n"; /* New line */ } For example, IE9 struggles with CSS gradients so if you use ColorZilla to create a CSS gradient you will need to add a … [Read more...]
Using PHP to Send Data Between Webpages

Every now and again we web designers need to pass user input between pages. It could be a username or affiliate code that needs adding into a set of links; it could be details of a contact form that need passing over to a confirmation page before being sent to a database or email server; or it could be any other bit of information that a site visitor enters into one form that must be reproduced or used somewhere within another page or set of pages. Luckily, for those of us who haven't studied PHP, the recipe for passing information between pages contains few ingredients and is easy to follow … [Read more...]






