plugin-icon

WP Over Network

제작자: yuka2py·
Add ability to get posts from over your network sites. Supports widget, shortcode, and customizable original function.
등급
5/5
버전
0.4.4
활성화된 설치 항목
90
최근 업데이트일
Jul 28, 2013
WP Over Network

Add ability to get posts from over your network sites. Supports widget, shortcode, and customizable original function.

Use the following:

In template

<?php get_header(); the_post(); ?> <section id="content-primary"> <header id="page-header"> <h1><?php the_title() ?></h1> </header> <?php // Getting recent posts the page and post, minus the host blog. // Specify the "affect_wp_query = true", for using the wp_pagenavi. $posts = wponw::get_posts('exclude_blog_ids=1&post_type=post,page&affect_wp_query=true'); wp_pagenavi(); ?> <?php if ( ! empty ( $posts ) ) : ?> <section class="post-list"> <?php foreach ( $posts as $post ) : wponw::setup_blog_and_postdata( $post ); ?> <section id="post-<?php the_ID() ?>" <?php post_class() ?>> <h2>【<?php echo $post->blog_name ?>】</h2> <h1><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h1> <?php echo get_the_excerpt() ?> </section> <?php wponw::restore_blog_and_postdata(); endforeach; ?> </section> <?php else : ?> <p>Sorry, there is no post.</p> <?php endif; # End of empty( $posts ) ?> </section> <?php wp_reset_query(); get_sidebar(); get_footer();

Using as Shortcode

Display with default.

[wponw_recent_post_list]

Arguments, can be used the same as wponw::render_post_archive_to_string.

Use your template file, includes 3 post types

[wponw_recent_post_list numberposts=8 post_type=products,promotions,information template=TemplateFileNameInYourTheme]

NOTICE: DON’T include the file extension in TemplateFileNameInYourTheme.

If you want to use your own rendering function.

[wponw_recent_post_list numberposts=5 post_type=products renderer=YourRenderFunction]

To create an archive page with a page.

You create the new page, and write the below shortcode in the post content.

[wponw_recent_post_list post_type=post exclude_blog_ids=1 affect_wp_query=true]

Contact

@yuka2py on twitter

무료Business 요금제에서
설치하면 WordPress.com 서비스 약관서드파티 플러그인 약관에 동의하게 됩니다.
테스트된 버전
WordPress 3.5.2
이 플러그인은 다운로드할 수 있으며 에서 사용할 수 있습니다.