Mazhar Posted August 10, 2010 Share Posted August 10, 2010 How do I add some text at the bottm grey area: Note that I want to add text to the grey area and not to the white area. How do I do it? Link to comment Share on other sites More sharing options...
0 Colin-uk Veteran Posted August 10, 2010 Veteran Share Posted August 10, 2010 usually you edit footer.php in your theme folder. if you want it in the grey part, just put it at the very end, after everything, it might not have the same styling applied to it as the other text though (unless you do it yourself). Link to comment Share on other sites More sharing options...
0 Mazhar Posted August 10, 2010 Author Share Posted August 10, 2010 Okay I added the text at the very end of footer.php but the text is coming at the white area, the white area is extended and text is coming on it...and not in the grey area. Link to comment Share on other sites More sharing options...
0 the better twin Posted August 10, 2010 Share Posted August 10, 2010 wordpress themes are made up of html that is split into 4 parts (header, sidebar, body and footer) so when you put text at the very end of the footer it will probably put it outside of the page wrapper. experiment with the placement in the footer.php and then view the source to check that it is in the right place. Link to comment Share on other sites More sharing options...
0 Got3n Posted August 10, 2010 Share Posted August 10, 2010 can you post the footer.php code for me please. Link to comment Share on other sites More sharing options...
0 Cupcakes Posted August 10, 2010 Share Posted August 10, 2010 You will need to create a div outside of the main container that's set. This is what footer.php contains: <?php /** * The template for displaying the footer. * * Contains the closing of the id=main div and all content * after. Calls sidebar-footer.php for bottom widgets. * * @package WordPress * @subpackage Twenty_Ten * @since Twenty Ten 1.0 */ ?> </div><!-- #main --> <div id="footer" role="contentinfo"> <div id="colophon"> <?php /* A sidebar in the footer? Yep. You can can customize * your footer with four columns of widgets. */ 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 --> </div><!-- #wrapper --> <?php /* Always have wp_footer() just before the closing </body> * tag of your theme, or you will break many plugins, which * generally use this hook to reference JavaScript files. */ wp_footer(); ?> </body> </html> See the bit for <!-- #wrapper -->? That closing div is what closes the div that essentially is what sets the white background. Since you want your content to appear in the grey body background, you will need to add the following directly AFTER that <!-- #wrapper --> tag. <div id="mazhar"> Your text would go here </div> Bear in mind that you will need to properly style it so that it fits to your liking. Since it will not be in the wrap you'll have to add margin: 0 auto; so the ID in your CSS so that it centers itself below the rest of your content. Then add anything else you need to style it. can you post the footer.php code for me please. That's the default TwentyTen theme. You can find the footer.php code anywhere if you just look for it. Link to comment Share on other sites More sharing options...
0 Mazhar Posted August 11, 2010 Author Share Posted August 11, 2010 I have removed the WordPress's default footer and I am intending to mention that "Powered by WordPress" at the grey area with the following styling: 1. wordpress.org link on that, and 2. center Currently after removing the WP's footer, I have this code in footer.php: <?php /** * The template for displaying the footer. * * Contains the closing of the id=main div and all content * after. Calls sidebar-footer.php for bottom widgets. * * @package WordPress * @subpackage Twenty_Ten * @since Twenty Ten 1.0 */ ?> </div><!-- #main --> <div id="footer" role="contentinfo"> <?php /* A sidebar in the footer? Yep. You can can customize * your footer with four columns of widgets. */ get_sidebar( 'footer' ); ?> </div><!-- #footer --> <?php /* Always have wp_footer() just before the closing </body> * tag of your theme, or you will break many plugins, which * generally use this hook to reference JavaScript files. */ wp_footer(); ?> </body> </html> Now tell me what do I do. Link to comment Share on other sites More sharing options...
0 Cupcakes Posted August 11, 2010 Share Posted August 11, 2010 I already told you what you can do. If you still want to retain #footer, then you will need to move it OUTSIDE of the closing div for the wrapper ID. Link to comment Share on other sites More sharing options...
0 Mazhar Posted August 11, 2010 Author Share Posted August 11, 2010 There is no Wrapper ID in my code. And I am placing the code you told, right after <!-- #footer --> tag but it is still appearing in the white area. Edit: Okay what I did is that I placed a wrapper ID after footer ID and it works now. Now I try to put the <a href> tag for the link. Link to comment Share on other sites More sharing options...
0 Cupcakes Posted August 11, 2010 Share Posted August 11, 2010 Your code Twentyten code. There's a main wrapper set on the theme. You will need to place the footer outside of it. Link to comment Share on other sites More sharing options...
Question
Mazhar
How do I add some text at the bottm grey area:
Note that I want to add text to the grey area and not to the white area. How do I do it?
Link to comment
Share on other sites
9 answers to this question
Recommended Posts