• Hi people
    I want to know with which plugins I can allow my visitors to leave their quotes on my website on a specific page?
    In other words, how do I let the faithful in a church leave their prayers in public on a specific page on my site?

    • This topic was modified 3 years, 7 months ago by Jan Dembowski.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The simplest way would be to create a post and enable comments. The they could leave their prayers as comments.

    Thread Starter lander90

    (@lander90)

    Very good idea @alanfuller , I had thought the same thing, but I don’t know how to get the LEAVE A COMMENT tag in the header of the comment box.

    I wanted to put instead of ” leave comment ” → ” leave your prayers ”

    But I don’t know how to do this in a specific post

    Good point, I will look at that, with WordPress there normally is always a way…

    OK you can filter comment default text like this

    it will get you very close

    add_filter( 'comment_form_defaults', function ( $defaults ) {
    	if ( is_single( 129243 ) ) {
    		$my_defaults = array(
    			'comment_field'     => sprintf(
    				'<p class="comment-form-comment">%s %s</p>',
    				sprintf(
    					'<label for="comment">%s</label>',
    					'Prayer'
    				),
    				'<textarea id="comment" name="comment" cols="45" rows="8" maxlength="65525" required="required"></textarea>'
    			),
    			'title_reply'       => 'Say a little prayer',
    			'title_reply_to'    => 'Give your blessings to  %s',
    			'cancel_reply_link' => __( 'Cancel' ),
    			'label_submit'      => __( 'Submit your Prayer' ),
    		);
    		$defaults    = array_merge( $defaults, $my_defaults );
    	}
    
    	return $defaults;
    } );

    You will need to change the number here to the specific POST ID that you want to change

    if ( is_single( 129243 ) ) {

    Thread Starter lander90

    (@lander90)

    Waowww, great

    Should I put this code in EDIT THEME in appearance section? or in the PHP folder?

    I am using the free ASTRA theme 3.6.7, but i am usigng a third plugins to edit ”Functions (PHP code)”

    If you have a PHP snippets plugin use that.

    Or you can create a mini plugin easily by wrapping PHP. Here are some details https://fullworks.net/docs/plugins-general/developer-general/adding-php-code/

    Thread Starter lander90

    (@lander90)

    Hello, I add the code that you have given me thanks to the Code Snippets plugin, I put the id of the page but it did not work. I don’t kno how to create a mini plugins

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Allow visitors to leave their own quotes on a specific page of my website’ is closed to new replies.