by Nick | Apr 30, 2014 | Code
This PHP allows you to use Shortcode in a WordPress template but also pull in a value from a custom field. This was used to add a shortcode for a slider to a specific page. <?php $slider = get_post_meta($post->ID, 'slider', true); echo...
by Nick | Mar 18, 2014 | Code
If you need to run a plugin which uses shortcodes in your template, this can be done with the following code. <?php echo do_shortcode("[shortcode]"); ?>
by Nick | Feb 6, 2014 | Code
This can be used in your Joomla template to target a specific page, use the menu Joomla menu ID. <?php $menuID = JSite::getMenu()->getActive()->id ; if ($menuID == '6') { echo ''; }...
by Nick | Nov 18, 2013 | Code
Set the rel=”nofollow” on all pages apart from the homepage. <?php if(is_front_page() ) { echo "<p class='websiteby'>website by <a href='https://www.nick-shaw.co.uk' target='_blank'>Nick Shaw</a></p>"; } else { echo...
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...
Recent Comments