by Nick | Sep 24, 2013 | Code
This code can be used to target pages based on the page class property in the Menu area. <?php $app = JFactory::getApplication('site'); $params = & $app->getParams('com_content'); $pageclass = $params->get('pageclass_sfx'); ?> class="<?php echo...
by Nick | Aug 31, 2013 | Code
Simple Joomla code to cloak an email address. $email = 'email@domain.com'; $cloaked = JHTML::_('Email.cloak',$email); echo $cloaked;
by Nick | Jul 7, 2013 | Code
Add this to your template where you want the menu to appear <?php $menu_slug = get_post_meta($post->ID,'menu',true); if(is_nav_menu($menu_slug)) { wp_nav_menu(array( 'menu' => $menu_slug )); } ?> Within each post or page add the custom field menu and set...
by Nick | Sep 24, 2012 | Code
To make use of the new Keywords Meta Tag for Google News do the following: Add this to your header.php within the <head> tag <meta name="news_keywords" content="<?php $news_keywords = get_post_meta($post->ID, 'news_keywords', true); echo...
by Nick | Aug 5, 2012 | Code
Add the following your your footer.php file <?php $today = date("Y"); echo $today; ?>
by Nick | May 22, 2012 | Code
Add the following code to your single.php. <?php $tags = wp_get_post_tags($post->ID); if ($tags) { $tag_ids = array(); foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id; $args=array( 'tag__in' => $tag_ids, 'post__not_in' =>...
Recent Comments