Add Copyright Symbol and Year Date in PHP

To add a copyright symbol and year date in PHP that updates with the current year, use the code below… &copy; <?php echo date (‘Y’); ?> A HTML entity is used for the copyright symbol, then you have an opening PHP declaration followed by an echo, which is rendering the year using the date function date (‘Y’);, then the…

Read More

Add HTML [br] break tag to a Widget Title in WordPress

By default you can’t add HTML to a Widget Title in WordPress, such as a break tag <br>, you can get around this by adding a filter to allow shortcode to the title area…. In functions.php file in your child theme add: add_filter(‘widget_title’, ‘do_shortcode’); add_shortcode(‘br’, ‘ng_shortcode_breaktag’); function ng_shortcode_break( $attr ){ return ‘<br />’; } Now…

Read More

How to Create Custom WordPress Template Posts, Pages, Headers, Footers and Sidebars

How to create new WordPress templates for your theme including posts, pages, headers, footers and sidebars. To change the WordPress home page edit the index.php in the main theme  if using a child theme, just copy and then edit the file in your child theme folder alternatively you can create/edit front-page.php  – this will take priority over the index.php To make a…

Read More