WordPress.org

Ready to get started?Download WordPress

Forums

how to put copyright text below the four widgetized footer areas in twentyten (13 posts)

  1. clovis
    Member
    Posted 1 year ago #

    I'm trying to put text (e.g. a copyright notice) that runs across the bottom of each page in my website. But in twentyten the footer has four widgetized areas. I've put the copyright text in the 'text widget' and dragged that into one of the widgetized footer areas but of course the text just runs across a quarter of the page (stuck in one of the widgetized areas). I don't want to unwidgetize the four footer areas because I want to use them for other widgets. Can I get text to go below this and centre it? Thanks!

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    You could put it below the widgets by editing the footer.php file -- but be sure you are using a Child Theme to do so. Then use CSS to center it.

  3. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    you might need to edit footer.php directly and add the copyright notice either before, between, or after the site-info and site-generator divs.

  4. clovis
    Member
    Posted 1 year ago #

    Thank you @alchymyth and @WPyogi ! I've found the location in my child theme's footer.php but have no idea what to write to get the text I want to show up! I've been trying to work out the solution but failed so far! I don't know enough about how php and css works :(

    In my style.css file I have:

    #site-generator{display: none;}

    and this in footer.php

    get_sidebar( 'footer' );
    ?>
    
    			<div id="site-info">
    				<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    					<?php bloginfo( 'name' ); ?>
    				</a>
    			</div><!-- #site-info -->
    
    			<div id="site-generator">
    				<?php do_action( 'twentyten_credits' ); ?>
    				<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentyten' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyten' ); ?>" rel="generator"><?php printf( __( 'Proudly powered by %s.', 'twentyten' ), 'WordPress' ); ?></a>
    			</div><!-- #site-generator -->
    
    		</div><!-- #colophon -->
    	</div><!-- #footer -->

    is there somewhere I can insert the actual text I want to show on the page?

  5. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Probably just adding something like this should be fine:

    <div class="my-copyright">Copyright blah blah blah</div>

    And then add something to your CSS like:

    .my-copyright {
       width: XXpx;
       margin: 0 auto 0;
    }

    Set the width to the width of the copyright text and adjust the 0 margins (top and bottom) accordingly. The auto (left and right) on the margin centers the div.

  6. alieneila
    Member
    Posted 1 year ago #

    Check the edited code below, should work.

    get_sidebar( 'footer' );
    ?>
    
    			<div id="site-info">
    				<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    					<?php bloginfo( 'name' ); ?>
    				</a>
    			</div><!-- #site-info -->
    
    			<div id="site-generator">
    				<?php do_action( 'twentyten_credits' ); ?>
    				<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentyten' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyten' ); ?>" rel="generator"><?php printf( __( 'Proudly powered by %s.', 'twentyten' ), 'WordPress' ); ?></a>
    
    <p>Copyright &copy; <?php date('Y'); ?> by Your Company Name</p>
    			</div><!-- #site-generator -->
    
    		</div><!-- #colophon -->
    	</div><!-- #footer -->
  7. clovis
    Member
    Posted 1 year ago #

    Thank you v much! I'm trying @WPyogi 's solution first, then I'll try @alieneila 's.

    I put

    <div class="my-copyright">Copyright blah blah blah</div> after </div><!-- #site-info --> and before <div id="site-generator">

    in my child theme's footer.php

    @WPyogi so far I've got the text to show on the page and run along the bottom (not get stuck in a widget area) but the first part of my text starts one line above and way over on the right and the rest starts right over on the left hand side, one line down.

    I tried different positions of the php in footer.php but that made no difference, all looked the same (except if you put it after the wrapper)

    Then I tried all different values for margin (I don't know what the standard values for margins are! :s) and it still won't centre or go on one line

    .my-copyright {
       width: 700px;
       margin: 0 auto 0;
    }

    I'm looking up margin values now to see what what values they should have but if you could tell me where I'm going wrong that'd be great!

  8. alieneila
    Member
    Posted 1 year ago #

    Without seeing your site I can't really diagnose, however since you're setting the width, the margin doesn't need to change, add text-align: center; to your .my-copyright style.

  9. clovis
    Member
    Posted 1 year ago #

    @alieneila Ah great, thanks! Now the text is on one line and almost in the centre, but still a little more over to the left. Is there a way to move it over to the right a bit more? e.g. so that it centers in relation to the banner (in twentyten theme)

  10. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    It's not good coding to use text-align for divs. If you use p tags for the text rather than div, the text-align should work find.

    But as already mentioned, without a link to the site, kinda hard to be much more specific.

    No need for margins -- only if appearance dictated them.

  11. alieneila
    Member
    Posted 1 year ago #

    More than likely the 700px width you set it to is too narrow for your site (though the margin should be centering that as well). Try setting it to 100% or increasing it above 700px. If that doesn't work, can you link me your site and I can tell you more exactly what to do?

  12. clovis
    Member
    Posted 1 year ago #

    weird, I put text-align:right; instead of center and now it's centered in relation to the banner.

    For other ultra noobs like me, style.css now has:

    .my-copyright {
       width: 700px;
       margin: 0;
    text-align: right;
    }

    Thanks @alieneila and @WPyogi for the solution! :D

  13. clovis
    Member
    Posted 1 year ago #

    oh didn't see these replies! is it bad to leave it as text-align: right; ?

Topic Closed

This topic has been closed to new replies.

About this Topic