copyright year in subfooter

Posted in: Newspaper
Post count: 75

Is it possible add to copyright subfooter option to add current year or start year or support for sortcodes?
Like on screenshot
copyright year in subfooter

But idea is, I will add the start year and if current year not same show startYearcurrentYear

automatic-copyright-year.php


<?php
/**
* Automatic copyright year
*
* @link https://css-tricks.com/snippets/php/automatic-copyright-year/
*/
function autoCopyrightYear($year = 'auto') {
if(intval($year) == 'auto'){ $year = date('Y'); }
if(intval($year) == date('Y')){ echo intval($year); }
if(intval($year) < date('Y')){ echo intval($year) . ' - ' . date('Y'); }
if(intval($year) > date('Y')){ echo date('Y'); }
}

  • This topic was modified 8 years by reatlat.
Post count: 1341
Post count: 75

Ohh man, do you think If I start this topic without checkin the forum?


@byvaly
please check my question!
It was request to new feature!

For sure I can add my custom function to F**KING footer.php
Or much better edit file ./parts/footer/td_sub_footer_template_1.php

But I don’t want edit pure theme! I don’t want lose my changes every update(for reason tagDiv team) footer or something.

Will be really helpful add_filter or add_action for that,
But NOT edit original theme!!! Also I don’t want have a child theme, it’s too complicated, and I don’t want loose a lot of time, for me much faster write a small plugin!

I already check the source and right now its not so easy to implement it without hardcode!

PS: don’t offer me lazy solution!

  • This reply was modified 8 years by reatlat.
Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.