Subdividing tagline over two separate lines
Hi,
I'd like to subdivide my blog's tagline over two separate lines, like so: Hello [Blog Title] I am fine [Tagline 1] How are you? [Tagline 2] Is there any way to accomplish this? I asked this question before in another thread but that was for a previous version of Atahualpa. Many thanks! |
If you style the tagline width in ATO>Style & edit Header Area you can force the tagline to wrap. Just tweak it to the right width to wrap where you want.
|
Well Larry beat me to one answer, so here is my answer
The tag line is displayed using the WordPress function 'bloginfo('description');' so it gets displayed in one line. Now there is another WordPress function 'get_bloginfo();' and you can use 'description' to get the tag line and put it in a variable HTML Code:
$tag_title= get_bloginfo('description'); HTML Code:
$tag_title= get_bloginfo('description'); But, since you are going to have to change the code if you change the tagline, why not just replace the code that is getting the tagline, with your tagline. ie. if you look at bfa_header_config.php lines 205-207 (version 3.5.3) you will see HTML Code:
if ( $bfa_ata['blog_tagline_show'] == "Yes" ) { HTML Code:
if ( $bfa_ata['blog_tagline_show'] == "Yes" ) { |
Thanks, Miles, and thanks, Juggledad, for your elaborate and impressive answer! However, it doesn't work :)
Do I need to turn off 'show blog title' in ATO>Style & Edit Header Area? The odd thing is, I did turn it off but it's still there! I also turned on the search box, but that one won't appear... Oh, my website is at www.cornetsdegroot.com And just to be sure, this is how lines 205-207 in the file bfa_header_config.php (version 3.5.3) now read: if ( $bfa_ata['blog_tagline_show'] == "Yes" ) { echo '<p class="tagline">Volledig werk en blogbiografie<br>van R.A. (Rudy) Cornets de Groot</p>'; } |
Did you try my answer? Maybe mine will win the contest.
|
Hi Miles,
Yes, that does work! However, I am a little concerned about different resolutions, monitor sizes, etc. Should I specify the width in the Tagline box like so: margin: 10; padding: 15; font-size: 1.6em; font-weight: bold; color: #000000; width: 500px; You see, I want to break off the tagline at a specific point in the sentence, like so: "Volledig werk en blogbiografie<br> van R.A. (Rudy) Cornets de Groot" Thanks, Rutger |
I would use a width of 410px. That should work fine regardless of resolution and monitor size.
|
Thanks, Miles!
|
Sorry for the delay, I should have asked if you were using the %logo or overlaying the blog title on the header image.
The second area to change would be in bfa_header_config.php lines 342-344 using the same code as above |
Hi Juggledad, Miles,
Now Juggledad's code works! I like Miles' approach for its simpleness and elegance. I also like Juggledad's solution because it gives more control, and e.g. allows you to style the individual taglines (I H1'd the 2nd line). Many thanks to you both! |
I had already marked this one as solved, but there is one issue with Juggledad's solution, which is when used in a multisite setup. The header then appears on both (or rather, all) sites. See www.cornetsdegroot.com and www.cornetsdegroot.com/rhcdg. Unless there is a way to work around this, I will have to revert to Miles' solution...
|
You could possibly check the child site name and then have a tag line for each that you would split. That starts to be a bit of code you will have to maintain and replicate everytime there is a theme upgrade. The other way would be to make your tage something like this
HTML Code:
15 this is my tag and this is part two of the tag |
Thanks, Juggledad, but I lack the skills to implement either of the two options you suggest. Can you be more specific? Please let me know if you need any information that I can provide you with.
|
you could try this
HTML Code:
$tag_title= get_bloginfo('description'); |
Thanks, I hope this is useful for other people who are better versed than I am currently. I don't know where to insert this code (file, line) nor how to modify it to my situation.
|
you would put it just where the other changes would be replacing the echo line
|
In lines 205-207 as well as lines 342-344 of the bfa_header_config.php, I should replace
HTML Code:
if ( $bfa_ata['blog_tagline_show'] == "Yes" ) { HTML Code:
$tag_title= get_bloginfo('description'); |
Leave the if, replace just the echo line with that code
|
My blog won't show when I go like this:
if ( $bfa_ata['blog_tagline_show'] == "Yes" ) { $tag_title= get_bloginfo('description'); $tag_split=substr($tag_title,0,2); echo (substr($tag_title,3,$tag_split) . '\n' . substr($tag_title,$tagsplit+4);} |
oop, I had an extra '(' use this at 205-209
HTML Code:
if ( $bfa_ata['blog_tagline_show'] == "Yes" ) { HTML Code:
if ($bfa_ata['overlay_blog_title'] == "Yes") { |
Thanks, Juggledad, for following up on this one with me.
The site now appears but the tagline is not formatted and the first word 'Verzameld' is truncated ('zameld'). Also there is no split. |
did you put a number as the first two characters of the tag like I showed in post#12?? The number tells the code where to split the tag line
Try this tag line HTML Code:
15 this is my tag and this is part two of the tag |
Where do I enter this?
HTML Code:
15 this is my tag and this is part two of the tag |
This is the blog TAG general settings under BLOG Title
|
Alright! The split is now there! Only the formatting is missing... Care to take a look?
I need to leave, be back in a few hours. Thanks! |
All times are GMT -6. The time now is 03:06 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.