Jump to content
xisto Community
Sign in to follow this  
wild20

I Need Help With Wordpress/php I am lost with these files

Recommended Posts

Okay, here is the story. I set up wordpress on my site. I know nothing about PHP and need help. I need to know where the url and title info is stored. I checked in the header PHP file, and all I saw was:

<title><?php bloginfo('name'); wp_title(); ?></title>And<div id="header">	<h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1></div> <!-- /header -->

Where is the URL and Title stores in PHP. I would like to be able to edit them. I found everything else and get the BASIC idea. But PHP is very complex it seems. Could you help me out guys? Thanks!
Notice from jlhaslip:
Altered Topic Title to better describe the topic

Edited by jlhaslip (see edit history)

Share this post


Link to post
Share on other sites

The name is going to be whatever you call your Post or Page when you create it. So you edit it in the Wordpress browser interface, rather than editing it in the PHP files. I wouldn't play around with the URL of your Posts or Pages otherwise they won't work properly on your site.There's a section under Options/Permalinks where you can edit the format of your site's URLs.

Share this post


Link to post
Share on other sites

Thanks Jim for the modded title.Do you know where I could find where that info is Tyssen? Is it under wp-content? That is where I get lost. The header banner is what I want to change, I know where to do that, but I want to edit the text on it. It is displaying my url and the link to it. I want to change it to a title.

Share this post


Link to post
Share on other sites

I presume you are using WordPress 2? Locate the folder containing the current theme you are using. For example, wp-content/themes/default. Then, open the file called header.php, which contains the information for the header of your site. Near the bottom of the file, you should see a section that says this:

<div id="header">	<div id="headerimg">  <h1><a href="<?php echo get_settings('home'); ?>"><?php bloginfo('name'); ?></a></h1>  <div class="description"><?php bloginfo('description'); ?></div>	</div></div>

If you just want to change it to your own title, then edit it to the following:
<div id="header">	<div id="headerimg">  <h1><a href="<?php echo get_settings('home'); ?>">YOUR TITLE</a></h1>	</div></div>

That does mean that is is hard-coded, so to change the title of your site, you have to edit that file. If you want the title set in your admin panel to appear then change it to:
<div id="header">	<div id="headerimg">  <h1><a href="<?php echo get_settings('home'); ?>"><?php bloginfo('name'); ?></a></h1>	</div></div>

I hope this helps you, and feel free to get me on MSN or email me if you need more help.

Share this post


Link to post
Share on other sites

URL and Title are not stored in the PHP per se. it is referenced in the mysql database which is accessed by wordpress. if you want to change these, you have to do them via your wordpress admin control panel. once you're in your WP CP, go to OPTIONS > GENERAL, where you can change the webblog title and tagline, etc. under OPTIONS > PERMALINKS (as what Tyssen says) is where you can customize how your URLs should look like. but to use permalinks you need to have an .htaccess file in your wordpress root directory, and it must be chmodded to allow changes to be implemented via WP CP.other things which you may want to provide so we can help you better:- what is the wordpress version you are using? version 2.0?- are you using the default theme, or are you using a custom theme? - what is your wordpress blog URL (so we can visualize what you now have and what changes you want to implement)?

Share this post


Link to post
Share on other sites

Umm. Okay. Let me clarify a little. I don't want to change the actual title of my site. Just a banner. Have any of you seen the "Blix" theme? That is what I am using, and the way it works is so that the main banner with your theme has your url on it. I want to change that url on that banner to my own custom title. So is it possible to just change:

<div id="header"><div id="headerimg"> <h1><a href="<?php echo get_settings('home'); ?>"><?php bloginfo('name'); ?></a></h1></div></div>

To:

<div id="header"><div id="headerimg"> <h1><a href="<?php echo get_settings('home'); ?>"><?php bloginfo('What ever I want'); ?></a></h1></div></div>

Is that possible with PHP? Just put in what you want instead of the command? I would give you the url to take a look, but it is down right now. Tell me if you need the header code, I can post it and you can take a look if you want. Thanks in advance.

Oh, I am using version 2.0 and my url is http://forums.xisto.com/no_longer_exists/ But it may be down right now for the moment. What is on the banner is the url, and you can click on it and it goes back to the main page. I want to change that url to my own title without changing the name of the whole site.
[note-jlhaslip]Merged[/note]

Share this post


Link to post
Share on other sites

Change it to this:

<div id="header"><div id="headerimg"><h1><a href="<?php echo get_settings('home'); ?>">Your title here</a></h1></div></div>
You don't need the PHP to pull the title out of the database if you're gonna hard code it into your file.

Share this post


Link to post
Share on other sites

Perfect. Thank you Tyssen. That is what I needed. It was getting a little annoying to see my url as the text. As you can see, I need to learn some more PHP. Thanks again.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.