- This topic has 13 replies, 3 voices, and was last updated 3 years, 11 months ago by
Tom.
-
AuthorPosts
-
April 23, 2019 at 3:12 am #876345
Fernando
Hello and good day!
Is there any theme class (or styles) to change the default (and ugly) checkbox and option form inputs?
Another question: how can we remove the title attribute in the site logo and navigation logo links? Or is it important?
Note that I send you the URL, dont publish as the site is not published.
Thanks!
GeneratePress 2.2.2GP Premium 1.7.8April 23, 2019 at 3:37 am #876356David
StaffCustomer SupportHi there,
do you have any example of how you would like the input fields and checkbox to be displayed?
Some are difficult to change as they default to the browser styles.The Title Attribute is important for SEO optimization. I would not recommend removing it.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 23, 2019 at 3:59 am #876359Fernando
Hello David, how can we remove the title attribute?
April 23, 2019 at 4:08 am #876367David
StaffCustomer SupportTom provides the solution here:
https://generatepress.com/forums/topic/remove-title-attribute-from-logo-2/#post-816077
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 23, 2019 at 1:14 pm #876949Fernando
Ok, thank you!
But is there a way to change also the title attribute in the navigation logo?
About checkbox and option styles, would be fine that GP include them.
April 23, 2019 at 5:25 pm #877049Tom
Lead DeveloperLead DeveloperChange the title or remove it?
You can try this:
add_filter( 'generate_logo_title', '__return_empty_string' );
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 23, 2019 at 10:49 pm #877162Fernando
Hello Tom,
The problem is that the filter generate_logo_title not only removes the title attribute, also the alt attribute, and this is the important (not the title) for SEO and accesibility purposes.
* Is there anyway to remove (or change) the title attribute for the header logo and for the site logo, but not the alt attributes? *
You can think this is not important, but I see annoying the title emergent message over the image.
Thank you!
April 24, 2019 at 7:28 am #877698Tom
Lead DeveloperLead DeveloperAh, gotcha.
Ok, let’s try this:
add_filter( 'generate_logo_attributes', function( $atts ) { unset( $atts['title'] ); return $atts; } ); add_filter( 'generate_navigation_logo_output', function() { return sprintf( '<div class="site-logo sticky-logo navigation-logo"> <a href="%1$s" rel="home"> <img src="%2$s" alt="%3$s" /> </a> </div>', esc_url( apply_filters( 'generate_logo_href' , home_url( '/' ) ) ), esc_url( apply_filters( 'generate_navigation_logo', $settings['sticky_menu_logo'] ) ), esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ) ); } );
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 24, 2019 at 11:21 am #877999Fernando
I am going to try, thank you!!!
April 24, 2019 at 2:31 pm #878202Tom
Lead DeveloperLead DeveloperNo problem π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 24, 2019 at 10:16 pm #878495Fernando
Hello Tom,
I only have implemented the generate_logo_attributes filter, due to the complexity of the other.
generate_logo_attributes: note that when unset($atts[‘title’]), appears the logo link title (in Chrome and Firefox), so it is the same story… :-(. It is solved with $atts[‘title’]=” instead of unset.
I think title attributes shouldn’t be used in that area, neither in links nor in images (or give the possibility of change), as the only important are the alt of the images.
A lot of thanks!
April 25, 2019 at 7:44 am #879257Tom
Lead DeveloperLead DeveloperI tend to agree. I’ll look at removing them π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentApril 25, 2019 at 2:03 pm #879669Fernando
Ok, take note. Thanks!
April 25, 2019 at 4:03 pm #879745Tom
Lead DeveloperLead DeveloperYou’re welcome! π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.