Home / Forums / WoodMart support forum / Shortcode [year] doesn't work in Footer Copyrights text area
Home › Forums › WoodMart support forum › Shortcode [year] doesn't work in Footer Copyrights text area
Shortcode [year] doesn't work in Footer Copyrights text area
- This topic has 9 replies, 2 voices, and was last updated 5 years, 8 months ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
February 14, 2020 at 1:31 pm #173456
IdaParticipantHello,
in order to have a dynamic year in the footer, i added code in function.php :
function year_shortcode() {
$year = date(‘Y’);
return $year;
}
add_shortcode(‘year’, ‘year_shortcode’);and i placed the short code “[year]” inside “Copyrights text” area, under theme settings >> Footer.
But in the browser appears [year], not “the year”/2020
instead of that, I tried to use another code:
function currentYear(){
return date(‘Y’);but in the footer text copyright don’t admit to using:
<?php echo currentYear(); ?>It is a simple code and I have found in the forum that you also advise it, I don’t know why it doesn’t work, please, may you help me?
Thank you so much.
Best regards,February 14, 2020 at 1:52 pm #173460
Aizaz Imtiaz AwanKeymasterHello,
Your provided WP Login details has not have full access to the site. Please provide me the complete access WP Admin Login details of your site so that I’ll check it for you.
Best Regards.
February 14, 2020 at 3:22 pm #173477
IdaParticipantHello,
yes, you have admin role. Please, find below the login, i reset the passw because i don’t remember it.
Thank you so.
Best regards,February 15, 2020 at 6:31 am #173572
Aizaz Imtiaz AwanKeymasterHello,
I tried to login to your website using the new credentials and I was unable to login. Please provide with correct admin panel login details to check it myself and help you out accordingly.
Best Regards.
February 17, 2020 at 11:44 am #173976
IdaParticipantHello,
oh, i’m so sorry. Please, find below the new password, this time checked.
Thank you so.
Best Regards,February 17, 2020 at 1:39 pm #174020
Aizaz Imtiaz AwanKeymasterHello,
Still I am not able to Install any plugin on your site, because your site is Multi-site and you provided only site user access not provided the Login details as an Admin for Multi-site, So please share the Admin Login details for Multi-site so that I’ll able to Install the WP File Manager plugin on your site and try to add the Code in your Theme Files.
Best Regards.
February 17, 2020 at 1:52 pm #174039
IdaParticipantHello,
please, find it below.
Thank you so.
Best regards,February 17, 2020 at 2:09 pm #174050
Aizaz Imtiaz AwanKeymasterHello,
I have fixed the issue on your website and now the footer copyrights are working absolutely fine on my end. Please clear the cache and check back.
Screenshot for Clarification: https://ibb.co/1LYqmnc
I have added the following code in the child theme functions.php file and its working absolutely fine.
function year_shortcode() { $year = date('Y'); return $year; } add_shortcode('year', 'year_shortcode');Best Regards.
February 17, 2020 at 2:32 pm #174055
IdaParticipantHello,
yes! i see. It’s the same code i used, but now it works. Sure that i was doing something wrong.
Thank you so.
Best regards,February 18, 2020 at 5:44 am #174150
Aizaz Imtiaz AwanKeymasterMost Welcome!!!..
Well, Ida!.., it’s been great chatting with you! I hope I resolved your issues thoroughly.
Let us know if there’s anything else we can do for you! You can always reach us at any time. We are always here to help you.
Have a wonderful day.
Topic Closed.
Best Regards. -
AuthorPosts
The topic ‘Shortcode [year] doesn't work in Footer Copyrights text area’ is closed to new replies.
- You must be logged in to create new topics. Login / Register