All Projects → CMB2 → Cmb2 Attached Posts

CMB2 / Cmb2 Attached Posts

Licence: gpl-2.0
Custom field for CMB2 for attaching posts to a page.

Labels

Projects that are alternatives of or similar to Cmb2 Attached Posts

Subtitles
Add subtitles into your WordPress posts, pages, custom post types, and themes. No coding required. Simply activate Subtitles and you're ready to go.
Stars: ✭ 113 (-7.38%)
Mutual labels:  wordpress
Oblate
Custom theme for my personal website and blog.
Stars: ✭ 117 (-4.1%)
Mutual labels:  wordpress
Radium One Click Demo Install
Once Click Install for Wordpress
Stars: ✭ 120 (-1.64%)
Mutual labels:  wordpress
Coding Standards
Human Made coding standards for modern code
Stars: ✭ 114 (-6.56%)
Mutual labels:  wordpress
Wordup Cli
Wordup is a fully integrated development platform for WordPress. Develop plugins and themes locally. Preview in the cloud. Automatic updates in WP.
Stars: ✭ 116 (-4.92%)
Mutual labels:  wordpress
Wordpress Activitypub
ActivityPub for WordPress
Stars: ✭ 118 (-3.28%)
Mutual labels:  wordpress
Frontenberg
A limited frontend preview of the Gutenberg editor
Stars: ✭ 113 (-7.38%)
Mutual labels:  wordpress
Wp Pagenavi
Adds a more advanced paging navigation interface to your WordPress blog.
Stars: ✭ 121 (-0.82%)
Mutual labels:  wordpress
Regenerate Thumbnails
WordPress plugin for regenerating thumbnails of uploaded images. Over 1 million active users and counting.
Stars: ✭ 115 (-5.74%)
Mutual labels:  wordpress
Hyperdrive
This repository has moved to:
Stars: ✭ 120 (-1.64%)
Mutual labels:  wordpress
Piklist
The most powerful framework available for WordPress.
Stars: ✭ 114 (-6.56%)
Mutual labels:  wordpress
Wordpress Bootstrap
Bootstrap in WordPress theme form - Bootstrap 3.3.1
Stars: ✭ 1,494 (+1124.59%)
Mutual labels:  wordpress
Activity Log
Get aware of any activities that are taking place on your dashboard! Imagine it like a black-box for your WordPress site.
Stars: ✭ 119 (-2.46%)
Mutual labels:  wordpress
Acf Codifier
A wrapper class to help write more readable ACF field declarations.
Stars: ✭ 114 (-6.56%)
Mutual labels:  wordpress
Acf Tools
Advanced Custom Fields code made simple! 🙌
Stars: ✭ 121 (-0.82%)
Mutual labels:  wordpress
Laravel5 Woocommerce Api Client
Laravel 5 wrapper for the Woocommerce REST API
Stars: ✭ 113 (-7.38%)
Mutual labels:  wordpress
Wp Gfm
WordPress Plugin for PHP-Markdown and GitHub Flavored Markdown
Stars: ✭ 117 (-4.1%)
Mutual labels:  wordpress
Plugin Update Checker
A custom update checker for WordPress plugins. Useful if you don't want to host your project in the official WP repository, but would still like it to support automatic updates. Despite the name, it also works with themes.
Stars: ✭ 1,695 (+1289.34%)
Mutual labels:  wordpress
Myblog
python写的博客,支持3种数据库,现在挂在evilbinary.org
Stars: ✭ 121 (-0.82%)
Mutual labels:  wordpress
Wp Graphql Yoast Seo
This is an extension to the WPGraphQL plugin for Yoast SEO
Stars: ✭ 120 (-1.64%)
Mutual labels:  wordpress

CMB2 Attached Posts Field

Custom field for CMB2.

The post IDs are saved in an array, which can be rearranged by dragging and dropping posts in the attached posts column. Now incorporates the same search field as the CMB2 Post Search field.

Installation

Follow the example in example-field-setup.php for a demonstration. The example assumes you have both CMB2 and this extension in your mu-plugins directory. If you're using CMB2 installed as a plugin, remove lines 6-9 of the example.

Customization

The example demonstrates how to modify the get_posts query args, and allows you to toggle the thumbnails display as well as a filter search input.

Usage

You can retrieve the meta data using the following:

$attached = get_post_meta( get_the_ID(), '_attached_cmb2_attached_posts', true );

This will return an array of attached post IDs. You can loop through those post IDs like the following example:

foreach ( $attached as $attached_post ) {
	$post = get_post( $attached_post );
}

Once you have the post data for the post ID, you can proceed with the desired functionality relating to each attached post.

Screenshots

  1. Field display
    Field display`

  2. Post search
    Post search`

Changelog

1.2.7

  • Add default column display output. Simply add 'column' => true, to your field registration.

1.2.6

  • Add post type label next to post title when multiple post-types are specified in the query args.
  • Open attached-posts links in new window, so as not to leave the current editing window. Props Shelob9, #37, #36.

1.2.5

  • Combined the best bits from the CMB2 Post Search field type and this field type, so now you can search for additional posts/pages/etc to be attached. User search is not currently supported. (#7).

1.2.4

  • Add support for attaching Users instead of Posts/Custom Posts. Props mckernanin (#27).

1.2.3

  • Add loader to manage loading the most recent version of this lib.

1.2.2

1.2.1

  • Add Search Filter Boxes to Lists. Props @owenconti.

1.2.0

  • Add plugin support. Props @yelly.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].