Getting it right in the head As a hack every now and then I would whack in a javascript or CSS link hardcoded directly into the header.php or footer.php template files of a WordPress theme. This really is a no no! as this can result in script conflicts or duplications or just downright badness, there …
Read More
Create a Login/Logout Link in WordPress
To create a login/logout link in WordPress you can use a snippet of php… <?php if (is_user_logged_in()) : ?> <a href=”<?php echo wp_logout_url(get_permalink()); ?>”>Logout</a> <?php else : ?> <a href=”<?php echo wp_login_url(get_permalink()); ?>”>Login</a> <?php endif;?>
Create an extra Widget Areas in WordPress Twenty Twelve
WordPress themes come with a certain number of widgets in parts of the web page, for example the 2012 theme has a sidebar and 2 home page widget areas, you can make many more areas of the layout widgetised by creating extra widget functions and placing the PHP code for those functions in the theme …
Read More
Create a Widgetized Custom Home Page in Genesis Child Theme WordPress
Creating a customised all widgets / widgetized home page of a Genesis Child Theme. Analysing the Layout The layout above does not lend itself to the default layouts in Genesis, it really needs to be set up with widgetised areas in the WordPress dashboard so a non-technical user can update content. The layout is a …
Read More
Get PHP and Shortcode to Work in WordPress Widgets
Getting PHP Working in Widgets By default any PHP code won’t execute in WordPress widgets or sidebars, you can probably get by with a plugin but you can also add a function in your themes function.php file to allow PHP to run, what you need to declare is a custom function and filter. //Allow PHP to …
Read More
Remove HTML Tags and Attributes in WordPress Comments
Bu default WordPress comments have instructions for users on how to use HTML tags and attributes in the actual comments, many users are turned off by this, here is how to remove HTML Tags and Attributes section in the post comments form in WordPress theme. By default this format appears in a few themes including Twenty …
Read More
Change the Genesis Theme Copyright Line in Footer for WordPress
Genesis Themes adds it in its footer credit copyright line at the base of the page. To change this, you need to add a new function and filter into your functions.php of your Genesis child theme… Adding the Function //Changing the Credits function genesischild_footer_creds_text () { echo ‘<div class=”creds”><p>Copyright ©’; echo date(‘Y’); echo ‘· <a href=”http://coolestguidesontheplanet.com/”>Neil …
Read More
Install WordPress Easily on OS X Mavericks 10.9
If you want to get WordPress 3.8 quickly installed on your OS X machine for development or just to learn the software you can install all the necessary components including Apache, PHP, MySQL, phpMyAdmin and WordPress in one foul swoop without launching the Terminal. This type of install works best if you don’t use Apple’s …
Read More