|
|
|
|
![]() ![]() |
Jan 17 2006, 06:07 AM
Post
#1
|
|
|
Never alone with Christ ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 646 Joined: 22-July 05 Member No.: 9,713 |
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:
CODE <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! This post has been edited by jlhaslip: Jan 17 2006, 07:05 AM |
|
|
|
Jan 17 2006, 06:40 AM
Post
#2
|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,161 Joined: 9-May 05 From: Brisbane, QLD Member No.: 6,818 |
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. |
|
|
|
Jan 17 2006, 05:50 PM
Post
#3
|
|
|
Never alone with Christ ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 646 Joined: 22-July 05 Member No.: 9,713 |
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. |
|
|
|
Jan 17 2006, 06:16 PM
Post
#4
|
|
|
apt-get moo ![]() Group: [MODERATOR] Posts: 2,236 Joined: 28-May 05 From: Devon, England Member No.: 7,593 ![]() myCENT:20.88 |
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:
CODE <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: CODE <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: CODE <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. |
|
|
|
Jan 17 2006, 06:29 PM
Post
#5
|
|
|
Ancient Enigma ![]() Group: [MODERATOR] Posts: 1,837 Joined: 11-July 04 From: under the stars Member No.: 76 myCENT:80.62 |
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)? |
|
|
|
Jan 19 2006, 12:28 AM
Post
#6
|
|
|
Never alone with Christ ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 646 Joined: 22-July 05 Member No.: 9,713 |
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:
CODE <div id="header"> <div id="headerimg"> <h1><a href="<?php echo get_settings('home'); ?>"><?php bloginfo('name'); ?></a></h1> </div> </div> To: CODE <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://jcweekly.mxweb.co.uk 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] |
|
|
|
Jan 19 2006, 06:32 AM
Post
#7
|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,161 Joined: 9-May 05 From: Brisbane, QLD Member No.: 6,818 |
Change it to this:
CODE <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. |
|
|
|
Jan 19 2006, 05:12 PM
Post
#8
|
|
|
Never alone with Christ ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 646 Joined: 22-July 05 Member No.: 9,713 |
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.
|
|
|
|
![]() ![]() |
Similar Topics