Select Page

Add category ID as a class to the body tag in Prestashop

Within CategoryController.php’s initContent() function find “$this->context->smarty->assign(array(” and add a new line: 'parent_category_chain' => $this->category->getParentsCategories(), In your header.tpl you can use a foreach...

Use Shortcode in WordPress Template with Custom Fields

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...

Use Shortcode in WordPress Template

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]"); ?>

OpenCart (VQMod) Replace Logo With Text

This can be used to replace the default logo with text in OpenCart. This uses VQMod so no core files are changed. <modification> <id>Replace Logo with Text</id> <version>1.1</version> <vqmver>1.0.3</vqmver> <author>Nick...

Target a specific page in Joomla

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 ''; }...

Set rel=”nofollow” on all pages but the homepage

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...