How to add "News" title on the main page?
Hi everyone!
I have two questions: - How can I add a title to the main page that says "News" on top of all the posts that appear on the page? It should be something like the "news&announcements" title on this website: http://www.capoeirashanghai.com/ - How do I change the page title (<title>) for the main page or any page? I thought it should be easy, but header.php is nothing like what I am used to. Please suggest something. Thank you in advance! |
You could make a copy of index.php as home.php and in home.php add your HTML right after
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Thank you for replying!
The thing is, I don't know how to code (I should have explained it in the first post), so I don't really know what it means. Do you mean that I should set home.php as my static main page and then add the "News" line in the home.php? Could you explain in a bit more details? I don't really understand what code and where to insert. I did manage to change the header like you told me. I put PHP Code:
PHP Code:
Thank you! |
That wp_title behavior is rather complicated. I suggest that you read up on it at http://codex.wordpress.org/Template_Tags/wp_title
If Wordpress finds a "home.php" in the /atahualpa/ theme directory, it'll use that instead of index.php for the homepage. So once you uploaded home.php to the theme's root directory you don't need to do anything else. |
I'll read about wp_title, thanks.
For the main page, I still want it to display the newest posts I made, so I don't want to change it to a static page - I don't know if it's possible to automatically display new posts on a static page. So, I'd want to keep index.php, but add a "News" title somewhere on the top. Is that possible? Thanks! |
home.php won't be a static page. It'll do everything index.php does except that'll be used for only the homepage, which gives you the opportunity to edit it and to have those edits appear only on the homepage.
|
Ok, this is dumb, but I can't get it to show my text after the header.
I copied index.php, named it home.php and after <?php get_header(); ?> inserted Code:
html> |
Hey Paul: -- I'm not an expert but try to help wherever I might.
Note: please make a donation. You will not find any theme author who comes close to Flynn in any regard ...especially re his seemingly never ending patience with us ignorant users of his products.Okay: you're missing the first "<" ( should be "<html>"). BUT, I'm very sure you don't need to insert all the usual html page stuff (<html>, <body>, </body>, etc.) If yoiu just type straight text after either the <?php if ( !is_paged() ) { ?> or <?php get_header(); ?> that text will show up at the top of your page. It will be formatted as per however you've set the default in "Body, Text & Links" in the Atahualpa Theme Options. As I understand it, all the usual page stuff (<html>, <body>, </body>, etc.) is generated "on the fly" byh the php code in the .php files pulling bits and pieces out of the database. |
Hi Jim,
it actually appeared after sometime today, I didn't change anything. But thanks, I will know that HTML tags are not always neccessary. Now I will spend an hour or so aligning the text and changing font size :) About donation, I wanted for a long time to set up PayPal, but I don't know anything about these online payment systems. I don't have a credit card and I don't know how to get one (I'm not in U.S. and not in Europe). I want to be able to pay for stuff online either with credit card or PayPal, though. |
So why just don't ask me, Chupa Teta, about that? I'm webmaster of CapoeiraShanghai.com. It's really simpe:
we just put it on index.php of our wordpress theme, I don't know anything about Atahualpa theme. and in archive.php (date, author, category, tag) I put thise: PHP Code:
|
All times are GMT -6. The time now is 06:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.