Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Blog Module /

Discuss the Blog Module.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Displaying selected content


Go to End


1316 Views

Avatar
shluckey

Community Member, 19 Posts

27 September 2012 at 8:28am

Could someone direct me on how onto alter the following code so that it ignores latest posts with a particular tag. I want all posts marked with 'current' to not be displayed in the post stream I have on another page.

php-----

function LatestBlogPosts($num=3) {
$news = DataObject::get_one("BlogHolder");
return ($news) ? DataObject::get("BlogEntry", "ParentID = $news->ID", "Date DESC", "", $num) : false;
}

thanks