博客循环

博客循环

Codex Home → Developer Resources → Loops Reference → Blogs Loop
Blogs Loop

NOTE: This will only work with an installation of BuddyPress and WordPress MU or WordPress with multisite enabled.
The site blogs loop can be used to output a list of blogs that have been created on your installation.
Standard Loop

  • <a href="">
    <a href="">

    <a href="" class="visit" title="">

Accepted Parameters
The bp_has_blogs() function will accept a number of parameters that will manipulate the data being returned.

type optional
Defines the type of blogs to return.

Accepted arguments: active, newest, random
Default value: active

per_page optional
The number of blogs to display on a page before they are paginated to the next page.

Default value: 10

page optional
The page to return.

Default value: 1

max optional
The total number of blogs to return.

Default value: false (no limit)

user_id optional
Return only blogs that this user has higher than subscriber access to.

Default value: false

search_terms optional
Return only blogs that match these search terms.

Default value: false

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注