• Resolved writerpm

    (@writerpm)


    The free version of the Wellington theme footer says, “Powered by WordPress and Wellington.” I’d like to modify it to include a copyright statement, e.g. “? 2017 John Doe All Rights Reserved. Powered by WordPress and Wellington.”

    How can this be done?

Viewing 9 replies - 1 through 9 (of 9 total)
  • A bit of code is involved. The safest way to achieve this is to create your your own action hook (https://codex.www.ads-software.com/Plugin_API). I am assuming you are using a child theme and not modifying original theme files.

    1. Open your theme’s functions.php
    2. Go to bottom of the file and add the following snippet:

    function wellington_footer_text_modified() {
    	echo "? 2017 John Doe All Rights Reserved. Powered by WordPress and Wellington";
    }
    
    add_action( 'wellington_footer_text_modified', 'wellington_footer_text_modified' );

    3. Open footer.php and replace
    <?php do_action( 'wellington_footer_text' ); ?> with
    <?php do_action( 'wellington_footer_text_modified' ); ?>

    4. Save files and refresh your browser.

    That’s it! You should be done.

    AddWeb Solution

    (@addweb-solution-pvt-ltd)

    Hello writerpm,

    You don’t need to edit footer.php file. Add below code into active child theme’s functions.php file. Or you can create plugin for it.

    Note : Don’t modify your theme. Use child theme for any modification.


    function wellington_footer_custom_text() {
    ?>

    <span class="credit-link">
    ? <?php echo date('Y'); ?> John Doe All Rights Reserved. Powered by WordPress and Wellington.</span>
    </span>

    <?php
    }
    remove_action( 'wellington_footer_text', 'wellington_footer_text' );
    add_action( 'wellington_footer_text', 'wellington_footer_custom_text' );

    Hope this will helps you.

    Thanks!

    Thread Starter writerpm

    (@writerpm)

    Thank you both. Much appreciated!

    AddWeb Solution

    (@addweb-solution-pvt-ltd)

    @writerpm, Good to see that our provided solution worked for you. Can you please mark as “Accepted Solution” to make my put in efforts worth

    Hello AddWeb Solution,

    I don′t know how to add the code to the functions.php file. I created a child theme and it works fine. But I don′t know why you “split” the code in three parts above. I′m not an expert…

    • This reply was modified 7 years, 9 months ago by eighgee.

    I have the same question as eighgee – I need to actually replace the existing credit with something completely different. I put all three chunks of code (not sure why you split it) into the functions.php file in my child theme and it puts my text there PLUS the built in Powered by WordPress and Wellington (which I need to remove).

    AddWeb Solution

    (@addweb-solution-pvt-ltd)

    @eighgee & @cgscomputers code is not splited. Check below code.
    function wellington_footer_custom_text() {
    ?><span class="credit-link">
    ? <?php echo date('Y'); ?> John Doe All Rights Reserved.</span><?php
    }
    remove_action( 'wellington_footer_text', 'wellington_footer_text' );
    add_action( 'wellington_footer_text', 'wellington_footer_custom_text' );
    Hope this will helps you. Thanks!

    actually my functions.php look like this (example):

    <?php
    
    function child_theme_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'child-theme-css', get_stylesheet_directory_uri() .'/style.css' , array('parent-style'));
    
    }
    add_action( 'wp_enqueue_scripts', 'child_theme_styles' );

    Where should I write the function?

    My functions.php looks like this:

    <?php 
    	 add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    	 function my_theme_enqueue_styles() { 
     		  wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); 
     		  } 
     ?>

    I put your code in at line 6 and it does add what I want, however it doesn’t remove the existing “Powered by WordPress and Wellington”. It’s still there in addition to my modified text.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Modify Wellington Theme Footer’ is closed to new replies.