WordPress.org

Ready to get started?Download WordPress

Forums

Flip Pong V
[resolved] Getting Flipbooks to appear on main page (2 posts)

  1. kumojin13
    Member
    Posted 1 year ago #

    This is a great plugin, certainly the best flipbook generator out there. Here are a couple tweaks I've found useful and wanted to pass on.

    Using v1.3.1 of Flip Pong V

    A while back users were asking about getting flipbooks to show up on their main page that feeds posts. This can be enabled in the code by adding the following lines to /wp-content/plugins/flip-pong-v/flip-pong-V.php after the end of flippong class:

    /*********************  Add flip book to post query  ********************/
    // Show posts of 'post' and 'flip_pong' post types on home page
    function add_my_post_types_to_query( $query ) {
    	if ( is_home() && $query->is_main_query() )
    		$query->set( 'post_type', array( 'post', 'flip_pong' ) );
    	return $query;
    }
    add_action( 'pre_get_posts', 'add_my_post_types_to_query' );

    The following line can be added to the array being fed to the register_post_type function in "Create Custom Post Type" of /wp-content/plugins/flip-pong-v/flip-pong-V.php (after Line 74 of v1.3.1) It enables a feature image to be set for the flipbook in the flipbook edit page for themes supporting feature images.

    'supports' => array('title','editor','thumbnail')

    So, the "Create Custom Post Type" function now looks like this:

    //**************   Create Custom Post Type: FlipBook    *****************//
    function create_mon_post_types() {
    
    	register_post_type( 'flip_pong',
    		array(
    			'labels' => array(
    				'name' => __( 'Flipbooks' ),
    				'singular_name' => __( 'Flipbook' ),
    					'add_new' => __( 'add new' ),
    					'add_new_item' => __( 'add a FlipBook' ),
    					'edit' => __( 'edit' ),
    					'edit_item' => __( 'edit FlipBook' ),
    					'new_item' => __( 'new FlipBook;' ),
    					'view' => __( 'see' ),
    					'view_item' => __( 'see FlipBook' ),
    					'search_items' => __( 'search FlipBook' ),
    					'not_found' => __( 'no FlipBook found' ),
    							),
    			'public' => true,
    			'show_ui' => true,
    			'publicly_queryable' => true,
    			'rewrite' => array( 'slug' => 'flip_pong' ),
    			'menu_icon' => plugins_url().'/flip-pong-V/images/book.png',
    			'supports' => array('title','editor','thumbnail')
    		)
    	);
    }

    http://wordpress.org/extend/plugins/flip-pong-v/

  2. tambourdeville
    Member
    Plugin Author

    Posted 1 year ago #

    Hi!
    Thanks for appreciating the plugin, and many thanks for your ideas !
    It'll be in the next version!

    ps: try the last version, which is definitely better about pictures managing ! Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic