php - WP Subtitle - Formatting -
not sure if right place ask, i’ve had no luck elsewhere , have managed find answers stuff before, looking @ other people’s questions , answers on site.
i’ve installed wordpress plug-in (wp subtitle) allows me assign subtitle posts , pages. got couple of problems though:
the following line displays title of blog posts links in sidebar:
<a href="<?php the_permalink(); ?>"><?php get_the_title() ? the_title() : the_id(); ?> </a>
i’ve amended subtitle displayed well:
<a href="<?php the_permalink(); ?>"><?php get_the_title() ? the_title()+the_subtitle('<span class="subtitle">', '</span class="subtitle">') : the_id(); ?></a>
the links themselves, work fine – if mouse hovers on title, title highlighted, whereas if mouse hovers on subtitle, both title , subtitle highlighted (which want). know how can achieve please? title , subtitle highlighted regardless of part of link user clicks on?
the second problem code seems work posts, , doesn’t display subtitle pages @ all. (this in sidebar though – individual pages , posts both display title , subtitle fine).
if need see mean, site http://www.retelevise.com. or suggestions appreciated.
thanks, sn.
what's going on
the issue here adding layer of html inside a
, in form of span
. css :hover
rule applies itself, not children. when hover on content directly inside a
, content directly inside a
highlighted. can go 2 routes. first involves removing span
, need keep change color.
the second method quite simple though, , involves 1 line of code. need add selector tell browser highlight child span
s a
s themselves. current :hover
selector .post-excerpt-title a:hover
. need add in .post-excerpt-title a:hover span
, , it'll work perfectly.
code
current css: (minus comments)
.post-excerpt-title a:hover { color: #f29b06; font-weight: bold; }
new css:
.post-excerpt-title a:hover, .post-excerpt-title a:hover span { color: #f29b06; font-weight: bold; }
Comments
Post a Comment