Right off the bat: I'm not a coder, been doing websites for a short time and this is my first post here. I never have to code, I'm sure this is a very elementary code for someone experienced so just seeing if someone could point me in the right direction.
I have a PHP template for a shortcode from a portal plugin (WP-Client) on a Wordpress site that I need to add a "conditional text" to. (I already asked them for help and they couldn't help me).
Explanation:
When the shortcode is placed on a page, it displays a message center with Inbox, Sent, Trash, etc. in English. My website is multi-lingual so I need to be able to change those labels on certain pages only. My thought on this was to insert a code into the template that says to put "Inbox" if page ID/name is "Example 1" and put "Bandeja de entrada" if the page ID/name is "Example 2".
This is the template I'm dealing with:
<div class="wpc_private_messages_shortcode">
<div class="wpc_msg_nav_wrapper">
<input type="button" class="wpc_msg_new_message_button wpc_button" value="<?php _e( 'New', WPC_CLIENT_TEXT_DOMAIN ); ?>" title="<?php _e( 'New Message', WPC_CLIENT_TEXT_DOMAIN ); ?>"/>
<div class="wpc_msg_nav_list_wrapper">
<div class="wpc_msg_nav_list_collapsed"></div>
<ul class="wpc_msg_nav_list">
<li class="wpc_nav_button inbox" data-list="inbox"><?php _e( 'Inbox', WPC_CLIENT_TEXT_DOMAIN ); ?></li>
<li class="wpc_nav_button sent" data-list="sent"><?php _e( 'Sent', WPC_CLIENT_TEXT_DOMAIN ); ?></li>
<li class="wpc_nav_button archive" data-list="archive"><?php _e( 'Archive', WPC_CLIENT_TEXT_DOMAIN ); ?></li>
<li class="wpc_nav_button trash" data-list="trash"><?php _e( 'Trash', WPC_CLIENT_TEXT_DOMAIN ); ?></li>
</ul>
</div>
</div>
As you can see, there are the 5 labels: New, Inbox, Sent, Archive, and Trash. These are the ones I need to be able to change to another language based on the page number/name.
I've gone through probably 10 different ways of writing it but I'm not quite getting there.
I was thinking something along the lines of this (but using page ID/name):
<?php
$t = date("H");
if ($t < "10") {
echo "Have a good morning!";
} elseif ($t < "20") {
echo "Have a good day!";
} else {
echo "Have a good night!";
}
?>
Would appreciate any help on this.
Thanks,
James