How to edit some information?


Home Forums Front End PM PRO How to edit some information?

This topic is: Not Resolved
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #16317
    Jacques Feuzeu
    Participant

    Hello,
    I was wondering if it’s possible to:
    1) Edit this message from “You must login to view your message.” to “You must login to view/send a message. If yes, how?
    2) Edit the message “Subject” to “Subject/Order number”. If yes, how?
    Thanks a lot.

    #16320
    Jacques Feuzeu
    Participant

    Hello,
    I was wondering if it’s possible to:
    1) Edit this message from “You must login to view your message.” to “You must login to view/send a message. If yes, how?
    2) Edit the message “Subject” to “Subject/Order number”. If yes, how?
    Thanks a lot.

    #16326
    Shamim Hasan
    Keymaster

    Add following code in your theme’s (child theme’s if any) functions.php
    1.

    add_filter( 'fep_main_shortcode_output', function( $out ) {
    	if( ! is_user_logged_in() ){
    		$out = '<div class="fep-error">' . sprintf( __( 'You must <a href="%s">login</a> to view/send a message.', 'front-end-pm' ), wp_login_url( get_permalink() ) ) . '</div>';
    	}
    	return $out;
    });
    

    2.

    add_filter( 'fep_form_fields', function( $fields ){
    	if( isset( $fields['message_title'] ) ){
    		$fields['message_title']['label'] = __( 'Subject/Order number', 'front-end-pm' );
    	}
    	return $fields;
    });
    
    #16329
    Jacques Feuzeu
    Participant

    Hi,
    I got “Fatal error” on the first line of this code:

    add_filter( 'fep_main_shortcode_output', function( $out ) {
    if( ! is_user_logged_in() ){
    $out = '<div class="fep-error">' . sprintf( __( 'You must login to view/send a message.', 'front-end-pm' ), wp_login_url( get_permalink() ) ) . '</div>';
    }
    return $out;
    });

    #16332
    Jacques Feuzeu
    Participant

    The code snippet you are trying to save produced a fatal error on line 1:

    syntax error, unexpected ‘&’
    The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.

    Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.

    #16335
    Jacques Feuzeu
    Participant

    Sorry, the code displays differently on my email. I copied here and it works.
    Thanks a lot!

    #16338
    Jacques Feuzeu
    Participant

    Can the “Subject” inside the field be edited as well to “Subject/Order Number”?
    Thanks again.

    #16341
    Shamim Hasan
    Keymaster

    Add following code in your theme’s (child theme’s if any) functions.php (instead of second part of above code)

    add_filter( 'fep_form_fields', function( $fields ){
    	if( isset( $fields['message_title'] ) ){
    		$fields['message_title']['label'] = __( 'Subject/Order number', 'front-end-pm' );
                    $fields['message_title']['placeholder'] = __( 'Subject/Order number', 'front-end-pm' );
    	}
    	return $fields;
    });
    
    #16426
    Jacques Feuzeu
    Participant

    Thank you very much.
    Is it possible to add an instead a separate field under the “Subject” field, with a name, “Order Number” and written inside the field as well?
    If this not possible, I will stay with what you proposed earlier.
    Thanks a lot.

    #16453
    Shamim Hasan
    Keymaster

    It is possible but require custom coding.
    You can contact using https://www.shamimsplugins.com/hire/ if you need that.

Viewing 10 posts - 1 through 10 (of 10 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.