7

This class is used to visually hide elements from sighted users but still allows assistive technologies like screen readers to still present those elements to users who are visually impaired. For example you may have an icon with Facebook's logo as a link to your page/profile. A sighted user will know that's Facebook but a blind user won't so you would ...


4

I agree with Nathan's answer, but you can copy the source and create your own SelectControl component based on that source. Here's an example, with basically just the aria-label addition: <option key={ `${ option.label }-${ option.value }-${ index }` } value={ option.value } disabled={ option.disabled } aria-label={ option.ariaLabel || '' ...


4

You may target the current_page_item CSS class or you may target the current-menu-item CSS class instead. current_page_item class may not be present for all kinds of menu item. Read the answer here to know why. Whichever CSS class you choose, you may use the CODE like the following to set the attribute: add_filter( 'nav_menu_link_attributes', '...


2

Easy to setup a button trigger/toggle with a bit of jQuery. Here's a working example I made for you: https://jsfiddle.net/8Le2tjvr/1/ The Code: HTML: <button id="impaired-button">Impaired Button</button> jQuery $('#impaired-button').click(function() { $('body').toggleClass('impaired'); }); CSS .impaired h1 { font-size: 50px; } ...


2

Use this for the alt="" attribute on the custom header <img> tag … alt="<?php $attachment_id = get_custom_header()->attachment_id; $alt = get_post_meta( $attachment_id, '_wp_attachment_image_alt', true ); if ( count( $alt ) ) echo $alt; ?>" /> … and then just edit the media attachment and add the alt text.


2

The default walker used by wp_list_categories() (Walker_Category) has a hook (a filter hook) named category_list_link_attributes which you can use to add custom title and class (as well as other attributes like data-xxx) to the anchor/a tag (<a>) in the HTML list generated via wp_list_categories(). So for example, you can do something like: add_filter( ...


1

Custom Walker The function wp_list_categories accepts a (custom) walker. That gives you the possibility to add a custom function that adds class and title attribute to the output. The function has no filter hook so that you have not the option to change the default output of the function. an example to use a custom walker at the function. $args = array( '...


1

That plugin is licensed under the GPL (GNU General Public License), so you can modify it as you please. You can even redistribute your modified version, as long as you do so under the GPL and adhere to its requirements. That said, even if it wasn't, I believe you would be allowed to add CSS, since you are not even modifying the plugin in any way. I ...


1

You're not outputting any attributes besides the src and class. Try using the_post_thumbnail() instead. <?php the_post_thumbnail( 'post-thumbnail', array( 'class' => 'img-responsive' ) ); ?> This will include all attributes and supports responsive image markup by default.


1

Although this is not a WP question, it could be done with some PHP/MySQL code. Just the psuedocode: generate a GUID value on each main page visit check if the GUID is already in the GUID database if not, store the GUID in the GUID database if GUID exists in the database, redirect to another page ("you were already here, only one per customer" message) This ...


1

Looks like some of your assets are using http://localhost/... links instead of your domain which is why they aren't loading. These might be hardcoded in your theme or you may want to check your options table in the database for option_name "siteurl" and "home" and make sure they are updated to use the right URL instead of http://localhost


1

Within the header, modify the wp_nav_menu code to include: 'items_wrap' => '<ol id="%1$s" class="%2$s">%3$s</ol>', Full Menu Code <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu', 'items_wrap' => '<ol id="%1$s" class="%2$s">%3$s</ol>' ) ); ?>


1

'items_wrap' (string):How the list items should be wrapped. Default is a ul >with an id and class. Uses printf() format with numbered placeholders. Default items_wrap is <ul id="%1$s" class="%2$s">%3$s</ul> You can pass items_wrap argument to the wp_nav_menu like this. wp_nav_menu( array( 'theme_location' => 'primary', '...


Only top voted, non community-wiki answers of a minimum length are eligible