Portfolio Items to show up in Recent Posts?

I would like portfolio items to show up on the home page under the Recent Posts widget or maybe under a category widget.

I can get Posts to do this, but not portfolio items. Is it possible?

The forum post below links to 3 pages (up near the top of thread) which might be helpful but all the links are broken.

https://theme.co/apex/forum/t/portfolio-vs-blog-post/1131

To Matthew @mncrdavis : Not sure why the links didn’t work but here they are again (3 links below):

The first two links you posted still don’t work… I see “Oops! That page doesn’t exist or is private.” when I click them.

The third item “Features - Portfolios” does work but unfortunately does not answer my original question.

1 Like

Hi There,

The Recent Post widget can not give you the portfolio post. But the Recent Posts shortcode can.

[recent_posts type="portfolio" count="4" no_image="true" orientation="vertical"]

You can paste that on a Text widget.

those two post are linked to the old forum, you need to open this link in a new tab for you to able to see those thread.

Hope it helps,
Cheers!

Thank you. That shortcode is definitely moving things in the right direction :sweat_smile:

However the formatting seems a bit weird and doesn’t look like the shortcode examples on the page you referenced.

There is extra white space on the top of the 1st post and odd double lines between each item.

Also the images are not showing up for video portfolio items.

Hi There,

Yup, that’s weird. Please do a testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

If the issue persist, please provide us login credentials in “Secure note” so we can take a closer look.

Thanks,

Unfortunately, it doesn’t seem to be a plugin issue.

Please take a look…

Hi There,

Thank you for the credentials, after quite some time of investigating this I still don’t get why your sidebar text widget is defaulting to visual editor, resulting to wrap its content in a unnecessary <p> tag. This <p> tag is the one that causing those white line issue.

If we can prevent the Wordpress from generating those unnecessary <p> tags, we might resolve this issue. To do this, please setup a new child theme for X. Then add this on your child theme’s functions.php file

remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );

Don’t forget to activate your child theme.

Let us know how it goes,
Cheers!

Thank you for identifying the problem because I’m sure I wouldn’t have figured that out.
Since what you were describing almost sounded like a bug or new “feature”, I researched further.

This plugin was created because WP 4.8 changed the Text Widget functionality. The plugin disables the Visual Editor entirely for the Text Widget and prevents those <p> tags. Installed – and problem solved.

Again, thank you.

Hi There,

I’m glad things sorted out on your end. Yes you’re right its a bug with WordPress 4.8, I did go ahead and reported this to our Dev Team.

Thanks,

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.