|
#1
Mar 4, 2009, 08:29 AM
|
|
Hi Flynn,
Is there a way to remove the header, footer, and sidebars, for just one static page, which would be the "splash" page of the site? The idea is to have one click through "welcome" graphic, dead center on the opening page of the site, and that is the only thing on the page. Thanks!
|
#2
Mar 4, 2009, 10:41 AM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
Insert this at A. Theme Options -> HTM/CSS Inserts -> CSS Insert
HTML Code:
#splash-outer {
text-align: center;
position: absolute;
top: 50%;
left: 0px;
width: 100%;
height: 1px;
overflow: visible;
visibility: visible;
display: block
}
#splash-inner {
margin-left: -125px; /* half of width = 250/2 */
position: absolute;
top: -35px; /* - half of height = 70/2 */
left: 50%;
width: 250px;
height: 70px;
visibility: visible
}
Create a page with the following content:
HTML Code:
<div id="splash-outer"><div id="splash-inner">
YOUR CONTENT
</div></div>
At A. Theme Options -> Page Menu Bar -> Exclude pages from Page Menu Bar? put the ID of the new page
At A. Theme Options -> Sidebars -> LEFT sidebar: Don't display on Pages: / RIGHT sidebar: Don't display on Pages: put the ID of the new page
At Site Admin -> Settings -> Reading -> Front page displays chose the new page as the front page
In index.php, find
PHP Code:
<!-- Post Headline --> <div class="post-headline"> <h2><?php if( !is_single() AND !is_page() ) { ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php if (function_exists('the_title_attribute')) { the_title_attribute(); } elseif (function_exists('the_title')) { the_title(); } ?>"><?php } the_title(); if( !is_single() AND !is_page() ) { ?> </a><?php } ?> </h2> </div>
and change to
PHP Code:
<?php if ( !is_front_page() ) { ?> <!-- Post Headline --> <div class="post-headline"> <h2><?php if( !is_single() AND !is_page() ) { ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php if (function_exists('the_title_attribute')) { the_title_attribute(); } elseif (function_exists('the_title')) { the_title(); } ?>"><?php } the_title(); if( !is_single() AND !is_page() ) { ?> </a><?php } ?> </h2> </div> <?php } ?>
in header.php, add this:
PHP Code:
<?php if ( is_front_page() ) { ?> td#header, td#footer { display: none; } <?php } ?>
right after this:
PHP Code:
<?php echo $bfa_ata_html_inserts_css; ?>
To make the "Home" link in the page menu bar go to the homepage "behind" the splash page, change in bfa_header_config.php
PHP Code:
$page_menu_bar .= '"><a href="' . get_option('home') . '/" title="' . get_option('blogname') . '">' .
to
PHP Code:
$page_menu_bar .= '"><a href="http://...new...homepage.../" title="' . get_option('blogname') . '">' .
|
#3
Mar 4, 2009, 08:50 PM
|
|
worked beautifully. rocking it old school!
thanks so much.
|
#4
Mar 4, 2009, 09:26 PM
|
|
doh! just realized i am still getting the background color of the post body in the top of the screen...it's a dark blue against the black...
http://www.thebeatings.com/beatings_TEST/
any thoughts...?
|
#5
Mar 4, 2009, 10:02 PM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
Extend the code from above that you put into header.php
from:
PHP Code:
<?php if ( is_front_page() ) { ?> td#header, td#footer { display: none; } <?php } ?>
to:
PHP Code:
<?php if ( is_front_page() ) { ?> td#header, td#footer { display: none; } td#middle { background-image: none; } <?php } ?>
You can add other splash-page-specific styles, too:
PHP Code:
<?php if ( is_front_page() ) { ?> td#header, td#footer { display: none; } td#middle { background-image: none; } body { background: #cc0000; } <?php } ?>
|
#6
Mar 5, 2009, 10:26 AM
|
|
excellent! thank you flynn!
|
#7
Jun 21, 2009, 11:59 AM
|
|
How do you make this work in the 3.3.3 ? The index.php is completely different now. Thank you !
|
#8
Jun 22, 2009, 08:06 AM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
In 3.3.3's index.php
PHP Code:
<!-- Post Headline --> <div class="post-headline"> <h2><?php if( !is_single() AND !is_page() ) { ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php if (function_exists('the_title_attribute')) { the_title_attribute(); } elseif (function_exists('the_title')) { the_title(); } ?>"><?php } the_title(); if( !is_single() AND !is_page() ) { ?> </a><?php } ?> </h2> </div>
is
PHP Code:
<?php bfa_post_headline(); // Post Headline: To edit the output, see functions/bfa_post_parts.php ?>
and in header.php
PHP Code:
<?php echo $bfa_ata_html_inserts_css; ?>
is
PHP Code:
<?php echo $bfa_ata['html_inserts_css']; ?>
|
#9
Jun 22, 2009, 09:20 AM
|
|
First of all thanks a lot for your constant help, I've just made a donation, it is not big as I am a student, but I really wanted to show you how grateful I am.
So, I've tried to do the change you first wrote on post #2 :
- Changing this :
HTML Code:
<?php bfa_post_headline(); // Post Headline: To edit the output, see functions/bfa_post_parts.php ?>
to that :
HTML Code:
<?php if ( !is_front_page() ) { ?>
<!-- Post Headline -->
<div class="post-headline">
<h2><?php
if( !is_single() AND !is_page() ) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php
if (function_exists('the_title_attribute')) {
the_title_attribute();
}
elseif (function_exists('the_title')) {
the_title();
} ?>"><?php
} the_title();
if( !is_single() AND !is_page() ) { ?>
</a><?php
} ?>
</h2>
</div>
<?php } ?>
- then, I added this :
HTML Code:
<?php if ( is_front_page() ) { ?>
td#header, td#footer {
display: none;
}
<?php } ?>
Right after that :
HTML Code:
<?php echo $bfa_ata['html_inserts_css']; ?>
But an error obviously occured, because I get an error message :
Parse error: syntax error, unexpected T_STRING in /var/www/com2009/streetart/wordpress/wp-content/themes/atahualpa333/header.php on line 773
Line 773 is <?php if ( is_front_page() ) { ?>
Oh I forgot to say that I've already changed the index.php, to erase the title of the page, as you explained here :
http://forum.bytesforall.com/showthread.php?t=1334
I hope you can understand me... Thank you by advance !
|
#10
Jun 22, 2009, 09:55 AM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
In index.php you should change
PHP Code:
<?php bfa_post_headline(); // Post Headline: To edit the output, see functions/bfa_post_parts.php ?>
to
PHP Code:
<?php if ( !is_front_page() ) { ?>
<?php bfa_post_headline(); // Post Headline: To edit the output, see functions/bfa_post_parts.php ?>
<?php } ?>
and in header.php add
PHP Code:
<?php if ( is_front_page() ) { ?>
td#header, td#footer {
display: none;
}
<?php } ?>
after
PHP Code:
<?php echo $bfa_ata['html_inserts_css']; ?>
Last edited by Flynn; Jun 26, 2009 at 05:47 PM.
Reason: Changed is_front_page() to !is_front_page() in first code sample
|
#11
Jun 22, 2009, 10:51 AM
|
|
Thank you so much, it is perfect now ! There are some dot on the top, but it doesn't matter, the image almost covers them. Thank you !!!
Last edited by Thalie; Jun 22, 2009 at 10:53 AM.
|
#12
Jun 23, 2009, 09:59 PM
|
|
|
91 posts · Jan 2009
So. California
|
|
Okay, I might be losing it but I have about 3-4 versions of Index.php files and none of them have the line of code that I assume I should be looking for. Did I miss something (of course) somewhere? I am running theme version 3.2, as I have not upgraded to 3.3 yet.
Thanks in advance for a lifesaver you can throw my way.
Tiffany (aka Masselyn)
|
#13
Jun 24, 2009, 10:24 AM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
The instructions of post #2 should work for Atahualpa version 3.2, did you look at post #2?
|
#14
Jun 24, 2009, 10:44 AM
|
|
|
91 posts · Jan 2009
So. California
|
|
Hi :
I did start at the beginning (I've already made the CSS changes, etc), but none of my index.php files have the lines of code that were referenced. I was lost as to where I would place the adjusted code that you mention. Should I just place it at the end of the file, if I don't have the whole <post headline>, etc. lines of code?
Thanks!!
|
#15
Jun 24, 2009, 12:55 PM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
This is how the code in question looks in index.php of Atahualpa 3.2
PHP Code:
<!-- Post Headline --> <div class="post-headline"> <h2><?php if( !is_single() AND !is_page() ) { ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php if (function_exists('the_title_attribute')) { the_title_attribute(); } elseif (function_exists('the_title')) { the_title(); } ?>"><?php } the_title(); if( !is_single() AND !is_page() ) { ?> </a><?php } ?> </h2> </div>
|
#16
Jun 26, 2009, 08:44 AM
|
|
|
91 posts · Jan 2009
So. California
|
|
Thanks. I did finally get it working, but unfortunately the splash page image is not showing up centered. If I place standard text in the div, it all works and centers wonderfully. As soon as I place the splash image in its place...everything is thrown off. I am playing around with it some more, but does something glare out at you that I am doing wrong?
I'm also trying to get rid of the white bar at that top. I changed the coding in the header.php, but that won't go away. Again, I am tweaking some more things to see if I can fix that.
THANKS!
www.party-licious.com
|
#17
Jun 26, 2009, 05:53 PM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
Remove the white background of the middle colum with a CSS Insert
td#middle {
background: none !important;
}
and adjust the numbers from the code above to match the actual width and height of your image, which is 932x681:
#splash-inner {
margin-left: -466px; /* half of width = 932/2 */
position: absolute;
top: -340px; /* - half of height = 681/2 */
left: 50%;
width: 932px;
height: 681px;
visibility: visible
}
|
#18
Jun 26, 2009, 07:17 PM
|
|
|
91 posts · Jan 2009
So. California
|
|
Lifesaver! You're the best, and I feel like a ninny for not catching that. Thanks so much!!!
|
#19
Jun 26, 2009, 07:24 PM
|
|
|
91 posts · Jan 2009
So. California
|
|
Okay, I just noticed something else. Adding the CSS code for the middle removes it for all pages. Is there anything I can do to prevent this, as I do want the white for all pages but the Splash one that I created? Thanks!
Moola coming your way, cause I really want to say THANK YOU.
|
#20
Jun 26, 2009, 08:12 PM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
Add that to header.php then, along with the other CSS, instead of using a CSS Insert
header.php:
<?php if ( is_front_page() ) { ?>
td#header, td#footer {
display: none;
}
td#middle {
background: none !important;
}
<?php } ?>
|
#21
Aug 1, 2009, 11:31 AM
|
|
I am new to WordPress and I'm really excited about using this theme to build my site. I read through everything on your directions, but I am having trouble following them. I have version 3.4 and can't figure out how to make most of the file edits. Could post how to make a splash page with nothing else on it for the latest version?
Thanks in advance
|
#22
Aug 2, 2009, 09:37 PM
|
|
|
91 posts · Jan 2009
So. California
|
|
I'd love to second the Seawitch's thought. I am trying to do the same thing I did above, in this thread, on the new version but the index.php file does not look the same. Thanks.
|
#23
Aug 5, 2009, 11:54 PM
|
|
|
91 posts · Jan 2009
So. California
|
|
I added the lines of code to the end of the index.php, which did not appear to have blown anything up. Whew! I went to add the lines of code to the header.php but I am not finding the exact wording it should go below. When I placed it in an area I "thought" it should be, but I am getting nothing. It can be viewed here at www.masselyn.com/rr . The line of code at the top, which should be hidden, is showing. I assume I placed it in the wrong location, but the header.php file looks different in the newest version.
Help! I would appreciate any help that can be offered. Thanks so much!
|
#24
Aug 26, 2009, 08:53 AM
|
|
|
66 posts · Aug 2009
Amsterdam, Netherlands
|
|
I'm on the same track here, wanting to make a splashpage, but the indexfile of Atahualpa 342 doesn't look at all to the ones discribed above.
This is what my index file lokks like,
<?php /* get all options: */
include (TEMPLATEPATH . '/functions/bfa_get_options.php');
get_header(); ?>
<?php /* If there are any posts: */
if (have_posts()) : $bfa_ata['postcount'] == 0; /* Postcount needed for option "XX first posts full posts, rest excerpts" */ ?>
<?php /* This outputs the next/previous post or page navigation.
This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
bfa_center_content($bfa_ata['content_above_loop']); ?>
<?php /* The LOOP starts here. Do this for all posts: */
while (have_posts()) : the_post(); $bfa_ata['postcount']++; ?>
<?php /* Add Odd or Even post class so post containers can get alternating CSS style (optional) */
$odd_or_even = (($bfa_ata['postcount'] % 2) ? 'odd-post' : 'even-post' ); ?>
<?php /* This is the actual Wordpress LOOP.
The output can be edited at Atahualpa Theme Options -> Style & edit the Center column */
bfa_center_content($bfa_ata['content_inside_loop']); ?>
<?php /* END of the LOOP */
endwhile; ?>
<?php /* This outputs the next/previous post or page navigation and the comment template.
This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
bfa_center_content($bfa_ata['content_below_loop']); ?>
<?php /* END of: If there are any posts */
else : /* If there are no posts: */ ?>
<?php /* This outputs the "Not Found" content, if neither posts, pages nor attachments are available for the requested page.
This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
bfa_center_content($bfa_ata['content_not_found']); ?>
<?php endif; /* END of: If there are no posts */ ?>
<?php bfa_center_content($bfa_ata['center_content_bottom']); ?>
<?php get_footer(); ?>
The word 'headline' for axample, is nowhere to be found.
So my question is; can the above mentioned code be implemented in the atahualpa index.php?
Tnx, Sakshin.
|
#25
Oct 8, 2009, 06:50 PM
|
|
I'm looking for similar instructions as above (ver 344). Wanting a splash page with its own layout.
|
|