barnabyr
Forum Replies Created
-
Forum: Plugins
In reply to: [WP FullPage] Fullpage that automatically brings in all blog postsRight worked it out & thought I’d post in case anyone else wonders how to do it.
I gave all the posts I wanted to include a category of ‘News’
In the ‘News’ full page, from Sections Content’, I selected:
Sections Type – Post Taxonomies
Order By – Date
Order – DESC
Taxonomy – Categories
Term of the Taxonomy – News
Then clicked update.
Et voila!Forum: Plugins
In reply to: [WP FullPage] Fullpage that automatically brings in all blog postsAh! Worked out how to do the last bit, adding a link to the latest page!
I added:
<?php query_posts(‘showposts=1’); ?>
<?php while (have_posts()) : the_post(); ?>
<div id=”news”>
<h2>News</h2>
<?php the_title(); ?>
</div>
<?php endwhile;?>
to wp-fullpage/templates/fullpage.php.So please can you tell me how to get a list of all blog posts that automatically updates into a full page called ‘News’?
Forum: Fixing WordPress
In reply to: Put the loop into a page that already uses requireI have also tried this in the home.php file:
<?phprequire ‘common10.php’;
final class rgIndexPage extends rgPage
{
public function GetPageContent()
{
$returnValue = HEADER1.’DFXI | Home’.HEADER2.SCRIPT1.SCRIPTTRACK.CONTAINERTOP.NAVIGATION;
$returnValue .= MAINTOP.RIGHT;
$content = ‘
<h1>View from the Pavilion</h1>’;require “blog/wp-blog-header.php”;
if (have_posts()) : while (have_posts()) : the_post();
the_date(“”,”<h2>”,”</h2>”);
$content = ‘
<div class=”post” id=”post-‘;
the_ID();
$content = ‘
“>
<h2 class=”storytitle”>~ ‘;
the_title();
$content = ‘
~</h2>
<div class=”storycontent”>’;
the_content(__(“(more…)”));
$content = ‘
</div>
<div class=”meta”>
Posted by: ‘;
the_author();
$content = ‘
@ ‘;
the_time();
edit_post_link(__(“Edit This”));
$content = ‘
</div>
</div>’;
endwhile; else:
$content = ‘
<p>’;
_e(“Sorry, no posts matched your criteria.”);
$content = ‘
</p>’;
endif;
$returnValue .= $content;
$returnValue .= MAINBOTTOM.FOOTER.CONTAINERBOTTOM;
return $returnValue;
}
}$page = new rgIndexPage;
echo $page->GetPageContent();
?>but after uploading, it returns the error:
‘Fatal error: Call to a member function main() on a non-object in /home/dfxico/public_html/blog/wp-includes/functions.php on line 1570.’I have had a look at it but to be honest I can’t imagine it is a mistake in this file as it works when I refer to it from a page that doesn’t include the common file, as you can see here:
https://www.dfxi.co.uk/index.phpI seem to be going round in circles!
Forum: Fixing WordPress
In reply to: List with excerpt on latest post onlyscrap that I found this, just in case anybody else needs it:
[Code moderated as per the Forum Rules. Please use the pastebin]