Site logo

Archived topic

Displaying CPT + ACF Portfolio

19 replies · Started by Ian on September 30, 2021

Viewing posts 16–20 of 20

#1 - thats correct. We will be supporting the plugin for security issues and will maintain user support forums. But in the fullness of time, early next year we expect to release a GB version which will be so much more better :)

#2 - RE: the missing Custom Fields, thats a WP core option the Theme doesn't interfere with those. So what happens when you enable the Custom Fields panel in the Editor Settings ? Does it stay enabled and just no CF Meta box appears ? ( By default it should appear below the editor, but can sometimes appear in the sidebar ).

Update #2 - thats correct. If the CPT has archives then yes you could build them using a Block Element Content template, but that would only apply to archive pages - you wouldn't be able to output them on a static page.

Hi David,

Core customs fields was disabled when activating ACF. No way around it looks like.

As for only displaying Block Element Content template on an archive page, do you think we can use your previous tip to hook this into a page somehow? I am referring to this which I am also using to display Block Elements in various places on the site: https://generatepress.com/forums/topic/hook/#post-1038253

I suppose that makes sense regarding ACF disabling core custom fields.

Hmmm... it is possible but would require custom development.
You can get the foundations of the method from this GIST, which i build for a client wanting to display latest/related posts and maintain the same style they were using on their archives:

https://gist.github.com/diggeddy/b71bf07aa55eecb0c34191f9fe05d224

You can see in the do_action is the hook name that you would hook your Content Template into.
The HTML around it just provides the basics for you to throw some CSS at to create your grid.

As usual, thanks very much David for your insight and help. I think this is getting more complicated than it needs to be. I have rebuilt the Portfolio section using CPT and just used WP Showposts to display a grid. Let's see what happens when GB merges with Showposts. I am sure the new system can be set up to take advantage of using Elements to create a "team" / "portfolio" type setup. This would be pretty powerful and replace many plugins out there if so.

Lots of good things to come :)
Glad to be of some help

This archived topic is closed to new replies.