You should hook with the locale
filter:
add_filter('locale', 'my_get_locale');
function my_get_locale($locale) {
if ( is_page( 2846) ) {
return "en_GB";
}
return $locale;
}
Related Posts:
- Show the most popular post per week
- why is translation not working on theme?
- How to change date language without changing the entire site language?
- How to let users change site language?
- Change “en-US” to “en”
- Non-Closing PHP Query in WordPress Loop
- WordPress language switcher doesn’t work
- Changing wordpress default language
- Implementing a multilingual WordPress site by installing several instances of WordPress and redirecting
- Change WooCommerce currency programmatically on AJAX request
- How to display dual language menus and headers?
- How to Get Linked Elements for a specific ml_source_elementid
- Conditionally change WordPress core language
- Multilanguage website on two different domains
- How to translate the blog date in the Avada theme [closed]
- Custom query to get post names beginning with a digit
- PHP XMLRPC for WordPress: Adding meta tags and description
- Real time Duplicate title check
- Blank on static home page?
- probleme adding Txt and Links in preg_match()
- Adjust the results quantity for Search Results page pagination
- Audio tags around Mp3 URL in content
- the_author_meta not working
- Extremely slow pageload for long post when using the_content?
- My Styles are not registering
- Create a quick start wordpress installation [closed]
- How can I add a custom class to only nav sub-menu > li > a items in WordPress?
- Word Count Function Preventing Permalink Editing
- How to call function that create table in database (plugin functionality)
- WooCommerce – Email admin with new user details
- Button not refreshing page
- Trying to add attribute to my posts’ featured image
- Detect session/cookie variable in wordpress to prevent access to documents
- Using if/else statements with output from theme options
- How to VAR_DUMP a $variable during checkout process (Is my product meta callable?)
- How to implement a rating and review system for WordPress custom posts?
- Redirect specific user role to specific site after login?
- Send multiple attachments with wp_mail in PHP
- Set Order Status to Complete After Payment – from another site
- php function to display commenter username or login
- custom css for admin only
- Odd / Even posts add class minus first post
- Sanitizing text fields in array
- Fatal Error in wp_get_current_user() Function
- Multiple meta_key in one global $wpdb;
- What does -> mean in WordPress?
- Parsing Menu Items and Blog Posts
- Making my first wordpress template
- How to update and save user metadata on page visits?
- How to optimize update_post_meta?
- Contact Form 7 – Replace database configured form template with a static file
- HTML Special Characters in URL string [closed]
- How to pass argument to add_action while the method is inside a class?
- Getting taxonomy category Image from ACF [closed]
- How can I use a text and a function php
- Warning: call_user_func() expects parameter 1 to be a valid callback, function
- How to make changes to style.php [closed]
- select wordpress custom post type
- Modify WooCommerce used to get all orders in dashboard
- Add a product category to a specific product via a button
- WordPress can’t use ZipArchive
- Adding an Anchor Link to a wordpress menu using WPBakery Page Builder
- WordPress SQL Prepare
- Removing “There is no account with that username or email address.” error message in “/wp-login.php?action=lostpassword”
- WordPress loading progess – wp-blog-header.php
- How to hardcode header and footer in WP?
- Trying to generate a CSS file in wordpress uploads folder
- What is wrong with this piece of PHP code? This is for an email template. (I am completely new to PHP)
- WP Website is shown in HTML
- Trying to add some custom text into WordPress Post title via function.php
- register_setting not save checkbox
- How can I remember an action taken by a logged in user?
- Script to generate pages – taxonomies not loaded
- get_template_part() not working with Advanced Custom Fields plugin
- List all ACF field values across every post on one page
- Closing Comments conditionally in comments.php
- Allow user to choose header style
- Require advice handling a URL redirect from a Third Party. URL Params need to populate and then forward to payment
- How do I send a POST request with params with WordPress REST API
- Not able to add new item in wordpress home page
- Editable Student file associated with basic User ID
- html to posts, jpg to featured image, zip file contains jpg and html
- views How to load javascript on custom page template?
- Two theme locations for two menus, but only one is showing up
- How to set the plugin load order when updating the active_plugins option?
- Contact form field in wordpress menu
- Shortcodes (with a space) added to php Sample
- How Can I Center the Logo in the Navigation Menu? [closed]
- Sort posts by title, sort array by largest number [duplicate]
- Get author meta of all writers
- Creating a function that sanitizes the custom metabox excerpt
- Nav Menu Display
- WordPress & PHP sessions
- Check radio get value to array
- Your PHP installation appears to be missing the MySQL … After deleting and restarting from cpanel
- How to create shortcode of this PHP code
- Cannot install plugins or themes on new WordPress installation at Cloudways
- Custom WP LIST Table filter
- How to run site locally after downloading database
- How to change shipping method title based on cart amount?