+321 123 4567
info@test.com
  • Home
  • My Services
    • Web Design
    • Web Development
    • Technical Writing
  • Portfolio
  • My Thoughts
  • Free Tools
    • Photo Editor
    • Avatar Generator
    • Email Migration Tool
    • QR Code Generator
    • RSS to HTML Converter
    • IP Address Geolocation
    • Base64 Image Encoder
    • NATO Translator
    • All Tools
  • Contact
Home
Wordpress
Adding Pagination (Numbered Navigation) to MobilePress

Adding Pagination (Numbered Navigation) to MobilePress

Wale Adekile
June 18, 2012

I’ve always loved MobilePress plugin because it’s so easy to customize and if you know some basic WordPress tags, you can make your blog’s mobile version look just the way you want. You can edit MobilePress colors, add thumbnails / featured image and integrating google adsense for mobile is really easy. I’ve successfully added a cool pagination (numbered page navigation) to my own mobile version. You can go to the homepage to check it out.


How to add numbered page navigation to mobilepressHow to add Numbered Page Navigation (Pagination) to your MobilePress Theme

1. Install and activate WP PageNavi. Of course, the pagination won’t show yet on MobilePress but we’re gonna make that happen in just a couple of minutes 🙂

2. Log in to your cPanel file manager and navigate to this file:

…public_html/wp-content/plugins/mobilepress/system/themes/default/header.php

3. Edit the file and search for this:

</style>

4. In the line just above that, past this code:


.wp-pagenavi {
padding: 10px 20px 10px !important;
display:block !important;
clear:both !important;
}
.wp-pagenavi a ,.wp-pagenavi span.pages, .wp-pagenavi span.extend {
color:#333333 !important;
text-shadow:0px 1px #F6F6F6 !important;
padding:6px 9px 6px 9px !important;
border:solid 1px #B6B6B6 !important;
box-shadow:0px 1px #EFEFEF !important;
-moz-box-shadow:0px 1px #EFEFEF !important;
-webkit-box-shadow:0px 1px #EFEFEF !important;
background:#E6E6E6 !important;
background:-moz-linear-gradient(top,#FFFFFF 1px,#F3F3F3 1px,#E6E6E6) !important;
background:-webkit-gradient(linear,0 0,0 100%,color-stop(0.02,#FFFFFF),color-stop(0.02,#F3F3F3),color-stop(1,#E6E6E6)) !important;
font-size:12px !important;
margin-right:3px !important;
text-decoration:none !important;
}
.wp-pagenavi a:hover {
color:#fff !important;
text-shadow:0px 1px #4876C9 !important;
border-color:#3D6DC3 !important;
background:#5A8CE7 !important;
background:-moz-linear-gradient(top,#C2E0FF 1px,#84AFFE 1px,#5A8CE7) !important;
background:-webkit-gradient(linear,0 0,0 100%,color-stop(0.02,#C2E0FF),color-stop(0.02,#84AFFE),color-stop(1,#5A8CE7)) !important;
color:#FFFFFF !important;
box-shadow:0px 1px #E7E7E7 !important;
-moz-box-shadow:0px 1px #E7E7E7 !important;
-webkit-box-shadow:0px 1px #E7E7E7 !important;}
.wp-pagenavi span.current{
padding:6px 9px 6px 9px !important;
border:solid 1px #DCDCDC !important;
color:#fff !important;
box-shadow:0px 1px #E7E7E7 !important;
-moz-box-shadow:0px 1px #E7E7E7 !important;
-webkit-box-shadow:0px 1px #E7E7E7 !important;
margin-right:3px !important;
text-shadow:0px 1px #4876C9 !important;
border-color:#3D6DC3 !important;
background:#5A8CE7 !important;
background:-moz-linear-gradient(top,#C2E0FF 1px,#84AFFE 1px,#5A8CE7) !important;
background:-webkit-gradient(linear,0 0,0 100%,color-stop(0.02,#C2E0FF),color-stop(0.02,#84AFFE),color-stop(1,#5A8CE7)) !important;
}

5. Now open and edit index.php located in that same folder

6. Search for this code:

<?php if (mopr_check_pagination()): ?><div id=”indexpostfoot”>
<p><?php posts_nav_link(‘ &#183; ‘, ‘Previous Page’, ‘Next Page’); ?></p></div>

7. Replace the one above completely with the code below:

<?php if (mopr_check_pagination()): ?><div id=”postfoot”>
<p><?php if(function_exists(‘wp_pagenavi’)) { wp_pagenavi(); } ?></p></div>

8. Save the file and check your blog.

You should repeat steps 5, 6 and 7 for archive.php and search.php to complete the whole thing. If you followed the guide closely, you should now have a paginated mobilepress. You can also customize the look and feel of the numbered navigation if you’re good with CSS.


Previous Post
Redirect Subdomain to Addon Domain to Avoid Duplicate Content on Google Search
Next Post
The Best Apps for your Dropbox
Wale Adekile
Husband to the world's most beautiful woman and father to two awesome kids. A nerd, obviously; also, a technical business analyst, a web designer who preaches the gospel of WordPress, and a writer. You can check out my published books on Amazon.
Wordpress

Best 3 Plugins to Effectively Block Spam on your WordPress Blog

13 years ago
how to add footer sidebars to wordpress theme's footer
Wordpress

Adding a 3 Column Widget Area to any WordPress Theme’s Footer

14 years ago

Recent Articles

wahl rapic clip hair clipper
Wahl Rapid Clip Hair Clipper Review: DIY Made Easy
BenQ LaptopBar Review: Luxury or Necessity?
yunmai easepro unboxed
Yunmai EasePro Massage Gun Review
g20
Teendow G20 Robot Vacuum and Mop Review
bathroom
Dear Men, Spraying All Over the Toilet Seat is Disgusting and Irresponsible
winx mediatrans
How to Transfer Photos from iPhone to Computer Without iTunes
google workspace
How to Migrate Emails From Google Workspace/G Suite to cPanel
synology diskstation ds920+
Synology DiskStation DS920+ Review
playstation 4
Why I haven’t Upgraded to the PlayStation 5 Yet
pain
Started Watching Anime as an Adult? You’re Not Alone

All contents on this blog are copyright protected and cannot be reproduced on other websites without permission.

Copyright © 2022 – NerdieDad | Home | Contact | About | Privacy Policy