Is this page part of your WP site?
Hi esmi,
Thanks for the response…
No it is a separate php page.
I have however made some progress….
The loop I was using which seems to be everywhere I look when researching did not have a $posts = get_posts query.
I found an alternative loop which does and I am now populating the page (in a fashion!)
I’m now trying to work out how to format (theme) my content .
Any ideas if it would be better to customize the theme using css within the separate php page or define a customized theme with in wp?
Im not sore what the benefits would be either way.
Thanks
I’m not sure if there is a better way here. It’s really down to what suits your needs best. If you intend to just have this one page showing posts, then I’d say that using CSS on that page would be the better option. If, however, people will be able to click on a link to see the single Posts, you might want to look at developing a customised theme. It’s a bigger job but would be the best approach if you want a seamless visual look to all of your pages.
Yes that does make sense.
I have had a loo at defining a theme using
define(‘WP_USE_THEMES’, true);
at the start but it displays the theme but states it cannot find any posts
“Not Found
It looks like nothing was found at this location. Maybe try a search?”
however if you then scroll down to underneath the footer it then displays my posts..
have you seen this happen before?
Thanks again!!
Drop a copy of the file into the pastebin and post the pastebin url here. Perhaps someone will be able to spot the problem and suggest a solution.
Yes please share your code that you are using for the page. May be there’s something missing which we can correct.
Thanks guys!
Here is a link to the output
http://www.pumphouseapps.co.uk/Pumphouse_new_website/wp.php
and here is the code
<?php
define(‘WP_USE_THEMES’, true);
require(‘./blog/wp-blog-header.php’);
?>
<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/
//get_header(); ?>
<link href=”css/wordPressEmb.css” rel=”stylesheet” type=”text/css”>
<div id=”sidebar2″>
<?php get_sidebar(‘right’); ?>
</div>
<?php
$posts = get_posts(‘numberposts=10&order=DESC&orderby=post_title’);
foreach ($posts as $post) : setup_postdata( $post ); ?>
<div id=”date”>
<?php the_date(); echo “
“; ?>
</div>
<div id=”content”>
<?php the_content(); ?>
</div>
<?php
endforeach;
?>
Thanks again!