you need a separate theme from mobile visits
Yes, but how can i change what it shows?
well the theme should have the code what it would show then you can use js to redirect to that theme if the visit from mobile. its kind of completely another site in terms of coding.
Or you can use CSS media queries to assign different stylesheets depending on browser window size.
One of the interresting articles about media queries.
That not what i am looking for,
I was wondering if there was a way to have part of one of my WordPress posts only show up if view from a mobile device
I need a way of using this code in my post or similar
include ‘Mobile_Detect.php’;
$detect = new Mobile_Detect();
// Check for any mobile device.
if ($detect->isMobile())
// mobile content
else
// other content for desktops
This uses the http://mobiledetect.net/ code
this bit requires a bit knowledge about the theme you are using. go to the them template file (.php) of the page you want different content or insert the above code on. you may ask which page to change on the theme support. for eg: if you want different content to show on home page and the home page template is home.php then you need to edit home.php to insert and modify the query as you want. or you may replicate your theme template file and create your own template(provided your theme supports template). whichever easier for you..