WordPress.org

Ready to get started?Download WordPress

Forums

Attitude
Customizing the footer in Attitude theme (21 posts)

  1. RinnieWriter
    Member
    Posted 1 year ago #

    Hi, I'm another Attitude user with a customization question. (Loving the responsiveness of this template, BTW.)

    We need to edit the footer to add credits for the blog designers, etc., but there is no text exposed in the footer.php to edit the labels and hrefs, and there is no way that I see to do it under Theme Options.

    What am I missing?

    Thanks!
    Rinnie

  2. RinnieWriter
    Member
    Posted 1 year ago #

    (FYI - WordPress version: 3.5.1)

  3. esmi
    Forum Moderator
    Posted 1 year ago #

    Why are you using an old copy of WordPress? Were you aware that your site is currently running a very real risk of being hacked. You need to upgrade WordPress asap.

  4. After you've updated your WordPress installation (really, do that first) give this thread a look.

    http://wordpress.org/support/topic/remove-or-edit-info-in-footer?replies=28#post-4018588

    Start at the top, it'll be easier to get when you do.

    Remember, you want to use child theme instead of modifying the Attitude theme directly.

    http://codex.wordpress.org/Child_Themes

  5. RinnieWriter
    Member
    Posted 1 year ago #

    Um, I'm sorry...I'm completely new to WordPress. Apparently I looked in the wrong place for the version. The footer of my Dashboard says "Thank you for creating with WordPress. Version 3.5.2" and there are no updates showing as available, so as far as I can tell I do have the latest versions of WP and Attitude, it's just when I posted the first time I copied from the right column of this page thinking it was displaying my version of WP and it wasn't. Sorry...

  6. It's all good. ;)

    Were you able to customize that footer?

  7. RinnieWriter
    Member
    Posted 1 year ago #

    (deep breath) Feels a little like a request to go swimming led into what I thought I was jumping off the high dive but landed in the ocean.

    I'm trying to digest what all is involved in setting up a child theme. I get why it's needed, makes perfect sense. I'm getting a little confused with the part about 'get_stylesheet_directory()' — specifically whether that's applicable to just change the footer text and hrefs.

    I thought I had seen a reply in this string about a footer-somethingElse.php, which I think is where I'd edit the text/href but I'm not seeing that now....?

  8. RinnieWriter
    Member
    Posted 1 year ago #

    (Wiping egg from face) imperfect memory... found that in the string you ref'd on the previous support topic

  9. RinnieWriter
    Member
    Posted 1 year ago #

    I'm getting an unexpected T_STRING error, so I must have missed a quote or something in the function.php:

    //Unlike style.css, the functions.php of a child theme does not override the parent functions.php __ It is loaded immediately before and in addition to the parent’s functions.php.
    
    <?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] [site-link] Powered by: <a href="<?php echo "http://www.thatcompany.com/topicpage.html"; ?>"><img title="Client Service Group" src="<?php echo url::file_loc('img'); ?>images/logo130.png" alt="Client Service Provided" width="130"/></a></p> '.'</div><!-- .copyright -->';
       echo do_shortcode( $output );
    }

    Error statement is:
    Parse error: syntax error, unexpected T_STRING in /home/content/k/a/l/kalosplastics/html/blog/wp-content/themes/attitude-child/functions.php on line 14

    with line 14 in the above code being this argument:
    $output = '<div class="copyright">'.'Copyright © [the-year] [site-link] Powered by: <a href="<?php echo "http://www.thatcompany.com/topicpage.html"; ?>"><img title="Client Service Group" src="<?php echo url::file_loc('img'); ?>images/logo130.png" alt="Client Service Provided" width="130"/></a></p> '.'</div><!-- .copyright -->';

  10. Andrew
    Forum Moderator
    Posted 1 year ago #

    You're opening PHP even though it's not closed.

  11. Andrew
    Forum Moderator
    Posted 1 year ago #

    Try this instead:

    $imgUrl = url::file_loc('img');
    $output = '
    <div class="copyright">Copyright © [the-year] [site-link] Powered by: <a href="//www.thatcompany.com/topicpage.html">
     <img title="Client Service Group" src="'. $imgUrl . 'images/logo130.png" alt="Client Service Provided" width="130"/>
    </a>
    </div><!-- .copyright -->
    ';
  12. RinnieWriter
    Member
    Posted 1 year ago #

    OK, that seems to work better in that the page loads, although the banner and other stuff isn't showing. At the bottom of the page, I see this error:
    Fatal error: Class 'url' not found in /home/content/../html/blog/wp-content/themes/attitude-child/functions.php on line 12

    where line 12 is now
    $imgUrl = url::file_loc('img');
    in the function.php...

    Do I need to add a div tag for url? Or is that a capitalization or delimiter issue...?

    (Yes, I'm really green. Thanks in advance for your patience.)

  13. RinnieWriter
    Member
    Posted 1 year ago #

    I loaded the attitude-child theme and activate it, so it shows as the theme. However, the style.css apparently isn't reading through, because even though when I view the style.css in the editor and verify that the changes are there, none of the changes are showing. Path is ..\wp-content\themes\attitude-child\style.css and the style.css is a copy of the style.css from the parent theme with modifications. I originally modified it in the parent directory, so I know the modifications work. It just isn't working now that I moved it to the child directory and upgraded the theme.

  14. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    ..\wp-content\themes\attitude-child\style.css

    Those "backslashes" are backwards - they should be /

    You also should have only changes NOT a copy of the entire CSS file in the child theme. Doing so creates duplicate code AND makes it much harder to keep track of what you have changed. You can use a file comparison program to compare files and extract your changes for the child theme.

  15. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Also, if the above is referring to the child theme, the @import line in the new style.css file should be:

    @import url("../attitude/style.css");
  16. RinnieWriter
    Member
    Posted 1 year ago #

    I actually didn't have a \ in the file, that was just a copy/paste from Windows Explorer within the context of describing where I had placed the child theme directory. I'm sorry if that was confusing...

    In the CSS i only have referenced exactly as:
    @import url("../attitude/style.css");

    I have the child theme's style.css containing only the lines that have been modified, and for clarity/simplicity, the entire child style.css is:

    /*
    Theme Name: Attitude Child
    Author: FindLocal Company
    Description: Child theme for the Attitude theme
    Author: FindLocal Company
    Template: attitude
    Version: 0.1.5
    */
    
    @import url("../attitude/style.css");
    
    /* =Menu MODS------------------------------------------------- */
    
    #access {
    	/*border-top: 1px solid #EAEAEA;*/
    	/*border-bottom: 1px solid #EAEAEA;*/
    }
    
    #access ul {
    	border-radius: 10px 10px;
    	background-color: #6CD6E6;
    	margin: 5px;
    }
    
    #access a {
    	color: #333;
    	display: block;
    	font-size: 14px;
    	padding: 16px 5px 5px;
    }
    
    /* =Header MODS---------------------------------------------- */
    #branding {
    	margin-top: 60px;
    }
    .hgroup-right {
    	margin-top: -78px;
    }

    So, the child folder only contains the /images folder with only the modified images, and the function.php, and the modifications-only version of the style.css.

    Now the theme won't activate. It shows as a broken theme, template missing.

  17. RinnieWriter
    Member
    Posted 1 year ago #

    (I can't figure out how to edit my post, so I can't just add a follow-up question or update the information.)

    Since the child theme was previously activated, and at that time the child style.css had all the lines from the parent style.css, I don't think that I should be copying any PHP files (other than function.php) into the child theme folder. I re-read the child themes info, and it doesn't mention anything about needing any files from the parent theme except for whatever is necessary to delineate the desired modifications. And, since the child theme was able to be activated before I stripped out all the other lines from the styles.css that are okay as-is in the parent styles.css...I'm thinking it must be something that I deleted from the styles.css that is throwing the "template missing" error.

    Since the error now is that the template is missing, does that mean the child's style.css has to also include the lines defining the styles where the word template is part of the style/class name?

  18. Andrew
    Forum Moderator
    Posted 1 year ago #

    I don't think you should copy the functions.php file over into your Child Theme. Can you try removing this?

  19. RinnieWriter
    Member
    Posted 1 year ago #

    The functions.php file is there because one of the modifications I have to do is changing the footer, which I was attempting to do as per these instructions. Referenced article in that link says, "Unlike style.css, the functions.php of a child theme does not override its counterpart from the parent. "

    So, the functions.php file that I have in the child theme is:

    <?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() {
       $imgUrl = url::file_loc('img');
       $output = '<div class="copyright">Copyright © [the-year] [site-link] Powered by: <a href="//www.company.com/website-optimization-design.html"> <img title="Website Optimization" src="'. $imgUrl . 'images/logo130.png" alt="Website Optimization" width="130"/></a></div><!-- .copyright -->';
       echo do_shortcode( $output );
    }
    <link rel="author" href="https://plus.google.com/111599818756142119126/posts" />
    
    ?>

    (I had to strip out the URL-specific stuff to keep Google from snagging this forum string, but you can inbox me for details.)

  20. RinnieWriter
    Member
    Posted 1 year ago #

    Crud - the <link> tag isn't in there...I double-pasted that oops in the process of compiling that reply... please skip that line.

  21. itsprabhucbe
    Member
    Posted 3 months ago #

    thank u friends for your reply..

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic