fauzanjeg

Function Custom Template for Playlist Content || Custom Change

Jul 30th, 2021 (edited)
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.68 KB | None | 0 0
  1. /* Function Custom Template for Playlist Content */
  2. function custom_render_playlist_content_loop() {
  3.     require_once JNEWS_VIDEO_DIR . 'class/module/block/class.jnews-video-block-4-view.php';
  4.     $class_playlist = JNEWS_VIDEO\Objects\Playlist::get_instance();
  5.     $playlist_id  = get_the_ID();
  6.     $playlist_ids = $class_playlist->get_posts( $playlist_id );
  7.     $class_module = JNews_Video_Block4_View::getInstance();
  8.     $args = array(
  9.         'number_post' => 3,
  10.         'include_post' => implode( ', ', $playlist_ids ),
  11.         'pagination_mode' => 'nextprev',
  12.         'pagination_number_post' => 4,
  13.         'column_width' => 12, /* Fill it with 0, 4, 8, or 12 */
  14.     );
  15.     echo $class_module->build_module( $args, 'im here' );
  16. }
Add Comment
Please, Sign In to add comment