Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End need a little help with wordpress PHP

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30533
    kloy
    Member

    Hi,

    How can I edit this wordpress code to a specific category and to include an excerpt?

    Thanks!

    Recent Posts


    query_posts('showposts=6&order=date&orderby=DESC');
    if (have_posts()) :
    ?>

    #78232
    Bob
    Member

    Well if you want to show posts from category 4, you should do this:

    query_posts('cat=4');

    You can also use category names:

    query_posts('category_name=Staff Home');

    Info found at http://codex.wordpress.org/Function_Reference/query_posts. You should really look into the wordpress Codex, as it has tons of information.

    About the excerpt, you can information about that here

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.