GP Portfolio Child Theme + CPT

Home Forums Support GP Portfolio Child Theme + CPT

Home Forums Support GP Portfolio Child Theme + CPT

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #160356
    Roberto Enrique

    I’m trying my best to integrate simple portfolio functionality to GeneratePress.

    I would really like to add all the functionality into a plug-in instead of plugin + child theme but I’m not very skilled neither I have the time required to dig deeper so here I am, explaining and sharing the results of what I’m doing right now.

    The demo website can be found here:


    I was thinking to create everything from the ground using some tutorials that you can easily find by yourself but while searching information regarding creating CPT’s plug-ins I stumbled upon this plug-in which does exactly what we need. I’m using it as an starting point:

    for better understanding what’s in there you can read here: and the home page of the plug-in over here:

    Right now I’ve created a Child theme to do the stuff I’m talking about here. Be warned! It is rough, but it works.

    You can download the child theme here:

    Now, let me explain you what it does, basically:

    – The aforementioned plug-in registers a Custom Post Type called “Portfolio” and as soon as you activate it you’ll be able to add portfolio items with categories and taxonomies. Nice
    – archive-portfolio.php displays the portfolio items in tree columns using also content-portfolio.php
    – I could create a single-portfolio.php but you can fine grain how your single portfolio entries show up just using the add-on’s we already know in the single portfolio items. Easy
    – In the functions.php I’ve placed some code in order to create a shortcode for querying those portfolio items so you can just add [list-portfolio-items] and magically you’ll have a tree column layout showing your portfolio items’ featured image.

    That’s it

    Lead Developer
    Lead Developer

    Hi Roberto,

    Very cool! Thanks for sharing!

    Is the only purpose of plugin to register the post type? If so, why not just add it to functions.php?

    Thanks again for posting, going to sticky this πŸ™‚

    Roberto Enrique

    I prefer not to add content-creating features on theme realm. This way, if you want to change your theme in the future you will always have your post type over there.

    Lead Developer
    Lead Developer
    Roberto Enrique

    If you use this child theme in a single standard WordPress installation it works just as you expect it should, but there are some small issues in multisite, regarding “portfolio” archive page that I’m trying to solve right now, may be with a little help from you πŸ˜‰

    First, let me explain my configuration.

    * I’m running a multisite network on a shared host and everything is running smoothly, the main network site is
    * Some sites are using WPMUDEV’s Domain Mapping plugin (so websites like appears as
    * In that shared host I have some other websites that are not connected to the main network (they’re just add-on domains pointing to sub-folders, some of them are just sub-domains always pointing to a sub-folder)
    * There is an “isolated” installation of wordpress (a stand-alone vanilla installation of wordpress, not a sub-site of the multisite) that I use just to show a child theme I put together to allow a simple integration of wp-theming’s “Portfolio Post Type Plugin” ( The url of that site is and it works as expected BUT…

    I realized that, while the plugin is actually working for the sites on the main multisite, as you can see here: if you go to the “archive” of that website, which should just work when you add the “portfolio” slug at the end of the url (wether you use this path or you land in but the url is right :-S

    If I “delete” the “isolated” website that contains the portfolio child theme ( then in you can see what is intended to, the portfolio archive page, but it does not work (the archive page with the portfolio slug) in other sites of the network. (let’s say while does not)

    To say it short: My problem is with Archives for portfolio post type, they behave very weirdly when they work. Is there a way to just display the portfolio archive page of the sub-site and not the homepage?

    Thanks in advance, and have an awesome weekend you all!

    Roberto Enrique


    While looking for the solution of the aforementioned issue I took the time to make a little cleanup and added a subtle hover effect to the shortcode that lists the posts.

    You can always see the results here:


    Roberto Enrique

    Ok, problem solved. It was all my fault.
    The problem was that inside my own CPanel configuration of subdomains and subfolders πŸ™‚

    If you’re curious about it look at this thread:

    Lead Developer
    Lead Developer

    Interesting – thanks for posting the solution! πŸ™‚

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.