Opened 12 years ago
Closed 12 years ago
#22292 closed enhancement (wontfix)
Twenty Twelve: class needed for WordPress credits link
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | |
Focuses: | Cc: |
Description
In #22095, r22207, r22214:
Removing rel=generator removed the ability to easily hide the "Powered by" link. Before, you could just use css to hide it and now, you would have to add the footer.php to the child theme or edit the parent theme.
It would be awesome if a class could be added to the link to make this easy.
.site-info a.wordpress_footer_link { display:none; }
<footer id="colophon" role="contentinfo"> <div class="site-info"> <?php do_action( 'twentytwelve_credits' ); ?> <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentytwelve' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentytwelve' ); ?>" class="wordpress_footer_link"><?php printf( __( 'Proudly powered by %s', 'twentytwelve' ), 'WordPress' ); ?></a> </div><!-- .site-info --> </footer><!-- #colophon -->
Change History (6)
#2
@
12 years ago
- Summary changed from Class needed for wordpress link to Twenty Twelve: Class needed for wordpress link
#3
@
12 years ago
I use the do_action( 'twentytwelve_credits' ) hook in the child theme. If using [role="contentinfo"] or .site-info a, everything within the scope of those will be hidden, styled, or whatever.
Also this is not just limited to twentytwelve as all theme footers are being modified.
#4
follow-up:
↓ 5
@
12 years ago
Another option could be .site-info a:last-child
, since WordPress link is placed after twentytwelve_credits
hook.
#5
in reply to:
↑ 4
@
12 years ago
Replying to SergeyBiryukov:
Another option could be
.site-info a:last-child
, since WordPress link is placed aftertwentytwelve_credits
hook.
I like it. This will do the trick. Thanks!
Twenty Twelve uses
footer[role="contentinfo"] a
to set a color for that link:http://core.trac.wordpress.org/browser/trunk/wp-content/themes/twentytwelve/style.css?rev=22297#L638
Is there any reason not to use the same selector or just
.site-info a
to hide it in your case?