Support » Fixing WordPress » How to Add Privacy Policy to Footer

  • Resolved midlife mama


    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( __( '', '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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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

    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.

    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.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to Add Privacy Policy to Footer’ is closed to new replies.