Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
09-29-2017, 08:41 AM | #1 |
Registered User
Industry Role:
Join Date: Sep 2017
Posts: 80
|
How to limit the number of wordpress posts just for mobile ?
I am using WPscript and I want to limit the number of posts for the mobile version of the website.
So far I found this code and placed it in the functions.php file. It doesn't do anything, I think it should be placed elsewhere. Any ideas? Code:
add_action('pre_get_posts','change_limit_mobile'); function change_limit_mobile($query){ $new_limit = 10; $iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone"); $android = strpos($_SERVER['HTTP_USER_AGENT'],"Android"); $ipad = strpos($_SERVER['HTTP_USER_AGENT'],"iPad"); $berry = strpos($_SERVER['HTTP_USER_AGENT'],"BlackBerry"); $ipod = strpos($_SERVER['HTTP_USER_AGENT'],"iPod"); if (( $iphone || $android || $ipad || $ipod || $berry ) && $query->is_main_query()){ set_query_var('posts_per_page',$new_limit); } }
__________________
Is your step-mom hot? Watch this with her... All girls love cumming ! Watch some amazing squirters in action Buy and Sell adult traffic with Plugrush | Popcash | Trafficjunky Earn $$$ with the best adult CPA network Crackrevenue |
10-03-2017, 12:13 AM | #2 |
Too lazy to set a custom title
Industry Role:
Join Date: Feb 2005
Posts: 17,064
|
Bump for you.
|
10-03-2017, 07:32 AM | #3 |
It's 42
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 18,083
|
change 10 to 5 and see what happens?
|
10-03-2017, 08:25 AM | #4 |
Registered User
Industry Role:
Join Date: Sep 2017
Posts: 80
|
Changed it, nothing happened.
__________________
Is your step-mom hot? Watch this with her... All girls love cumming ! Watch some amazing squirters in action Buy and Sell adult traffic with Plugrush | Popcash | Trafficjunky Earn $$$ with the best adult CPA network Crackrevenue |
10-03-2017, 08:36 AM | #5 |
God Bless You
Industry Role:
Join Date: Aug 2014
Location: Glasgow, $cotland
Posts: 1,467
|
you are planing to change it for archive / category listing? well can be done by custom coding (not a big) with good mobile detection plugin.
for example https://wordpress.org/plugins/custom-content-shortcode/ this plugin can do this.
__________________
magneto664 📧 gmail.com Adult Backlinks 💘Best Website Stats 💘 Best CDN for Adult Content My Fav: 👍Chaturbate 👍 Stripchat 👍 Dateprofits 👍 AdultFriendFinder |
10-03-2017, 10:20 AM | #6 |
It's 42
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 18,083
|
PHP Code:
Have you tried search => https://stackoverflow.com/questions/...ust-for-mobile he says this worked ;) |
10-03-2017, 11:07 AM | #7 | ||
Registered User
Industry Role:
Join Date: Sep 2017
Posts: 80
|
Quote:
Quote:
__________________
Is your step-mom hot? Watch this with her... All girls love cumming ! Watch some amazing squirters in action Buy and Sell adult traffic with Plugrush | Popcash | Trafficjunky Earn $$$ with the best adult CPA network Crackrevenue |
||
10-03-2017, 12:14 PM | #8 | |
God Bless You
Industry Role:
Join Date: Aug 2014
Location: Glasgow, $cotland
Posts: 1,467
|
Quote:
tnx.
__________________
magneto664 📧 gmail.com Adult Backlinks 💘Best Website Stats 💘 Best CDN for Adult Content My Fav: 👍Chaturbate 👍 Stripchat 👍 Dateprofits 👍 AdultFriendFinder |
|
10-07-2017, 10:07 AM | #9 |
Confirmed User
Industry Role:
Join Date: Mar 2008
Location: France
Posts: 308
|
For my logo I use CSS to display a different one according to the width size of the screen.
.logo1 {display:block;} .logo2 {display:none;} @media (min-width: 1150px) { .logo1 {display:none;} .logo2 {display:block;} } Then in the header I put both logo <div class="logo1"><img src="logo1.png" width="118px" height="50px" /></div> <div class="logo2"><img src="logo2.png" width="500px" height="80px" /></div> If you do something similar for your blog content you should be able to get what you want using a different WP_Query in the two loops https://codex.wordpress.org/Class_Reference/WP_Query
__________________
Stop doing what you like and start doing what brings you money! |