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 :: php json key value loop 
Php :: ip condition in php 
Php :: full url php 
Php :: carbon add minutes 
Php :: laravel doesNotHave in model 
Php :: pusher-php-server laravel 
Php :: laravel 8 delete by id 
Php :: init hook wordpress 
Php :: wp wc php if cart page is empty redirect 
Php :: wp-config override site url 
Php :: php find keyword in string 
Php :: wordpress echo the excerpt 
Php :: wp max revisions 
Php :: php unique random number 
Php :: get option field acf 
Php :: php myadmin reset auto incremente 
Php :: php remove everything after character 
Php :: twig json_encode 
Php :: laravel order by raw 
Php :: date between query in codeigniter 
Php :: carbon date from format 
Php :: woocommerce_order_status_changed 
Php :: php round all values in array 
Php :: php regex non capturing group 
Php :: how add confirmation box in php before deleting 
Php :: redirect all request to public folder laravel htaccess 
Php :: searching and removing element from an array php 
Php :: Command "route:scan" is not defined. 
Php :: php artisan make controller model and migration 
Php :: wp_mail html content 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =