Plugin yìí kò tíì ṣe àyẹ̀wò pẹ̀lú àwọn ìtújáde mẹ́ta pàtàkì tó kẹ́yìn ti WordPress. Ó lè jẹ́ pé a kò tọ́jú tàbí ṣe àtìlẹ́yìn fún un mọ́, ó sì lè ní àwọn ọ̀ràn ìbámu nígbà tí a bá lò ó pẹ̀lú àwọn ẹ̀yà WordPress tuntun.

P2P Slides

Àpèjúwe

Note: This plugin requires Posts 2 Posts

Allows you to associate a custom post type (“slides”) with any of your other post
types (defaults to “pages”). This is useful for theme developers of those that
want to add custom sliders around your theme.

This plugin does not provide you out of the box front end functionality. If you’re
looking for a drop in and play slider, this isn’t it.

Àwọn àwòrán ìbòjú

  • The meta box.

Ìgbéwọlẹ̀

First, install and active Posts 2 Posts.

Then, use the WordPress installer to install this plugin or …

  1. Click the big orrange button to download the plugin
  2. Unzip the plugin files
  3. Upload the p2p-slides folder to your /wp-content/plugins/ directory
  4. Activate the plugin in the admin area

After installing, you should see a new meta box on your edit screen for pages.

If you wish to modify what post types get associated with slides, simply hook
into after_setup_theme and add theme support for p2p-slides.

<?php
add_action('after_setup_theme', 'my_special_setup');
function my_special_setup()
{
    // this is the same as just having the plugin installed
    add_theme_support('p2p-slides');

    add_theme_support('p2p-slides', array('a-post-type', 'another-post-type'));
}

To use the slides, you’ll need to check the slides property of each $post.

<?php
// start the loop as normal
while(have_posts()): the_post();
?>

    <?php if($post->slides): ?>
        We have slides! Loop through them.
        <?php foreach($post->slides as $slide): ?>
            Do stuff with $slide here, it's just a post object
        <?php endforeach; ?>
    <?php endif; ?>

<?php endwhile; ?>

You can find a more complete example, in the form of a page template for twentyeleven in the P2P Slides’ inc directory.

FAQ

Why no front end prettiness?

Because that’s a theme’s job. This plugin is only meant to provide you with
tools to extend your theme or child theme.

Is this Posts 2 Posts legit?

Yes. Posts 2 Posts
is amazing.

Àwọn àgbéyẹ̀wò

Kò sí àwọn àgbéyẹ̀wò fún plugin yìí.

Àwọn Olùkópa & Olùgbéejáde

“P2P Slides” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa sí plugin yìí.

Àwọn Olùkópa

Túmọ̀ “P2P Slides” sí èdè rẹ.

Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

Ṣàwárí koodu, ṣàyẹ̀wò ibi ìpamọ́ SVN, tàbí ṣe àgbékalẹ̀ sí àkọsílẹ̀ ìdàgbàsókè nípasẹ̀ RSS.

Àkọsílẹ̀ àwọn àyípadà

1.0

  • Initial version.