Archived topic
Portfolio page problems
7 replies · Started by Hazel on January 16, 2017
Hi There
I have converted from a theme-specific portfolio (Virtue) to GP and the Portfolio Plus and WP Show Posts widgets as advised some time ago in this forum. The only problem is that the address https://www.allanjackson.net/staging1/portfolio/ now every portfolio post in its entirety. Is there anyway of stopping it doing that and making it accept a WP Show Posts shortcode. This page https://www.allanjackson.net/staging1/my-portfolio/ is correct and I suppose I could just delete the portfolio page
Thank you
Allan
P.S. Is there and way of reducing the spacing between the rows in WP Show Posts grid?
Hi there,
When creating your custom post type, set the has_archive param to false: http://wordpress.stackexchange.com/questions/117368/how-to-remove-custom-post-type-archive
The spacing between rows is determined using your gutter width option.
You can overwrite it like this:
.wp-show-posts-inner {
margin-bottom: 2em !important;
}
Thanks Tom. Sorry, this is dumb but I have read that article you directed me to but it isn't clear if one has to edit the theme file or whether there is another way that won't be overwritten by theme updates.
Cheers
Allan
Hi Allan,
The custom post type function is php.
https://docs.generatepress.com/article/adding-php/
The code for spacing between rows is CSS:
https://docs.generatepress.com/article/adding-css/
Hope this helps!
Hi Leo
Thanks. I know how to add php but what I can't find at the url Tom first gave (or anywhere else for that matter) the actual syntax for setting the portfolio post type to has_archive = false. I also can't find where, in my Wordpress installation, where that has been set to true.
Sorry I'm so dumb butvI'm learning.
Allan
Did you create the "portfolio" custom post type you're working with or did something else create it?
Hi Tom
As I said, the post type was enabled by Portfolio Plus plugin which doesn't seem to have any settings and they are being displayed by your WP Show Posts plugin.
Thanks vert much
Allan
Ah in that case you'll need to contact the developer and ask if it's possible to tweak that option.