• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Executive Theme – How to maintain current marker on portfolio items

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Executive Theme – How to maintain current marker on portfolio items

This topic is: not resolved

Tagged: portfolio

  • This topic has 4 replies, 3 voices, and was last updated 10 years, 1 month ago by MakeYourselfVisible.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • November 21, 2012 at 3:25 am #1080
    nightingale
    Member

    I have used the executive theme for this website (http://www.belltruckservices.co.uk ).

    Does anyone know how to make each portfolio post item (see Our Fleet) to maintain the current marker on the parent menu item?

    Also, is it possible to change the url from belltruckservices.co.uk/portfolio to belltruckservices/our-fleet

    January 19, 2013 at 10:23 pm #13220
    Dan
    Participant

    Hey nightingale,
    I'll have a stab at the URL change, I'm working on a site using Executive at the moment so I'll see what I can do. In the child theme functions.php, you should see this block of code:

    /** Create portfolio custom post type */
    add_action( 'init', 'executive_portfolio_post_type' );
    function executive_portfolio_post_type() {
    register_post_type( 'portfolio',
    array(
    'labels' => array(
    'name' => __( 'Portfolio', 'executive' ),
    'singular_name' => __( 'Portfolio', 'executive' ),
    ),
    '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' ),
    )
    );
    }

    If all you have to work on is the 'live' site, give yourself a fall back and duplicate the code, rather than modifying it (which might break something). Substitute 'portfolio' for 'our-fleet':

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

    You'll need to re-save your permalinks once done, but that should add a second custom post type called 'Our Fleet'. Test it by duplicating a couple of the trucks you already have. If it's all working, duplicate the remaining posts across. (You may be able to find a change-post-type plugin that can help you here if there's too many)

    I would also recommend making a note of the old URLs and redirecting them to the new ones once you're done too - no point hobbling yourself with dead urls (if you remove the old /portfolio items) or duplicate content (if you don't) in the search engine race... Look for the 'Simple 301 Redirects' plugin if you're not up for getting your hands dirty in your .htaccess file.

    Of course, if any one has a better / more efficient method, I'll defer to greater minds!

    HTH

    February 6, 2013 at 6:43 pm #18558
    MakeYourselfVisible
    Participant

    I had the same question and was able to accomplish this using Dan's advice and going through all the CSS/PHP files and changing all instances of "portfolio" to "projects" (in your case "Our_Fleet") and refreshing permalinks.

    I also removed all styling relating to the portfolio and used the styling from this article (again replacing "portfolio" with "projects":

    http://genesistweaks.com/adding-a-portfolio-custom-post-type/

    Dan, thanks for the fix!

    February 7, 2013 at 5:56 pm #18788
    Dan
    Participant

    Glad to have helped!

    February 7, 2013 at 6:12 pm #18795
    MakeYourselfVisible
    Participant

    also renamed single-portfolio.php and archive-portfolio.php and changing the image name pertaining to the portfolio. I'm not a developer expert but I suppose you could create many different portfolios by repeating the same process with different new titles, no?

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble