Jump to content

Using wordpress to power a magazine site


bbackhouse

Recommended Posts

Firstly let me say that I don't really know anything about PHP or web development but I've been tasked by my brother in law to put together a website for a small magazine that he is starting. I built the main site in HTML and CSS and I decided to use Wordpress as a CMS system. On each relevant page of the website I have inserted the following code:

 

 

  <?php
require('wordpress/wp-blog-header.php');
?>
 
<?php
query_posts('category_name=sport');
?>
<?php while (have_posts()) : the_post(); ?>
 
<?php echo "<br />"; ?>
 
<h1>
<?php the_title();  ?> 
</h1>  
 
<p>
<?php the_content(); ?>
</p>
 
<?php endwhile; ?>
 
 
 
This works great to bring in the content I want on that page using categories to define where it ends up. The problem is that as soon as I have a few posts the page gets very long. So what I would like to do is show just the image and first paragraph of the first 8 posts with a little "...more" link which when clicked will display the full post.
 
I would also like to add "next" and "previous" at the bottom of the page so older posts are still accessible to browse through.
 
If anyone would be able to help me with this I would be eternally grateful!
 
Thank you in advance and let me know if you need more info... As I mentioned I don't really know what I'm doing here!
 
 
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.