Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New to the CF scene
    Join Date
    Feb 2014
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    coding problem - editing the footer text

    Hi,
    I'm struggling with some code, and am hoping someone can help me.

    I want to change the text on my footer. I know nothing about all this, but with help from my theme developer and hosting company, I've managed to create a child theme and copy the functions.php file into it.

    At the moment, my footer says
    evolve theme by Theme4Press • Powered by WordPress

    but I'd like it to say
    website designed by Nicola Booth Consultancy

    The following is the code I now have in my functions file but it's not working - it still shows as the original text.

    Can someone tell me where I've gone wrong - please?


    [CODE]<?php //Opening PHP tag

    $credits = '<p id="copyright"><span class="credits"><"Website designed by Nicola Booth Consultancy"</span></p>';
    echo apply_filters( 'evolve_copy', (string) $credits );}

    ?> //Closing PHP tag [ICODE]

  • #2
    New to the CF scene
    Join Date
    Feb 2014
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    NOTE: I have very very basic knowledge in php so my solution may not be the correct approach, but I like to try ...
    I have tested this and its what you asked for it to say..

    <?php //Opening PHP tag
    $credits = '<p id="copyright"><span class="credits">Website designed by Nicola Booth Consultancy</span></p>';
    echo $credits;
    //Closing PHP tag
    ?>


    Try that

  • #3
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,455
    Thanks
    8
    Thanked 1,084 Times in 1,075 Posts
    Child themes are really the best way to go, but if you don't expect to be updating the theme template, you can just modify the original files. You always update WordPress files, but most of the theme authors don't provide updates to the themes, so using child isn't always necessary.

    On your WP admin dashboard, under the menu item "Appearance" there's a link called "Editor". Click on that.

    In the right column look for "footer.php". Click on that and it will open that script.

    Copy the whole thing and paste it into a plain text file using Notepad. What you're doing it making a copy of it on your computer. Save it in a safe place on your computer with the name "footer.php". Now you can modify the one on WordPress. If you destroy it, you can always get-back the original saved on your PC.

    Modify that "footer.php" script by modifying the actual HTML or PHP.

    Do a save and then do a refresh on the browser when viewing your site to see if it changes. You may have to reload/refresh a few times if your browser has cached it.

  • #4
    New to the CF scene
    Join Date
    Feb 2014
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks to both of you for your help. I'm still not there yet though.

    learntocode: I replaced my code with yours and saved it. Is there anything else I need to do - nothing's happened. It feels like I'm maybe missing a step, but I don't know what that would be. I've read that it should automatically look to the child theme and overwrite anything there over the main theme. Is there a manual step I need to take to have this happen?

    mlseim: I've found the footer.php but don't understand a single symbol in there - so wouldn't know where to start to modify it. I don't recognise the text that's in my footer so I can't just do a replace. I've posted it below, in case it makes perfect sense to you and is very easy to fix.

    Thanks again for your help both of you, I really appreciate your efforts.



    PHP Code:
    <?php
    /**
     * Template: Footer.php
     *
     * @package EvoLve
     * @subpackage Template
     */
    ?>
            <!--END #content-->
            </div>
        
            <!--END .container-->
        </div> 
      
      

              <!--END .content-->
        </div> 
      
      

      
         <!--BEGIN .content-bottom--> 
      <div class="content-bottom">
      
               <!--END .content-bottom-->
      </div>
                
            <!--BEGIN .footer-->
            <div class="footer">
        
        
           <!--BEGIN .container-->
        <div class="container container-footer">    
      
      <?php $evl_widgets_footer evl_get_option('evl_widgets_num','disable');

    // if Footer widgets exist

      
    if (($evl_widgets_footer  == "") || ($evl_widgets_footer  == "disable"))  
    { } else { 
    ?>

    <?php 

    $evl_footer_css 
    '';

    if (
    $evl_widgets_footer == "one") { $evl_footer_css 'widget-one-column col-sm-6'; }

    if (
    $evl_widgets_footer == "two") { $evl_footer_css 'col-sm-6 col-md-6'; }

    if (
    $evl_widgets_footer == "three") { $evl_footer_css 'col-sm-6 col-md-4'; }

    if (
    $evl_widgets_footer == "four") { $evl_footer_css 'col-sm-6 col-md-3'; }

    ?> 


      <div class="widgets-back-inside row"> 
      
        <div class="<?php echo $evl_footer_css?>">
            <?php    if ( !dynamic_sidebar'footer-1' ) ) : ?>
          <?php endif; ?>
          </div>
         
         <div class="<?php echo $evl_footer_css?>"> 
          <?php    if ( !dynamic_sidebar'footer-2' ) ) : ?>
          <?php endif; ?>
          </div>
        
        <div class="<?php echo $evl_footer_css?>">  
            <?php    if ( !dynamic_sidebar'footer-3' ) ) : ?>
          <?php endif; ?>
          </div>      
        
        
        <div class="<?php echo $evl_footer_css?>">  
            <?php    if ( !dynamic_sidebar'footer-4' ) ) : ?>
          <?php endif; ?>
          </div>
          
          </div>

            

        
        <?php ?>


    <div class="clearfix"></div> 
      
      <?php $footer_content evl_get_option('evl_footer_content',''); 
     if (
    $footer_content === false$footer_content '';
     echo 
    do_shortcode($footer_content);
    ?>   


     

      
      

                <!-- Theme Hook -->
          
          <?php evlfooter_hooks(); ?> 
          
              

                  <!--END .container-->  
        </div> 



     
            
            <!--END .footer-->
            </div>

    <!--END body-->  



      <?php $evl_pos_button evl_get_option('evl_pos_button','right');
      if (
    $evl_pos_button == "disable" || $evl_pos_button == "") { ?>
      
       <?php } else { ?>
       
         <div id="backtotop"><a href="#top" id="top-link"></a></div>   

    <?php ?>

    <?php $evl_custom_background evl_get_option('evl_custom_background','0'); if ($evl_custom_background == "1") { ?>
    </div>
    <?php ?>

    <?php wp_footer(); ?> 

    </body>
    <!--END html(kthxbye)-->
    </html>
    Last edited by VIPStephan; 02-10-2014 at 07:27 PM. Reason: added code BB tags

  • #5
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,455
    Thanks
    8
    Thanked 1,084 Times in 1,075 Posts
    Where you see these two lines ...


    <!-- Theme Hook -->

    <?php evlfooter_hooks(); ?>



    You'll be making two changes ...
    1) comment-out the PHP script by adding //
    2) add the line after it.

    Change it to this ...


    <!-- Theme Hook -->

    <?php // evlfooter_hooks(); ?>
    <p id="copyright"><span class="credits">website designed by Nicola Booth Consultancy</span></p>




    If you would like a copyright date .. example (c)2014 .. change it to this ...


    <!-- Theme Hook -->

    <?php // evlfooter_hooks(); ?>
    <p id="copyright"><span class="credits"> &copy;<?php echo date("Y");?> - Nicola Booth Consultancy | website designed by Nicola Booth Consultancy</span></p>




    .
    Last edited by mlseim; 02-11-2014 at 12:51 AM.

  • Users who have thanked mlseim for this post:

    nicb137 (02-11-2014)

  • #6
    New to the CF scene
    Join Date
    Feb 2014
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    That worked! Thank you so so much, I've been stuck on that for ages now.

    I really appreciate your help - thankyou!

  • #7
    New to the CF scene
    Join Date
    Feb 2014
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    A very strange thing has just happened - wonder if you can help. I edited the footer as you suggested and it worked perfectly - except that my parallax slider in my header disappeared!
    I put the footer back to normal and the slider re-appeared as normal.
    I did the whole thing again - change the footer to your suggest, and the same thing happened - the footer was the way I wanted it but the header slider disappeared.

    I've put the footer back to the way it was again, so that the header is correct - but I don't understand why that would happen.

    Any thoughts??


    Thanks

  • #8
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,455
    Thanks
    8
    Thanked 1,084 Times in 1,075 Posts
    Now that I found your website ....
    http://nicolaboothconsultancy.co.uk/

    I looked at the HTML source. It looks like they are using 'Bootstrap' to enhance the WordPress Theme. That complicates things. Bootstrap is a framework of javascripting, CSS, and other crap put together that is supposed to make better and more powerful WordPress themes.

    So now, I think we're back to editing the "functions.php" script. That is a nasty one to edit. I'm going to PM you with my email address. If you can copy the entire "functions.php" script into notepad and save it as "functions.txt" and email it me, I will look for the correct location of the footer.

    The private message thing is at the top right of the page, in the "welcome" box.

  • #9
    New to the CF scene
    Join Date
    Feb 2014
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you so much - I'll do that.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •