I'm struggling with the Archives as I need to add additional full width containers and even other Views. The WordPress Archive loop for each respective CPT is fine, but it doesn't seem to be possible to add containers outside of that loop. Is there a workaround for that? I've tried custom CSS for the containers with position: absolute, but that really messes up the layout.
I'm creating pages with Views as a workaround, however, I can't use the slug for the CPT and I end up having different URLs, which is not ideal. I would prefer to have website.com/cpt-slug/title (Single) and website.com/cpt-slug (Archive), instead of website.com/page-slug.
but it doesn't seem to be possible to add containers outside of that loop. Is there a workaround for that?
Yes this is possible to do as there is an add button below the loop to add any block that you want. See Screenshot
I'm creating pages with Views as a workaround, however, I can't use the slug for the CPT and I end up having different URLs, which is not ideal. I would prefer to have website.com/cpt-slug/title (Single) and website.com/cpt-slug (Archive), instead of website.com/page-slug.
Hi. I realized adding containers outside of the loop is possible, but they are still part of the Archive in the hierarchy and even when specified as full width, they are contained. When using a layout without sidebars, the workaround to make that container full width is the following:
As for the second point, let's say all my WP Posts are displayed at website.com/blog. I can use Toolset to edit the Archive, but it's limited to a single View/Loop, which has limited options, like a lack of offsetting posts (I've resorted to hiding with ':first-child' CSS property). In my case, I need to show the latest post at the very top in a Hero area, followed by a list of the rest of the posts with pagination. I haven't been able to handle this in an archive, as to my knowledge I can't have a separate view for the Hero area. I can, however, create a page and insert the views, with proper styling and offsetting. The issue is that the page can't have the needed website.com/blog URL, as that is reserved for the Archive.
I also tried the approach for a CPT (let's say slug 'press-releases') and disabled Archives for the CPT. Then I was in fact able to create a page and use the website.com/press-releases URL, which normally would have been reserved for the Archive. But then when I tried to edit the properties for the Press Releases CPT I was unable to make any changes, since the 'press-releases' slug was already taken by the page I created. So obviously this wasn't a great idea in the first place.
I guess my question is: am I getting any of this wrong or is it the expected behavior? I'm not expecting Toolset to handle every possible user case, but I thought that my particular need was fairly straightforward.
But then when I tried to edit the properties for the Press Releases CPT I was unable to make any changes, since the 'press-releases' slug was already taken by the page I created. So obviously this wasn't a great idea in the first place.
Are you trying to edit the post on the frontend or on the backend ? The disabling of the archive would've been the best solution which you have already done.
The only other solution is to change the slug and using the redirection plugin you can redirect from the original slug to the page with the view.
Please provide some clarity on the editing issue and perhaps a screenshot so that i can better understand this.
Thanks for clarifying, Shane. It sounds like I'm not doing anything wrong.
I wasn't trying to edit a particular post. I was editing the CPT in the back end, where the slug is defined.
In most cases the Archive loop is sufficient to display a list of CPTs. In case I need something fancier I'll disable Archive and redirect the CPT slug to the page.
In case anyone is interested in a solution for the Blog (which I really wanted to preserve as /blog), I used GeneratePress Page Hero element with dynamic content, which pulled the current Post and in the case of Archive page, that post was exactly what I needed - the most recent post. The only caveat was the Title being pulled was of the Archive and not the post. Below is the shortcode I ended up using. Also, the offset the 1st post from the list, I used CSS display:none for first-child in the list. Picture attached.