Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

How to add "News" title on the main page?


  #1  
Old Apr 19, 2009, 09:37 AM
paul2008
 
6 posts · Apr 2009
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!
  #2  
Old Apr 19, 2009, 10:23 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
You could make a copy of index.php as home.php and in home.php add your HTML right after
PHP Code:
<?php get_header(); ?>
To have it only on the real homepage and not on paged pages (page 2, page 3) you can wrap your HTML into
PHP Code:
<?php if ( !is_paged() ) { ?>
HTML...
<?php ?>
You can use a SEO plugin such as All in one SEO, or to manually put your own code there, replace in header.php
PHP Code:
<?php include (TEMPLATEPATH '/functions/bfa_meta_tags.php'); ?>
with
PHP Code:
<title><?php wp_title('&laquo;'true'right'); ?> <?php bloginfo('name'); ?></title>
or whatever
  #3  
Old Apr 19, 2009, 08:10 PM
paul2008
 
6 posts · Apr 2009
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 bloginfo('name'); echo" - "bloginfo('description'); ?>
in the <title>, so it displays both the name and the tagline of the blog. On other pages it first displays the name of the page, for example: "About << Blog name - tagline". Could you explain which part of the
PHP Code:
<title><?php wp_title('&laquo;'true'right'); ?> <?php bloginfo('name'); echo" - "bloginfo('description'); ?></title>
adds the page names in the beginning of the title?


Thank you!
  #4  
Old Apr 19, 2009, 09:28 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
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.
  #5  
Old Apr 19, 2009, 10:30 PM
paul2008
 
6 posts · Apr 2009
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!
  #6  
Old Apr 20, 2009, 09:15 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
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.
  #7  
Old Apr 22, 2009, 05:03 AM
paul2008
 
6 posts · Apr 2009
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>
<body>
News&updates 
</body>
</html>
What have I not done right?
  #8  
Old Apr 22, 2009, 06:24 AM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
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.
  #9  
Old Apr 22, 2009, 09:42 AM
paul2008
 
6 posts · Apr 2009
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.
  #10  
Old May 4, 2009, 06:07 AM
chupateta
 
2 posts · May 2009
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:
        <h2>
            <?php $post $posts[0]; // Hack. Set $post so that the_date() works. ?>
            <?php /* If this is a category archive */ if (is_category()) { ?>
                <?php single_cat_title(); ?>
            <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
                <?php printf(__('Posts Tagged ‘%s’''kubrick'), single_tag_title(''false) ); ?>
            <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
                <?php printf(_c('Archive for %s|Daily archive page''kubrick'), get_the_time(__('F jS, Y''kubrick'))); ?>
            <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
                <?php printf(_c('Archive for %s|Monthly archive page''kubrick'), get_the_time(__('F, Y''kubrick'))); ?>
            <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
                <?php printf(_c('Archive for %s|Yearly archive page''kubrick'), get_the_time(__('Y''kubrick'))); ?>
            <?php /* If this is an author archive */ } elseif (is_author()) { ?>
                <?php if(get_query_var('author_name')) : $curauth get_userdatabylogin(get_query_var('author_name'));
                else : 
$curauth get_userdata(get_query_var('author')); endif; ?>
                Author's archive: <?php echo $curauth->display_name?>
            <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
                <?php _e('Blog Archives''kubrick'); ?>
            <?php ?>
        </h2>

Bookmarks

Tags
front, header, main, page, title

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Recent Posts" widget... adding some space between each title? thirstyreader Sidebars & Widgets 8 Jun 18, 2010 12:35 PM
Archives Page-How can I add the date before the post title when using "postbypost"? fromtheranks Atahualpa 3 Wordpress theme 8 Jul 25, 2009 10:52 AM
Atahualpa 3.4: no "title" Tag anymore - with wpSEO 2.7.5 chris New Versions, & Updating 4 Jul 11, 2009 12:31 PM
request: please add "links.php" page template. dhani Atahualpa 3 Wordpress theme 0 May 22, 2009 04:36 AM
"Page not found" in title conon Page & Category Menu Bars 2 May 7, 2009 07:25 AM


All times are GMT -6. The time now is 05:13 PM.


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