Articles of settings

How do I register a new settings page?

I need to be able to create a new settings page, one that will act as a list of information for the user. However, I am unable to find how to do this, can someone point me in the right direction for this? Either to some information or to a question here with the answer.

WordPress language switcher doesn't work

I am using WordPress version 4.4.2. The problem I am facing is, I can not change the site language form Settings -> General -> Site language. If I change the language and hit save, the language does not update. I am using Loco Translate plugin. The plugin does not show any warning or error anywhere […]

register_settings callback function erases data

I have registered a setting with a callback function: register_setting( ‘my-plugin-settings-group’, ‘notification_email’, ’email_validation’ ) and callback function looks like: function email_validation($data) { if (null == $data) { add_settings_error( ‘requiredTextFieldEmpty’, ’empty’, ‘Notification Email cannot be empty’, ‘error’ ); } else { if (!is_email($data)){ add_settings_error( ‘requiredTextFieldEmpty’, ’empty’, ‘Notification Email is not valid email address’, ‘error’ ); } […]

Show global Message in User Profiles with admin only Input field in WordPress Backend

I try to display a piece of text (without plugin) for example “Quote of the day: Some text” on all user profile pages (…/wp-admin/profile.php). This Text should managable/editable from the Profile of the ADMIN. In the Admins Profile Page should be a Text Input field where i can change the Text and save. Since yesterday […]

Assigning a Setting to a Variable and Using it in an if Statement

Is it possible to assign get_theme_mod(‘dds’) !==’false’; to a variable and include it in an if statement instead of typing the whole thing? This is the if statement I am dealing with: $DDS = get_theme_mod(‘dds’)!==’false’; if(is_category() && $DDS) : //output some css style endif; I get an error: Parse error: syntax error, unexpected ‘:’

Is it possible to change slugs' default behaviour?

Say I have a page Foo and I then create another page with the same name. By default, WP will change it’s slung to Foo-2. My question then is, would it be possible to change this behaviour so the slug would be Foo-bar instead of Foo-2? In this case, the behaviour would be really simple […]

Site Address and WordPress Address settings when using a load balancer

I am installing my wordpress forum in two identical servers: InstanceA (public dns: InstanceB (public dns: I would like to have both of these servers sit behind a load balancer: LB (public dns: When filling in the Site Address and WordPress Address settings in wp-admin->settings, which address would I fill for each […]

Update WP option by plugin

I wanted to set value of WP option (more specifically – ‘admin_email’) by using plugin, its option (plugin option) and update_option(). I tried using lines like below, but when plugin code contains them – it gets disabled. Any ideas why? $helper = (get_option(‘plugin-option’); update_option(‘admin_email’, $helper ); EDIT $helper = get_option(‘plugin-option’); update_option(‘admin_email’, $helper ); Now it’s […]

Settings API and 'type' => 'font'

array( ‘name’ => ‘textarea’, ‘label’ => __( ‘Textarea Input’, ‘wedevs’ ), ‘desc’ => __( ‘Textarea description’, ‘wedevs’ ), ‘placeholder’ => __( ‘Textarea placeholder’, ‘wedevs’ ), ‘type’ => ‘textarea’ ), Just like in the above example the ‘type’ => ‘textarea’ what is its equivalent for a font? I tried → ‘type’ => ‘font’; but that didn’t […]

Displaying the full text instead of post title

I’ve installed recently WordPress (I guess it should be 3.0? cannot find easily the version number) and my first post appears only the title (linked) and to see the full text one must click the title. Is there a setting for displaying the full text of a post instead of the title?