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


  #26  
Old Sep 29, 2010, 04:58 PM
RHCdG
 
170 posts · Nov 2009
Netherlands
Hi Juggledad,
Can you just give me some pointers on how to style the taglines?
Many thanks.

Last edited by RHCdG; Sep 29, 2010 at 05:01 PM.
  #27  
Old Sep 29, 2010, 07:17 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
wrap a div (with a class) around it and then add a selector and rules into the CSS Inserts
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #28  
Old Sep 29, 2010, 07:54 PM
RHCdG
 
170 posts · Nov 2009
Netherlands
Where please exactly? If I wrap it around the tagline, the code itself appears on the page. If I go like this in lines 205 and further:

HTML Code:
if ( $bfa_ata['blog_tagline_show'] == "Yes" ) {
				<div class="tagline">
				$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);</div>
			}		
			echo '</td>';
		}
my website turns blank.

Can you please be more specific? Which file, what code replaces what code?

Many thanks
  #29  
Old Sep 30, 2010, 05:11 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
that is because you are mixing php and html, you have to switch between them. That is why you see the '<?php' and '?>' in the code. This tells when you are using php and when you want just straight HTML

here is a quick lesson you can read http://www.build-your-website.co.uk/...-PHP-Part3.htm which I found on the web with a quick google search
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Sep 30, 2010 at 08:37 AM.
  #30  
Old Sep 30, 2010, 07:27 PM
RHCdG
 
170 posts · Nov 2009
Netherlands
I studied the 3 lessons, and then copied the entire bfa_header.config.php to Homesite in order to get a good view of the structure. I noticed the entire document is within <?php and ?> so I am not sure where it would slip in and out of php. There are accolades in the file that are not mentioned in the lessons. I am sure I would be able to find how to style html within php but please don't overestimate me. If you could be more specific with regard to this code and the div it would save me a lot of time that I need to pass 1000+ html pages through this WP installation in the next weeks.

Last edited by RHCdG; Sep 30, 2010 at 07:42 PM.
  #31  
Old Sep 30, 2010, 07:42 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
bfa_header_config.php is a bad example to look at, look at header.php you will see the escaping in the first 11 lines.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #32  
Old Oct 1, 2010, 05:43 PM
RHCdG
 
170 posts · Nov 2009
Netherlands
Yes, but I need to enter this code in the bfa_header_config.php, where all I see is if-statements. I appreciate your pointer, and I understand that I should be able to work this out by myself but I can't and I am giving up on this one. Thanks anyway.
  #33  
Old Nov 22, 2010, 06:13 PM
TheDigitalGeek
 
1 posts · Nov 2010
juggledad thanks for a great tutorial.

For those that want 'multiline' taglines, I went one stage further, in this exampel I use |cr| as my delimiter in the tag line, though you could edit the code to use anything you like, so my tagline looks like this:

line 1|cr|line 2|cr|line 3|cr|line 4

and prints out like

line 1
line 2
line 3
line 4

so here is my code: (all comments appreciated!)

at line 205 change to:
HTML Code:
			if ( $bfa_ata['blog_tagline_show'] == "Yes" ) {
//				echo '<p class="tagline">'; bloginfo('description'); echo '</p>'; 
				echo '<p class="tagline">';
				$tag_title= get_bloginfo('description');
                $tag_title_lines = explode("|cr|", $tag_title);
                $i=0;
                  while($i < count($tag_title_lines)) {
                    echo $tag_title_lines[$i]; 
                    $i++;
                    if ($i < count($tag_title_lines)) {
                      echo "<br />"; 
                    }
                  }
				echo '</p>';  
			}
and at line 342 change to:
HTML Code:
		if ($bfa_ata['overlay_blog_tagline'] == "Yes") {
//			echo '<p class="tagline">'; bloginfo('description'); echo '</p>';
				echo '<p class="tagline">';
				$tag_title= get_bloginfo('description');
                $tag_title_lines = explode("|cr|", $tag_title);
                $i=0;
                  while($i < count($tag_title_lines)) {
                    echo $tag_title_lines[$i]; 
                    $i++;
                    if ($i < count($tag_title_lines)) {
                      echo "<br />"; 
                    }
                  }
				echo '</p>';  
			}
there is probably a neater way to suppress the final "<br />" however it's late here and brain is half asleep! - see it in action here: http://worcesterrenewables.co.uk

Hope it helps,

Best Regards, Gordon aka The Digital Geek.

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:30 PM.


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