$Post and total postcount

Post Reply
auauteru
Jr. Bludit
Posts: 3
Joined: Thu Jun 23, 2016 10:45 pm

How do I get the total posts as a integer on my website? Thanks!

Also, what other possibilities exists when u use: $Post->

permalink()
description()
title()
content()

I haven't found a list of it. Thx
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

auauteru wrote:How do I get the total posts as a integer on my website?
There is a discussion about this with a solution at

Post count (and a few more)
Also, what other possibilities exists when u use: $Post->

permalink()
description()
title()
content()
There are also

user()
date()
coverImage()
tags()

and beside this

status()
allowComments()
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
auauteru
Jr. Bludit
Posts: 3
Joined: Thu Jun 23, 2016 10:45 pm

Edi wrote:
auauteru wrote:How do I get the total posts as a integer on my website?
There is a discussion about this with a solution at

Post count (and a few more)
Also, what other possibilities exists when u use: $Post->

permalink()
description()
title()
content()
There are also

user()
date()
coverImage()
tags()

and beside this

status()
allowComments()
Thanks! One more thing, how do I make visible some posts (for example, only show posts from number 5th to number 10th)
User avatar
diego
Site Admin
Posts: 773
Joined: Sat May 16, 2015 2:53 pm
Been thanked: 1 time
Contact:

Hi, try with this function

Code: Select all

$posts = buildPostsForPage($pageNumber=1, $amount=5, $removeUnpublished=true, $tagKey=false);

foreach( $posts as $Post) {
	echo $Post->title();
}
auauteru
Jr. Bludit
Posts: 3
Joined: Thu Jun 23, 2016 10:45 pm

diego wrote:Hi, try with this function

Code: Select all

$posts = buildPostsForPage($pageNumber=1, $amount=5, $removeUnpublished=true, $tagKey=false);

foreach( $posts as $Post) {
	echo $Post->title();
}
Oh thanks! It worked^^
Post Reply