The strings use in your plugin are using translatable strings ie. _e( 'Inbox', WPC_CLIENT_TEXT_DOMAIN )
It would probably be a better idea to use a translation plugin such as WPML or Polylang as opposed to trying to do this conditionally within the template files.
However, if you prefer to do this within the template file instead, you should maybe look at using the PHP Switch statement (https://www.w3schools.com/php/php_switch.asp), eg.
<?php
$pageid = get_the_ID();
switch ($pageid) {
case 123:
echo "Your favorite color is red!";
break;
case 456:
echo "Your favorite color is blue!";
break;
case 789:
echo "Your favorite color is green!";
break;
default:
echo "Your favorite color is neither red, blue, nor green!";
}
?>
Related Posts:
- How does printf( __( ) ); work?
- Return HTML Template Page with PHP Function
- Why do templates contain so many PHP tag pairs?
- Is there a way to parse shortcodes in PHP?
- What exactly does “Posts page” do in WordPress?
- Check if a menu is empty?
- Static Frontpage Pagination – Custom loop
- Get the php template file from other theme folder
- WordPress Template Engine?
- How to have a custom display for both woocommerce archive and product-category pages? [closed]
- On this day PHP code
- How to loop over custom fields in a page template?
- Blank on static home page?
- WordPress theme & site not loading after moving files
- Adjust the results quantity for Search Results page pagination
- Use Timber/Twig to pull an image by image ID [closed]
- Is it possible to use the featured image of a page as a css background without inlining?
- Easiest way to show total number of subpages
- Blank space at beginning of tag?
- Link to file in plugin directory from wordpress template?
- Password protecting content in custom template
- How to override wp-admin styling
- How to display user nickname (not display name) in PHP template?
- Custom Template 404 for specific custom post type
- An unwanted inline style is added to my body tag
- How to properly insert a link to a template in WordPress?
- Custom field value not saving when it contains a URL?
- Render ninja form inside markup
- Mass update excerpt
- How can I get a single php file that is the equivalent of an existing WordPress page?
- Get and insert order email address to the PHP template inside HTML text
- Custom search results page not working with empty search
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- Change title only in dynamic page
- Enable custom logo upload if logo is not in header
- How can I edit the content in index.php? [duplicate]
- how to show only specific category for a template
- Show a different code on front page to other pages
- Can’t print Yoast meta description into page template (syntax error, unexpected ‘.’) [closed]
- Using same variable names in files added with get_template_part()
- PHP include is only working in certain places in my custom WP theme
- Use WordPress function in php file
- Adding wrapper elements in the_date() like in the_title()?
- How to get all author posts outside of author templates
- Add filter multiple times using only one master function
- single.php with different look by category
- Function Reference Documenting Template Tags for use in Custom Theme Templates?
- Removing WordPress Footer -without access to PHP code?
- How to set a template with wp_insert_post
- Why is a wp function used in current PHP namespace’s callback not resolved to global scope?
- Why does the Woocommerce grouped template prints the unpublished products?
- Create page template via functions.php?
- What’s a good way to allow overwriting files within a child theme if I want the same folder structure?
- how to display this functions?
- is_page_template showing partial results
- Adding regular php file to site
- Advice on creating a WP Archive Template with Custom Taxonomy (get_term_meta)
- How to render a block from php template
- Override Admin menu icon
- Post repeated when opening in overlay, how do I solve this? [closed]
- How to suppress template-parts in undescores?
- Need help with pagination
- Creating custom page template from existing PHP site
- How do I query a single data value from the wp_metadata table?
- Conditional string comparison failing for basename/slug
- How to add new CSS file to new PHP file
- pass html code to worpdress
- Some problems calling a function into sprintf() inside functions.php template file [closed]
- Getting a WordPress tag to print inside of a traditional php echo
- Prevent header and footer from loading on specific pages with template or plugin
- Integrate admin plugin into template. Very interesant (live search + autocomplete with wp rest api, in vanilla js)
- Display articles with a different template in the home page | Solved |
- Display metabox galleries on specific page template in admin editor
- Display WordPress archive template page in 3 columns and not 1 column [closed]
- Run do_shortcode on php template using JS function
- How to hardcode header and footer in WP?
- Converting Array to String Issue [closed]
- ACF – Custom image for Product Tags not displaying
- Polylang and template files
- How to create dynamic templates?
- If is_page elseif is_page not working like I want it to
- Change WooCommerce template for PDF – access to custom field
- missing admin bar and widget in a template
- How to include a function in a template with template tag
- What syntax is this? “{{post.price}}”
- My own theme’s custom widget areas are not working
- How do I modify the Previous and Next Page posts on blog pages to include “previous” and “next” before the links?
- Access methods in plugin template
- Create dynamic content from one WP page to multiple other pages
- How to call a certain object/menubar in a PHP file
- Problems With Query and/or Template Part and/or PHP
- why is markup routinely placed in functions in wordpress?
- Odd page behaviour after removing sidebar
- get_permalink returning first letter
- Custom Archive Page
- How to refresh a template page on WordPress in 3 seconds – easiest method?
- Twig+WordPress how to use array arguments inside a function?
- How to implement a custom sliding banner? [closed]
- How can one use variables in a template or template part without polluting the global scope?
- Need Help With Making Full-Width Template for Blog Posts (common methods aren’t working)