Hi, I am trying to add a blog to a wordpress site, I know wordpress is for blogging but I have used it to make a website. I now want to add a blog to a section of the site and have a blog page too. could someone please help me Thank you
I can help out if you need someone still. PM me if you still need it. It would be a very simple task as long as you want just a blog on say a certain page of your site domain.com/blog
Hello, thank you for your reply's. The domail is www.strive-design.co.uk, on the first page we want the right side to have a blog. I have just put in some fake content to show what it would look like. We would like a blog page, but also say the first 3 blog posts to show on the front page where it says blog too. Do you know how to do this? Thank you Leila
Hi Leilal, Create a copy of your page.php, call it page-blog.php. In the top add: <?php /* Template Name: blog */ ?> Code (markup): In the area where the content should come, add: <?php $lastposts = get_posts('numberposts=2'); foreach($lastposts as $post) : setup_postdata($post); ?> <h2><a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('l, j F Y') ?> <!-- by <?php the_author() ?> --></small> <?php the_excerpt(); ?> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="more-link">More <?php the_title(); ?></a> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('Comments »', '1 comment »', '% comments »'); ?></p> <?php endforeach; ?> Code (markup): Create a page called blog, select the template to be blog, and you're done. If you're still stuck, just send me a PM.
Hello, Thank you for your help. So do I put this code in the div I want the posts to show up in? I want to make a blog category then only the posts from this category show in the div, how do I put the category info in this code so it only shows posts from this category please? Thank you