WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm developing a mobile theme and need to change the format of posts that are using the tag.

Can I add something to functions.php to change the format?

Ideally i'd like to make each page a list-item then display all inline on one page versus an individual pages, is that possible?

share|improve this question

One easy way to do this is to alter the global variables related to paging after calling the_post() in your loop.

global $post, $pages, $numpages, $multipage;
while( have_posts() ) {

    if( is_mobile() ) {
        $pages = array( $post->post_content );
        $page = $numpages = 1;
        $multipage = false;

    // ... template

Basically what you're doing is un-doing the paging setup done in setup_postdata()

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.