go41

Re: Need a static text box on home page :: Reply by Joern

von Joern am 13. Mai. 2010 | Keine Kommentare

I would do like this: put it in header.php and use conditional tags to load on ‚home‘ and on ‚pages‘ only.
The way to go: (MAKE BACKUP FIRST by copy and paste full file content to a text file on your pc)
now open header.php and find right at the end:

</div>

Code:

<div id="page" class="clearfloat">
between these two lines (just above div id page) you put some new code:
<?php if( ( is_home() && !is_paged() ) || is_page() ) { ?>
<div id="static" class="clearfloat">
here is the static text shown on home and on pages only
</div>
<?php } ?>

you can format the new ‚div id static‘ in style.css ie:

Code:

#static {

background:#ECECEC;

font-size:1em;

margin:0 auto;

padding:10px;

width:940px;

}

in this style above you might set a 10px grey border and white background, set font and fontcolor etc as you like
____________________
you find me on Google+, Twitter and Facebook

(von: Joern)

Hier noch 3 weitere Ergebnisse dieses Threads:

Need a static text box on home page

12. Mai. 2010 (von: kinyofu)

Hi Joern,I'm not sure if I need another headline section or what, but I'd like to put a few lines of text at the top of my page (above the current article). I need this text to be a static…

Re: Need a static text box on home page :: Reply by Joern

12. Mai. 2010 (von: Joern)

Hi, could you explain more detailed where you want to display this description?On all pages or posts or categories?Or just above the single post?If you want to show on every view of your site, best place is under the navigation…

Re: Need a static text box on home page :: Reply by kinyofu

13. Mai. 2010 (von: kinyofu)

I would like the static text on the pages only (About, Subscribe, Tools, etc.,) especially the home page. Right under the navigation bar is perfect. Weiterlesen →

Autor:

Du findest mich auch auf Google+, Twitter und Facebook!

Schreibe einen Kommentar

Pflichtfelder sind mit * markiert.


weitere forum Beiträge: