WordPress.org

Ready to get started?Download WordPress

Forums

Pilot Fish
[resolved] Adding PilotFish's portfolio to another theme? (4 posts)

  1. artisana
    Member
    Posted 1 year ago #

    Would it be possible to copy some amount of code (functions.php?) from the Pilot Fish theme and transcribe it to another theme, while maintaining the full functionality and aesthetic of it?

    I have a website where I use the PF theme, and now I want to add the beautiful portfolio layout/project interface to another website I'm developing using the Twenty Eleven theme.

    I've searched the "portfolio" plugins but I'm not satisfied--none are quite as awesome as PilotFish's!!

  2. Daniel Zhao
    Member
    Theme Author

    Posted 1 year ago #

    You need to add a custom post to the theme, a lot of code though. I think (I'm not around my laptop right now) the add custom post code is in scripts.php and then you can just copy single-project.php and archive-project.php to the theme you are using :)

  3. artisana
    Member
    Posted 1 year ago #

    Thank you Danni!

    I created a scripts.php file for my twentyeleven-child theme and copied the custom post code (see below). I've also copied the single-project.php and the archive-project.php to the child theme folder. I do not see the "Project" post option in my WP interface on the twentyeleven themed site.
    Can you offer any more guidance at this point?

    thank you again for your time and expertise!

    <?php
    /**
     * Register a Custom Post Type
     *
     * Label: Project (for portfolio items)
     */
    
    add_action( 'init', 'create_post_type' );
    
    if (!function_exists('create_post_type')):
    
    	function create_post_type() {
    			register_post_type( 'project',
    					array(
    							'labels' => array(
    									'name' => __( 'Projects','pilotfish' ),
    									'singular_name' => __( 'Project','pilotfish' )
    							),
    					'public' => true,
    					'has_archive' => true,
    					'show_in_menu' => true,
    					'query_var' => true,
    					'rewrite' => true,
    					'capability_type' => 'post',
    					'has_archive' => true,
    					'hierarchical' => false,
    					'menu_position' => '5',
    					'supports' => array('title',
    					    'editor',
    					    'author',
    					    'thumbnail',
    					    'excerpt',
    					    'comments'
    						)
    					)
    			);
    	}
    
    endif;
    register_taxonomy("Skills", array("project"), array("hierarchical" => true, "label" => "Skills", "singular_label" => "Skill", "rewrite" => true));
  4. Daniel Zhao
    Member
    Theme Author

    Posted 1 year ago #

    I've never created a child theme with custom post type before, maybe you need to change the pilotfish in __( 'Projects','pilotfish' ), to something else?

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic