WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] single-post_type.php page not loading on Live Site (2 posts)

  1. azadcreative
    Member
    Posted 3 years ago #

    Hi there,

    I have a custom post_type called "Portfolio"

    Here's my code in functions.php

    function post_type_portfolio() {
    	register_post_type(
        'portfolio',
        array('label' => __('Portfolio'),
                 'public' => true,
                 'show_ui' => true,
                 'capability_type' => 'post',
                 'hierarchical' =>  true,
                 'rewrite' => true,
                 'query_var' =>  true,
                 'supports' => array(
                 			'title',
                 			'editor',
                            'post-thumbnails',
                            'excerpts',
                            'custom-fields',
                            'revisions')
                    )
        );
    
        register_taxonomy( 'Skills', 'portfolio',
    		array(
                 'hierarchical' => false,
    			 'label' => __('Skills'),
    			 'query_var' => 'skills',
    			 'rewrite' => array('slug' => 'skills' )
    		)
    	);
    
    	register_taxonomy( 'Media', 'portfolio',
    		array(
                 'hierarchical' => false,
    			 'label' => __('Media'),
    			 'query_var' => 'media',
    			 'rewrite' => array('slug' => 'media' )
    		)
    	);
    
    };
    
    add_action('init', 'post_type_portfolio');

    I have added a couple of Portfolio items.

    Here is the live demo: http://azadcreative.com/portfolio/

    There are 2 template files: portfolio.php and single-portfolio.php

    This works on my test server (localhost) but in the live site, the item pages are broken..

    Any ideas? Thanks in advance.

    Mind you, everything works in localhost.

    Screenshot of localhost (notice the address bar):
    http://azadcreative.com/files/localhost-screenshot.png

  2. flashpunk
    Member
    Posted 3 years ago #

    Hi there,

    I think i'm experiencing the same issue, could you describe what you did to make the fix?

Topic Closed

This topic has been closed to new replies.

About this Topic