Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter howster2010

    (@howster2010)

    Hi,
    At its most basic level – should the below work for news.php

    <?php /*Template Name: news*/?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    
    <body>
    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $my_query = new WP_Query("category_name=latest-news&showposts=2&paged=$paged"); ?>
    </body>
    </html>

    ..or do i need additional code at the top for wp to understand. Is it compulsory to use header,sidebar and footer.php as embeds? Thanks

    Thread Starter howster2010

    (@howster2010)

    Thanks vtxyzzy but that code wouldnt work for me unfortunately. It displayed nothing strangely. Pagination just wont kick in but title and content pulls in fine with my own code above. New to wp so at experimental stages.
    I created a custom page news.php that i put the above code into and am using the default twentyten loop.php file. If anyone has a sample of code for pulling in title and content with pagination it wud be much appreciated.Maybe i should be using some other theme to build off? Something basic that someone may recommend?
    THANKS

    Thread Starter howster2010

    (@howster2010)

    I am working off the twentyten theme if it helps.

    Thread Starter howster2010

    (@howster2010)

    I noticed that setting the page to draft status works but is there a more concrete method? Draft will make it unsearchable but the pae is still accessible

Viewing 4 replies - 1 through 4 (of 4 total)