Community Forums › Forums › Archived Forums › General Discussion › Site Title / Headline – Question
- This topic has 4 replies, 3 voices, and was last updated 10 years, 9 months ago by
bamajr.
-
AuthorPosts
-
June 26, 2014 at 7:06 am #111621
bamajr
ParticipantFull Disclosure: I'm using the Epik theme, with Genesis. So, I originally thought this was more of a theme-base question, but someone thought this is more likely a "Genesis" question, so I'm back here, to see if I can get a little more clarity.
O.P. http://appfinite.com/topic/site-title-tagline/
I do not want to use an official logo, in the title area. I want the title to remain text, but I do not want the tagline to display, below the title. I want the tagline to become part of the "alt" tag in the following format:
<a href="http://bamajr.com/" alt="TITLE: TAGLINE">bamajr.com</a>
I'm not having a lot of luck, making this happen, so any help would be appreciated.
http://bamajr.comJune 26, 2014 at 7:36 am #111625Brad Dalton
ParticipantI think there's 2 ways to do this from your child theme.
1. Use the genesis filters for title and description.
HEADER SECTION FILTERS
genesis_seo_title
Default value: $title, $inside, $wrap
Applied to the output of the genesis_seo_site_title function which depending on the SEO option set by the user will either wrap the title in <h1> or <p> tags.genesis_seo_description
Default value: $description, $inside, $wrap
Applied to the output of the genesis_seo_site_description function which depending on the SEO option set by the user will either wrap the description in <h1> or <p> tags2. Create a header.php and code it the way you want.
I haven't written the code for this so cannot provide it at this stage however those are the 2 methods i would look at using.
June 26, 2014 at 7:38 am #111626avgjoegeek
MemberYou would need to add some custom code to the function.php for the child theme that would A) hide the tagline then B) take the tagline and insert it into the Titles alt like your requesting.
This isn't technically a Genesis issue but a customization your child theme issue.
June 26, 2014 at 8:46 am #111627bamajr
Participant@braddalton - somehow I knew you'd be the first to weigh in. Thanks!
I have a working proof of concept, but I'm wanting to expand on it a little. Maybe you can help with the "expand on it a little" part ? ! ? Below is the code I'm able to accomplish my request with, though not exactly the way I want to do it.
remove_action( 'genesis_site_title', 'genesis_seo_site_title' ); remove_action( 'genesis_site_description', 'genesis_seo_site_description' ); function custom_site_title() { echo '<h1 class="site-title" itemprop="headline"><a href="http://bamajr.com/" title="SITE-TITLE: TAGLINE">SITE-TITLE</a></h1>'; } add_action( 'genesis_site_title', 'custom_site_title' );
This works, but does not correctly use the Genesis defined functions for SITE-TITLE nor TAGLINE. I'd like to echo a statement, which calls the SITE-TITLE & TAGLINE by their Genesis defined function(s) - so that any change to the SITE-TITLE and/or TAGLINE, from within the WordPress Admin, automatically changes what is displayed on the website.
Am I making any sense?
June 26, 2014 at 10:11 am #111642bamajr
ParticipantI am able to accomplish my request using standard WordPress Functions (see below):
function custom_site_title() { echo '<h1 class="site-title" itemprop="headline"><a href="' . get_site_url() . '" title="' . get_bloginfo ( 'name' ) . ': ' . get_bloginfo ( 'description' ) . '">' . get_bloginfo ( 'name' ) . '</a></h1>'; }
...though I'm not sure I'm best utilizing Genesis' own Functions.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.