• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

add privacy policy

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › add privacy policy

This topic is: not resolved

Tagged: checkbox, comment form, privacy policy

  • This topic has 4 replies, 2 voices, and was last updated 8 years, 5 months ago by Victor Font.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • February 2, 2017 at 3:29 am #200419
    famarinu
    Member

    Hi,
    how I can add the checkbox privacy policy before the button submit in the comment form?
    I jus try to add the comment box with this code:

    
    add_action( 'genesis_after_comments', 'sp_comment_policy' );
    function sp_comment_policy() {
    	if ( is_single() && !is_user_logged_in() && comments_open() ) {
    	?>
    	<div class="comment-policy-box">
    		<p class="comment-policy"><small><strong>Comment Policy:</strong>Your words are your own, so be nice and helpful if you can. Please, only use your real name and limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.</small></p>
    	</div>
    	<?php
    	}
    }
    

    but not work
    Thank you!

    http://www.famarinu.com/ricette
    February 2, 2017 at 4:27 am #200421
    famarinu
    Member

    I add this code for add the checkbox and it work.

    //***Customize The Comment Form**/
    add_filter( 'comment_form_defaults', 'crunchify_custom_comment_form' );
    function crunchify_custom_comment_form($fields) {
        $fields['comment_notes_after'] = '<input name="MMERGE4" type="checkbox" value="Si" required > 
      		<span style="font-size:10px"> autorizzo il trattamento dei miei dati personali ai sensi del D.Lgs. n. 196/2003.</span><br>
    '; 
        return $fields;
    }

    But the comment should not be added if the check box do not selected. How do I do this?
    Thank you!

    February 2, 2017 at 9:25 am #200448
    Victor Font
    Moderator

    You can do this with jQuery. Disable the save comment button until the confirmation is checked. Once checked, enable the save button.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    February 19, 2017 at 12:21 am #201482
    famarinu
    Member

    Hi,
    What is the submit button ID?
    The submit button ID is "submit"

    Thank you!

    February 19, 2017 at 7:32 am #201500
    Victor Font
    Moderator

    Yes, the ID is submit. Element IDs should be unique on a page.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble