[resolved] How to Add Privacy Policy to Footer (5 posts)

  1. midlife mama
    Posted 2 years ago #

    In my Child Theme for Twenty Twelve, I've added a privacy policy page but now I'm trying to add a link to it in my footer.php file. I'm not very well versed so if someone would kindly walk me through it, I'd appreciate it.

    Here's what I have in my footer.php. Where and how do I add the code for the separate privacy policy page?

     * The template for displaying the footer.
     * Contains footer content and the closing of the
     * #main and #page div elements.
     * @package WordPress
     * @subpackage Twenty_Twelve
     * @since Twenty Twelve 1.0
    	</div><!-- #main .wrapper -->
    	<nav id="footer-navigation" class="main-navigation" role="navigation">
    			<?php wp_nav_menu( array( 'theme_location' => 'secondary', 'menu_class' => 'nav-menu' ) ); ?>
    		</nav><!-- #footer-navigation -->
    	<footer id="colophon" role="contentinfo">
    		<div class="site-info">
    			<?php do_action( 'twentytwelve_credits' ); ?>
    			Copyright &copy; <?php echo date ('Y'); ?> <a hreh="<?php echo home_url(); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a>.
    			<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentytwelve' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentytwelve' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentytwelve' ), 'WordPress' ); ?></a>
    		</div><!-- .site-info -->
    	</footer><!-- #colophon -->
    </div><!-- #page -->
    <?php wp_footer(); ?>

    Thank you!
    Here's the webpage for reference.

  2. Pioneer Valley Web Design
    Posted 2 years ago #

    Create a new <div> just above </body> and add your HTML...then style with CSS (in Child Theme)...


    <div class="priv_foot"><p>We respect your data and have a <a href="full URL and path here">Privacy Policy.</a></p></div>

    Note, you can use PHP to grab the path/post/page...


    .priv_foot {
    //your CSS here
    .priv_foot p {
    //style the text CSS here
  3. Sandra l***
    Posted 2 years ago #

    According to this line

    ?php wp_nav_menu( array( 'theme_location' => 'secondary', 'menu_class' => 'nav-menu' ) ); ?>

    There is a menu called "secondary" that you can populate from the back-end (wp-admin) through appearance->menu. You could add a link to your privacy policy through this menu.

  4. midlife mama
    Posted 2 years ago #

    Thank you both! Seacoast, I placed the code right before the closing footer instead and it worked beautifully, with no need for additional styling. Sandra, thanks for your help, too.

  5. Pioneer Valley Web Design
    Posted 2 years ago #

    If that works too, great..(note: end of body and end of footer in a wp.org site are the same...

Topic Closed

This topic has been closed to new replies.

About this Topic