here is the code I found :
[ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<?php if ( ! empty( $name ) ) : ?>
<strong><?php echo __( 'Name', 'realia' ); ?>: </strong> <?php echo esc_attr( $name ); ?>
<?php endif; ?>
<?php if ( ! empty( $email ) ) : ?>
<strong><?php echo __( 'E-mail', 'realia' ); ?>: </strong> <?php echo esc_attr( $email ); ?>
<?php endif; ?>
<?php $permalink = get_permalink( $post->ID ); ?>
<?php if ( ! empty( $permalink ) ) : ?>
<strong><?php echo __( 'URL', 'realia' ); ?>: </strong> <?php echo esc_attr( $permalink ); ?>
<?php endif; ?>
<?php if ( ! empty( $_POST['message'] ) ) : ?>
<?php echo esc_html( $_POST['message'] ); ?>
<?php endif; ?>
Thank you 🙂
Best regard
I have a question if I want to add more fields, it is that I need to add phone, city and country and it is working as you would?
<?php if ( ! empty( $name ) ) : ?>
<?php echo __( ‘Name’, ‘realia’ ); ?>: <?php echo esc_attr( $name ); ?>
<?php endif; ?>
<?php if ( ! empty( $email ) ) : ?>
<?php echo __( ‘E-mail’, ‘realia’ ); ?>: <?php echo esc_attr( $email ); ?>
<?php endif; ?>
<?php $permalink = get_permalink( $post->ID ); ?>
<?php if ( ! empty( $permalink ) ) : ?>
<?php echo __( ‘URL’, ‘realia’ ); ?>: <?php echo esc_attr( $permalink ); ?>
<?php endif; ?>
<?php if ( ! empty( $_POST[‘message’] ) ) : ?>
<?php echo esc_html( $_POST[‘message’] ); ?>
<?php endif; ?>
Hello yor326,
I have no idea to solve your problem, I even still don’t know how to solve mine. I just got this : [ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ] but I have no idea what to do with…
Do you have the same problem has me?
Have a great day
Marc (deville.marc@hotmail.com)