Search
 
SCRIPT & CODE EXAMPLE
 

PHP

year shortcode wordpress

function year_shortcode() {
  $year = date('Y');
  return $year;
}
add_shortcode('year', 'year_shortcode');
Comment

Add current year on WordPress using Shortcode

/**
 * Add current year using shortcode [year]
 */
function current_year() {
    $year = date('j, F Y');
    return $year;
}
add_shortcode('year', 'current_year');
Comment

PREVIOUS NEXT
Code Example
Php :: isset in php 
Php :: laravel pivot select fields 
Php :: selecting data from two tables in database php 
Php :: laravel collection pop 
Php :: Unable to do sum and getting same value by using while loop php 
Php :: bind param php 
Php :: cant upload file to directory php 
Php :: paginate array before more results php 
Php :: how to fetch associate data from csv in php 
Php :: document ready wordpress 
Php :: laravel id generator 
Php :: wp_mail multiple recipients 
Php :: workpress change page title from shortcode 
Php :: s how to store jwt in http cookie laravel 
Php :: php enablem mod 
Php :: Uncaught RedisException: Redis server went away in 
Php :: php xpath attribute exact 
Php :: string concatenation in php 
Php :: laravel query builder 
Php :: laravel check if query builder is empty 
Php :: echo require php 
Php :: laravel crud example 
Php :: php/Laravel check if date is passed 
Php :: isset php 
Php :: compare key and one array 
Php :: displaying variables in blade laravel 
Php :: laravel showing index of problem 
Php :: laravel relationship 
Php :: Laravel how to use @auth and @guest with multi authentication 
Php :: laravel available router methods 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =