Automattic / Automattic/jetpack

Portfolio shortcode: display extra CSS classes based on enabled sections

Open
#15,871 0 comments 0 reactions 0 assignees View on GitHub
[Feature] Custom Content Types [Pri] Low Enhancement Good For Community
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

It would be great if the shortcode could display special CSS classes based on the enabled sections.

If we check a documentation page for the shortcode (https://wordpress.com/support/portfolios/portfolio-shortcode/), we can see that it provides options to display the following sections:
- Content;
- Types;
- Tags;
- Author;

For example, if the content is enabled then the container can have `.has-content` class.

Having these classes will allow to create different layouts based on enabled sections.

Contributor guide

Open the contributing guide

Research direction

Start with the portfolio shortcode implementation and compare its section options with the linked portfolio shortcode documentation. Add a distinct CSS class for each enabled Content, Types, Tags, and Author section, then verify that the container classes change correctly when those options are enabled or disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.