• Hi everyone,

    I’m making a WordPress website for an artist. She wants to showcase each work in articles, but wanted her artwork to be separated from blog articles. Since the sidebars will be different
    Therefore, I used CPT UI to make a different post type called “oeuvre” (French for “artwork”).

    1/ This post type will be the most updated, so I don’t know if making it the secondary post type (since, I guess, “Articles” are prioritized in WordPress) was the good solution in the beginning. Maybe I should have “articles” that would be “artworks” and call an other post type “Blog articles”. This would be easier also to make it work with the load of extensions that work with only the article loop. But the main problem is that, while I could call the other page “artwork”, with taxonomies such as “technique”, it would probably, in terms of structure, look “cleaner” if I keep “Artwork” as a secondary post type. Any advice, reaction on that would be helpful.

    2/ Now what I want are different landing pages that would display the loops. One for the Article post type, displaying a sidebar customized for a blogging section (let’s call it Sidebar 1). One for the Artwork post type, displaying a sidebar customized for viewing and sorting artworks (Sidebar 2). I downloaded the extension “Custom Sidebars”, which helps me have different sidebars on different set pages. The problem is once you click on an “Artwork” post type, you have to change manually which sidebar will appear, the standard sidebar being the one used for the Article post type. In the same way, once we click on the customized taxonomy “Technique” and land on the page associated with only the “artwork” posts of the said taxonomy, there is no possibility, with this extension, to have Sidebar 2 showing instead of Sidebar 1.

    3/ Actually, the best of the best, would be to have a Sidebar 2 for the Artwork landing page and a Sidebar 2b for the posts (since the theme I’m using doesn’t have a clearly visible “return” button, I might as well want to add one in the sidebar).

    Soooo, basically I’ve read a lot that having several post types is like having two blogs on one website. I have no knowledge of php, which I realize is a major problem when willing to have a WordPress site more complex than usual (and not using Avada or such themes). Any help (articles to read, code lines etc.) would be much appreciated, thanks a lot in advance ?? .

    Also, if anyone had a similar experience in making a portfolio website with a blog section, I’d be glad to see how they made it work, both in terms of interface and structure.

    All the best
    Joe

Viewing 1 replies (of 1 total)
  • 1/ I think you did this correctly, I make extensive use of CPTs and this is how I would do it.

    2/ All you need to display the CPT posts on their own pages is to create template files for single-oeuvre.php, content-oeuvre.php, and archive-oeuvre.php – it’s easiest to start with the existing ones, copy and rename the new copies, then tweak them as you need to. Look for things that need to be modified, for example in the new single-oeuvre.php it may be calling ‘content’, get_post_format() );, and you’ll want to modify that to read ‘content’,’oeuvre’);

    3/ You don’t need a plugin, simply in the new template files where you see a call to the sidebar, create a new sidebar file with sidebar-oeuvre.php as it’s name and call that instead….so get_sidebar(); becomes get_sidebar(‘oeuvre’);

    If the sidebar file makes use of widgets, you can create new widget areas specifically for the new sidebar if the content of the widgets would be different.

    Post back if you need help setting up new widget areas for your CPT-specific sidebar(s).

Viewing 1 replies (of 1 total)
  • The topic ‘How to get separate Portfolio and Blog post types loops and affiliated sidebars?’ is closed to new replies.