Minimum Pro – Portfolio

Community Forums Forums Design Tips and Tricks Minimum Pro – Portfolio

This topic is: not resolved

This topic contains 9 replies, has 2 voices, and was last updated by  yolohtzin 4 months, 4 weeks ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #74947

    yolohtzin
    Participant
    Post count: 25

    Hi – how do I change PORTFOLIO on ‘portfolio’ page – I want it to read Gallery instead – thanks!

    Heather

    http://heatherhess.ca/portfolio/
    #74950

    braddalton
    Participant
    Post count: 7467

    You’ll need to change the name of the slug in your child themes functions.php file around line 152 from portfolio to gallery:

    //* Create portfolio custom post type
    add_action( 'init', 'minimum_portfolio_post_type' );
    function minimum_portfolio_post_type() {
    
    	register_post_type( 'portfolio',
    		array(
    			'labels' => array(
    				'name'          => __( 'Gallery', 'minimum' ),
    				'singular_name' => __( 'Gallery', 'minimum' ),
    			),
    			'exclude_from_search' => true,
    			'has_archive'         => true,
    			'hierarchical'        => true,
    			'menu_icon'           => get_stylesheet_directory_uri() . '/images/icons/portfolio.png',
    			'public'              => true,
    			'rewrite'             => array( 'slug' => 'gallery' ),
    			'supports'            => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes', 'genesis-seo' ),
    		)
    	);
    	
    }
    

    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #74953

    yolohtzin
    Participant
    Post count: 25

    It didn’t work – Parse error: syntax error, unexpected T_STRING in /home4/flowers/public_html/heatherhess.ca/wp-content/themes/minimum-pro/functions.php on line 83

    In this coding I changed Portfolio to read Photography (I changed it back to Portfolio but now I have to figure out how to fix this):

    //* Create portfolio custom post type
    add_action( ‘init’, ‘minimum_portfolio_post_type’ );
    function minimum_portfolio_post_type() {

    register_post_type( ‘portfolio’,
    array(
    ‘labels’ => array(
    ‘name’ => __( ‘Portfolio, ‘minimum’ ),
    ‘singular_name’ => __( ‘Portfolio’, ‘minimum’ ),
    ),
    ‘exclude_from_search’ => true,
    ‘has_archive’ => true,
    ‘hierarchical’ => true,
    ‘menu_icon’ => get_stylesheet_directory_uri() . ‘/images/icons/portfolio.png’,
    ‘public’ => true,
    ‘rewrite’ => array( ‘slug’ => ‘portfolio’ ),
    ‘supports’ => array( ‘title’, ‘editor’, ‘author’, ‘thumbnail’, ‘excerpt’, ‘trackbacks’, ‘custom-fields’, ‘comments’, ‘revisions’, ‘page-attributes’, ‘genesis-seo’ ),
    )
    );

    }

    Heather

    #74955

    braddalton
    Participant
    Post count: 7467

    Tested locally and works.

    The line number the code on isn’t on line 152.


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #74956

    yolohtzin
    Participant
    Post count: 25

    Why am I getting that error message? Heather

    #74957

    braddalton
    Participant
    Post count: 7467

    Please send me your login details for FTP or cPanel and i’ll fix it. http://wpsites.net/contact/


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #74960

    yolohtzin
    Participant
    Post count: 25

    Where do i email it to please

    Heather

    #74961

    yolohtzin
    Participant
    Post count: 25

    Silly question – I just emailed you – Heather

    #75029

    braddalton
    Participant
    Post count: 7467

    Fixed Heather.


    WordPress Developer & Consultant
    Brad Dalton400+ StudioPress Tutorials & 1200+ Code snippets

    #75031

    yolohtzin
    Participant
    Post count: 25

    Thanks – Please let me know what did I do wrong please so I can learn how to do these changes myself – thanks so much Brad – you made my day – Heather

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.