Centering page navigation plugin

Discussion in 'HTML & Website Design' started by Sara22, Dec 20, 2009.

  1. #1
    Hello all,

    I have done all steps and added this line in my footer.php

    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>

    This is the result so far,,please see the screenshot
    [​IMG]


    Please can u tell me what to do to center the page.navi?
     
    Sara22, Dec 20, 2009 IP
  2. Lex350

    Lex350 Notable Member

    Messages:
    1,889
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    215
    #2
    Cant you just do an include then echo the code inside a Div? Then position the div whereever you want.
    <? include("footer.php") ?>
    <?
    echo "
    <div id='foot-container'>whatever the code is</div>";
    ?>

    Thats how I do my sites. Works fine.
     
    Lex350, Dec 20, 2009 IP
  3. Sara22

    Sara22 Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3



    This is my footer.php of the wordpress theme:





    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>


    <div style="clear: both;"></div>
    </div>
    <div id="footer"> &copy; Copyright
    <?php bloginfo('name'); ?>
    2009. All rights reserved. Designed by <a href="http://www.arab-designers.net">Lo Graphics 2009</a> </div>
    <?php wp_footer(); ?>




    You think is possible to do that?
     
    Sara22, Dec 20, 2009 IP
  4. Lex350

    Lex350 Notable Member

    Messages:
    1,889
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    215
    #4
    Hmm..
    you have:
    <div style="clear: both;"></div>
    </div>
    but you have nothing in the first div and then your closing a second one?
    Should just be
    <div style="clear: both;">something goes here, set an id to control it better</div>
    The second div, <div id="footer"> &copy; Copyright
    <?php bloginfo('name'); ?>
    2009. All rights reserved. Designed by <a href="http://www.arab-designers.net">Lo Graphics 2009</a> </div>, controls the Copyright info. ID #footer in the css file so you can just pad it left to move it right if you want.

    I'm not filmilar with wordpress themes but something is controling the position of those buttons, you just have to find it :confused:
     
    Lex350, Dec 20, 2009 IP
  5. Sara22

    Sara22 Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Oke i gonna try that out and especially css file, you hear if its done, laters
     
    Sara22, Dec 20, 2009 IP
  6. KeywordFairy

    KeywordFairy Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I think I found the answer at the WordPress website. I hope it works ;)

    <center><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></center>

    You might also try
    <div id="pagenav"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></div>

    and then put #pagenav in your css file and set it to align center
     
    Last edited: Dec 20, 2009
    KeywordFairy, Dec 20, 2009 IP
  7. Sara22

    Sara22 Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7


    Woow:) the first one worked to me its looks very well, but now is to turn off the default « Previous Entries/« Next Entries :eek:
     
    Sara22, Dec 20, 2009 IP
  8. KeywordFairy

    KeywordFairy Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Pretty easy to do that. In your index file there should be some code that looks similar to:

    <div id="page_nav">
    <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
    </div>

    Just delete that.
     
    KeywordFairy, Dec 20, 2009 IP