badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

PHP code for copyright year doesn't work

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #27986
    Alfred
    Participant

    Hi,

    In the forum we’re told to replace [the-year] [site-link] with '.attitude_the_year().' ' .attitude_site_link().'

    Well, I tried it and it doesn’t work, most certainly because I don’t know enough about PHP syntax. Here is the Attitude’s child functions.php I want to fix:

    <?php
    
    // Remove old copyright text
    add_action( 'init' , 'sfs_remove_copy' , 15 );
    function sfs_remove_copy() {
            remove_action( 'attitude_footer', 'attitude_footer_info', 30 );
    }
    
    // Add my own copyright text
    add_action( 'attitude_footer' , 'sfs_footer_info' , 30 );
    function sfs_footer_info() {
       $output = '<div class="copyright">'.'Copyright &copy; [the-year] Daniel Corbeil | <a href="http://danielcorbeil.com/contact/">Contact</a> '.'</div><!-- .copyright -->';
       echo do_shortcode( $output );
    }
    

    Can you please tell me exactly how to modify it in order to get the current copyright year? As you can see, I don’t want a site link, but rather a contact link.

    Thank you for your help.

    #28012
    Alfred
    Participant

    OK. Finally got it with the proper PHP punctuation. The last line of code needs to be:

    $output = '<div class="copyright">'.'Copyright &copy; '.attitude_the_year().' Daniel Corbeil | <a href="http://danielcorbeil.com/contact/">Contact</a> '.'</div><!-- .copyright -->';
       echo do_shortcode( $output );
    }

    Problem solved.

    #28043

    Great! 🙂

    #28224
    landile.x
    Participant

    Hi I really love ur theme very much, can we edit footer of themes to erase “Theme By Theme Horse” “Powered by WordPress” and another link to wordpress?

    Thanks!

    #28228

    Hi Landile,

    To have this features you have to upgrade it to Attitude Pro version.

    Thank you!

    #28795
    fabio1rst
    Participant

    Hello.

    I find this template also really great! Is this feature (changing the footer) guaranteed in the Pro version included?

    Is it legal to use Attitude Pro commercially and change the footer?

    Thanks for your help?

    #28816

    Hi Fabio1rst,

    Yes you can change the footer information in the Pro version.
    Yes you can use it into the multiple site of yours but you will not get support for all the sites.

    Thank you!

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.