Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

Subdividing tagline over two separate lines


  #1  
Old Sep 27, 2010, 02:33 AM
RHCdG
 
170 posts · Nov 2009
Netherlands
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!

Last edited by RHCdG; Sep 27, 2010 at 03:12 AM.
  #2  
Old Sep 27, 2010, 05:54 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
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.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Sep 27, 2010, 06:20 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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');
and then you could use the 'substr()' function to split it where you want it.
HTML Code:
$tag_title= get_bloginfo('description');
echo (substr($tag_title,0,10) . '\n' . substr($tag_title,11);
and of course if you ever changed the tagline, you would have to edit this code and change the location of the split.

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" ) {
     echo '<p class="tagline">'; bloginfo('description'); echo '</p>'; 
}
you could change it to
HTML Code:
if ( $bfa_ata['blog_tagline_show'] == "Yes" ) {
     echo '<p class="tagline">tagline part 1<br>tagline part 2</p>'; 
}
This way you even save a little processing since you are not calling another function.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #4  
Old Sep 27, 2010, 07:48 AM
RHCdG
 
170 posts · Nov 2009
Netherlands
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>';
}

Last edited by RHCdG; Sep 27, 2010 at 07:52 AM. Reason: Providing URL and additional info
  #5  
Old Sep 27, 2010, 08:28 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
Did you try my answer? Maybe mine will win the contest.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #6  
Old Sep 27, 2010, 08:43 AM
RHCdG
 
170 posts · Nov 2009
Netherlands
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
  #7  
Old Sep 27, 2010, 10:11 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
I would use a width of 410px. That should work fine regardless of resolution and monitor size.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #8  
Old Sep 27, 2010, 11:58 AM
RHCdG
 
170 posts · Nov 2009
Netherlands
Thanks, Miles!
  #9  
Old Sep 27, 2010, 07:11 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #10  
Old Sep 28, 2010, 03:21 AM
RHCdG
 
170 posts · Nov 2009
Netherlands
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!
  #11  
Old Sep 28, 2010, 08:25 AM
RHCdG
 
170 posts · Nov 2009
Netherlands
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...
  #12  
Old Sep 28, 2010, 08:33 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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
where the number is where you wanted the split to happen. Then you could break the tag line in the code at that point
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #13  
Old Sep 28, 2010, 08:40 AM
RHCdG
 
170 posts · Nov 2009
Netherlands
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.
  #14  
Old Sep 28, 2010, 05:38 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you could try this
HTML Code:
$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);
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #15  
Old Sep 28, 2010, 05:43 PM
RHCdG
 
170 posts · Nov 2009
Netherlands
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.
  #16  
Old Sep 28, 2010, 06:24 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you would put it just where the other changes would be replacing the echo line
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #17  
Old Sep 28, 2010, 06:35 PM
RHCdG
 
170 posts · Nov 2009
Netherlands
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" ) {
     echo '<p class="tagline">Verzameld werk en blogbiografie van<H1>R.A. (RUDY) CORNETS DE GROOT</H1></p>'; 
}
by

HTML Code:
$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);
?
  #18  
Old Sep 28, 2010, 08:45 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Leave the if, replace just the echo line with that code
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #19  
Old Sep 29, 2010, 04:13 AM
RHCdG
 
170 posts · Nov 2009
Netherlands
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);}
  #20  
Old Sep 29, 2010, 04:54 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
oop, I had an extra '(' use this at 205-209
HTML Code:
			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) . '<br>' . substr($tag_title,$tag_split+3);
			}
and this at 340-344
HTML Code:
		if ($bfa_ata['overlay_blog_title'] == "Yes") {
				$tag_title= get_bloginfo('description');
				$tag_split=substr($tag_title,0,2);
				echo substr($tag_title,3,$tag_split) . '<br>' . substr($tag_title,$tag_split+3);
		}
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #21  
Old Sep 29, 2010, 05:01 AM
RHCdG
 
170 posts · Nov 2009
Netherlands
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.
  #22  
Old Sep 29, 2010, 05:15 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #23  
Old Sep 29, 2010, 06:23 AM
RHCdG
 
170 posts · Nov 2009
Netherlands
Where do I enter this?

HTML Code:
15 this is my tag and this is part two of the tag
  #24  
Old Sep 29, 2010, 06:26 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
This is the blog TAG general settings under BLOG Title
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #25  
Old Sep 29, 2010, 06:43 AM
RHCdG
 
170 posts · Nov 2009
Netherlands
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!

Bookmarks

Tags
tagline, two lines



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Making a separate header for the trackbacks? jankph Comments, trackbacks & pings 9 Feb 8, 2012 10:48 PM
Separate background images for Pages flieg Center area post/pages 20 Sep 1, 2010 09:39 AM
Adding space in category meny bar + separate RSS for separate categories? jenny_li Page & Category Menu Bars 2 May 10, 2010 06:57 AM
[SOLVED] How to subdivide the tagline over two separate lines RHCdG Header configuration & styling 2 Dec 23, 2009 10:18 AM
separate linking for rotating banners starloft New Versions, & Updating 1 Jul 22, 2009 11:54 AM


All times are GMT -6. The time now is 01:42 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.