WordPress language switcher doesn’t work
I found the solution. There was no languages folder in /wp-content directory. I created a the directory and gave it proper permissions. Switching between languages worked after that.
I found the solution. There was no languages folder in /wp-content directory. I created a the directory and gave it proper permissions. Switching between languages worked after that.
You just need to move the capability check “inwards”: function wpse_230369_quote_of_the_day( $user ) { $quote = esc_attr( get_option( ‘quote_of_the_day’ ) ); ?> <div class=”visible-only-for-admin”> <h3>Quote of the Day Input Field</h3> <table class=”form-table” > <tr> <th><label for=”quote_of_the_day”>Quote of the Day</label></th> <td> <?php if ( current_user_can( ‘administrator’ ) ) : ?> <input type=”text” name=”quote_of_the_day” value=”<?php echo $quote … Read more
in case of wrong value, the function has to return the original value then try this : function email_validation($data, $option, $original_value) { if (null == $data) { add_settings_error( ‘requiredTextFieldEmpty’, ’empty’, ‘Notification Email cannot be empty’, ‘error’ ); return $original_value; } else { if (!is_email($data)){ add_settings_error( ‘requiredTextFieldEmpty’, ’empty’, ‘Notification Email is not valid email address’, ‘error’ … Read more
The only way WordPress is going to know what the previous option was, is if you save it before you change it – since you’re replacing the built-in option, it has no way of knowing how to get back to that. So, you could add a custom ‘backup’ option that you restore on deactivation. Something … Read more
Like @LupuAndrei said, we lack of details, especially the code where you call you form from. But I suspect, again like @LupuAndrei said, you might not be calling the settings_fields, do_settings_fields or do_settings_sections correctly. On the function where you build your form, try something like this <form method=”post” action=”options.php”> <table class=”form-table”> <?php settings_fields( ‘animated-settings-group’ ); … Read more
UPDATE: Per your comment, DDS means Disable Dynamic Style and is true when enabled, so I have modified the function accordingly. check for -> if ( is_category() && ! $DDS ) : Short answer, yes you can use a variable representing this function get_theme_mod(‘dds’) Now I don’t know what will be the result of that … Read more
Test you the following filter work for you: function wpse245094_fist_duplicate_slug( $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug ) { // slug had to change, we must have a duplicate if ( $original_slug !== $slug ) { // try to replace `-2` with `-es` $new_slug = preg_replace( ‘#-2$#’, ‘-es’, $slug ); if ( $new_slug !== $slug ) … Read more
When they say “where core files reside” they are referring to the url where they can be reached. Since you’re using a load balancer, you want those requests to be split across both your servers. To configure WordPress in a load balanced environment, you need to configure a couple of settings. I like to do … Read more
I have solved this by adding the word “content” to the field name <textarea rows=”5″ cols=”20″ name=”ad1_content”><?php echo stripslashes( get_option(‘ad1_content’) )?></textarea> It then worked just fine I think this is a security issue that accepted the script tag for fields containing content (used by wordpress in editor by the way) in name and rejecting the … Read more
SOLVED if ( isset( $_POST[‘submit’] ) ) { $option_name=”order_ref” ; $counter = get_option( ‘order_ref’ ); //Limit the counter, based on the range of orders you will be getting per day if ($counter <= 99 ) { $counter = $counter + 1; } else { $counter = 1; } if ( get_option( $option_name ) !== false … Read more