Forum Replies Created

Viewing 1 replies (of 1 total)
  • <?php $posts = get_posts('category=3&orderby=rand&numberposts=5'); foreach($posts as $post) { ?>
    <a href="<?php the_permalink() ?>" target="_parent"><?php the_title(); ?></a>
    <?php } ?>

    Use css to make it look nice, use li, ul etc.

    If you want to insert that in page.php you can make a new template.

    Create newpage.php and copy there what is in page.php

    On top of newpage.php (first line) add this:

    <?php /* Template Name: New Page */ ?>

    Now when you want to create a new page and insert all that posts from categories -> Pages -> Add new page -> Page Attributes -> Template -> New Page

    And you’re done. I hope you get it. Regards.

Viewing 1 replies (of 1 total)