• Resolved Moopoo

    (@moopoo)


    Hi

    I am using the attitude theme and I need to add a few lines of text to the footer but cant work out how to do it.

    I have done some searching and found the posts about creating child themes etc and I have done that.

    I have changed the text in the footer succesfully, however it isnt enough.

    I found a post about adding text like I want to do but unfortunately the person asking the question got an answer he was able to work with as he had more knowledge than I, and I wasnt able to work out how he fixed the problem.

    It had something to do with css but im not up on that stuff so I need a little more instruction if possible.

    Cheers

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hey there Moopoo,

    Hope you’re well today!

    Could you please add more info on what you’re looking to do? Also pasting link to that thread and your site so I can see what you added so far would help as well.

    Best regards,
    Bojan

    Thread Starter Moopoo

    (@moopoo)

    Hi Bojan

    Thanks for the quick reply.

    The post I referred to was this one:

    The site I am working on this one:
    I have altered the footer to show the one line text of copyright etc, but I need to place all the lines of text above it into the footer and centre it so it shows on all pages in the centre, just above the copyright info.

    I believe the previous post shows how to do it with code in the functions file and altering the css file but is that in the child theme or not?

    Im just not sure how to do the css or altering the code in the function file or where to put it etc.

    Thanks for the help.

    Thread Starter Moopoo

    (@moopoo)

    This is the child theme functions file:

    <?php
    
    // Remove old copyright text
    add_action( 'init' , 'mh_remove_copy' , 15 );
    function mh_remove_copy() {
            remove_action( 'attitude_footer', 'attitude_footer_info', 30 );
    }
    
    // Add my own copyright text
    add_action( 'attitude_footer' , 'mh_footer_info' , 30 );
    function mh_footer_info() {
       $output = '<div class="copyright">'.'Copyright © [the-year] Monaro Pools - Division of M A G | Site by <a href="http://www.clubdot.com.au">ClubDot Hosting</a> '.'</div><!-- .copyright -->';
        echo do_shortcode( $output );
    }

    and this is the child theme style.css file:

    /*
    Theme Name: Attitude Child Theme
    Author: Self-Help WordPress User
    Template: attitude
    */
    
    @import url("../attitude/style.css");
    
    /* =Theme customization starts here

    Hey again Moopoo,

    Thank you for such a detailed explanation. Since you already have a child theme I think the easiest way to do this would be to copy your parent theme footer.php (it is located in /wp-content/themes/attitude/footer.php) and paste it into your child theme folder.

    After that open it with text editor of your choice and add this code after line 17,

    <div id="footer-info">PUT YOUR CONTENT IN HERE</div>

    If you’re unsure how to do that just copy the code from here and replace it with the one in your child theme footer.php http://pastebin.com/8UpFtsMY. Remove dummy text with the text of your choice.

    After that you can target that class to center it with some custom CSS so add this into your child theme style.css:

    div#footer-info {
    text-align: center;
    border-top: 1px solid #eaeaea;
    padding-top: 20px;
    }
    
    #site-generator {
    border-top: none;
    }

    I’ve also added the same top border to your new element and removed the one above copyright.

    Hope this helps 🙂

    Best regards,
    Bojan

    Thread Starter Moopoo

    (@moopoo)

    Hey Thanks Bojan

    I will try that as soon as I can!

    Will I get any problems down the line with theme updates etc because I have copied the footer into my child theme?

    Thread Starter Moopoo

    (@moopoo)

    Bojan you are THE MAN!

    My appologies if you are actually a woman…

    I have imlplemented your code and it works perfectly.

    Thank you again for the help.
    A+++

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘[Theme: Attitude] adding to footer’ is closed to new replies.