Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Comments field in License CPT #129

Open
crweiner opened this issue Sep 11, 2024 · 6 comments
Open

New Comments field in License CPT #129

crweiner opened this issue Sep 11, 2024 · 6 comments

Comments

@crweiner
Copy link

Description

Ariel Jolo requested that we create a new comments field within the License CPT. They have created a concept of this on the staging site, but need the comments field to be properly added to the License CPT on production.

They shared that on staging, they added the following in template-parts/content-licenses.php, and would like these styles added to a class instead of being inline:

<div class="entry-content post--content license-content">
  <div>
    <?php the_content(); ?>

    <hr />
    <div style="padding: 2rem; background: #f0E68C">
    <?php 
      if ( osi_field_check( 'comments' ) ) :
        echo wp_kses_post( '<h2 class="wp-block-heading" id="license-comments" style="margin-top:0">' . __( 'Comments', 'osi' ) . '</h2>' );
        osi_the_valid_field( 'comments' );
      endif;
    ?>
    </div>
</div>

Additional context

See ZD link on the internal dev request.

@nickpagz
Copy link
Collaborator

@ajolo2ky Is this meant to only be comments added via the editor via that field? Or did you need more functionality out of it?

I've implemented this via the repo on staging, and tweaked the styling so there's no background color when the field is empty.

Let me know if this is what you're looking for or you need more.

@eoinsav
Copy link

eoinsav commented Oct 9, 2024

From @ajolo2ky through email:

Hi, thanks for the follow up. I tested it and it looks good, please promote it to production when you can.

@eoinsav
Copy link

eoinsav commented Oct 15, 2024

Hey @nickpagz! Just want to make sure this didn't get lost during your AFK. We're ready to push your solution live. Thanks!

@nickpagz
Copy link
Collaborator

Thanks for the nudge @eoinsav
I've now merged this to production, and also added the "Comments" field in ACF(/SCF?) so it appears in the single license edit pages.

@eoinsav
Copy link

eoinsav commented Oct 16, 2024

Nice, thank you!

@eoinsav
Copy link

eoinsav commented Oct 23, 2024

Hey @ajolo2ky! This is now live if you would like to close out this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants