WordPress.org

Ready to get started?Download WordPress

Forums

Hostmarks
how to edit footer so its the same on all pages? (9 posts)

  1. paul343
    Member
    Posted 9 months ago #

    I edited footer php ,i managed to place a policy page link in there
    but it only shows on homepage, I want my privacy policy on all pages. I've been trying to solve this problem for days! can anyone help? here is my footer php

    <footer id="colophon" role="contentinfo">
    		<div id="site-generator">
    
    			<?php echo __('© ', 'hostmarks') . esc_attr( get_bloginfo( 'name', 'display' ) );  ?>
                <?php if ( (is_front_page() && ! is_paged()) || (is_page_template('alt_blog_template.php') && is_front_page() && ! is_paged()) ) : ?>
                <?php _e('- Powered by ', 'hostmarks'); ?><a>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'hostmarks' ); ?>"><?php _e('WordPress' ,'hostmarks'); ?></a>
    			<?php _e('  ', 'hostmarks'); ?><a>"><?php _e('- privacy policy', 'hostmarks'); ?></a>
                <?php endif; ?>
    
    		</div>
    	</footer><!-- #colophon -->
    </div><!-- #container -->
    
    <?php wp_footer(); ?>
    
    </body>
    </html>	</footer><!-- #colophon -->
    </div><!-- #container -->
    
    <?php wp_footer(); ?>


    [Please use the code buttons for posting code here]

  2. albertstrun
    Member
    Posted 9 months ago #

    Hi, I've just had a play around with the footer.php and came up with this solution. (deleted conditional php tags that were getting in the way).

    <footer id="colophon" role="contentinfo">
    		<div id="site-generator">
         <!-- Custom content START -->
          <!-- I've just deleted the php that displays your blog-name, etc. -->
          <a href="http://yourlinkhere.co.uk"> your Footer Link </a>
         <!-- Custom content END -->
    
    		</div>
    	</footer><!-- #colophon -->
    </div><!-- #container -->
    
    <?php wp_footer(); ?>
    
    </body>
    </html>
  3. WPyogi
    Volunteer Moderator
    Posted 9 months ago #

    @albertstrun - what happens to those changes when the theme is updated?

  4. albertstrun
    Member
    Posted 9 months ago #

    Ahh yes; cart before the horse. I am hoping /assuming Paul is using a child theme?

  5. paul343
    Member
    Posted 9 months ago #

    hi guys I found a solution , I just deleted the word "front"
    from the footer php file

    `<?php if ( (is_page() && ! is_paged()) || (is_page_template('alt_blog_template.php') && is_page() && ! is_paged())

    it worked!

  6. WPyogi
    Volunteer Moderator
    Posted 9 months ago #

    I hope you are, in fact, using a child theme so that your changes won't be permanently lost when the theme is updated -

    http://codex.wordpress.org/Child_Themes

  7. paul343
    Member
    Posted 9 months ago #

    no im not using a child theme, never heard of it before now
    il have to look in to it

  8. paul343
    Member
    Posted 9 months ago #

    is it to late to create a child theme ive already made changes to
    the theme?

  9. WPyogi
    Volunteer Moderator
    Posted 9 months ago #

    It's never too late, but it's more work - as you'll need to move your changes to the child theme. But it's really going to be worth it to do that now to avoid a bigger mess down the road when the theme is updated and/or you don't update and eventually run into compatibility issues.

    Do you know which files you've changed? It's not usually that hard to more changes to a child theme - for style.css you can compare yours to the original and for .php files (except functions) you can just put a copy in the child theme. Functions.php is more complicated.

Reply

You must log in to post.

About this Theme

About this Topic