date($format, $timestamp) is one of the most commonly used date and time functions available in PHP. It takes the desired output format for the
Common JavaScript Functions
Posted onEssential JavaScript functions that every developer should keep in their toolbox! …
Using Templates in WordPress
Posted onIn themes: get_template_part( ‘slug-name’, ‘name’ );We should keep our templates inside template-parts directory.So lets say our template file is in: themes/theme-name/template-parts/home/home-my-template.phpTo include this template you will write ( for e.g. inside front-page.php ) For e.g. our template file is in: themes/theme-name/template-parts/home/my-template.php In Plugin, For e.g. our template file is in:plugins/plugin-name/templates/my-template.php If we want to pass
Using Underscore JS _.template() in WordPress
Posted onMany times we come across a situation in JavaScript where we have to generate dynamic html You can see the code above looks messy and difficult to read. WordPress recommends to use underscore templates.WordPress already has support for underscore.js library. All you have you to do is enqueue it like so : Then you can create a template
Using underscore template in WordPress
Posted onMany times we come across a situation in JavaScript where we have to generate dynamic html You can see the code above looks messy and difficult to read. WordPress recommends to use underscore templates.WordPress already has support for underscore.js library. All you have you to do is enqueue it like so : Then you can