Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Why are all my pages defaulting to the same one? WordPress

  • SOLVED

something strange has happened!

When you click on any link on my site, it defaults to one page. http://www.burstradio.co.uk

I had set the page in question to be the home page. But now every link to every page redirects to it, so I now effectively have a website of one page!

Also, if I trash that page, a lot of the styling disappears (background image, menu styling etc), and the pages become 404s

If I set the home page to be another page, it goes to the new homepage when you first enter the site, but then goes back to every link going to the other page.

Help! I would be very grateful if someone could give me a clue as to how to fix this.

It seems very similar to this question y the way http://wpquestions.com/question/show/id/1639

But I haven't touched the php!

I know this might be asking the impossible but if there's anyway I can solve this without having to touch the php that'd be great. (Can't get access to it till Monday.)

I've found this on the web too http://wordpress.stackexchange.com/questions/14902/all-wp-admin-pages-just-showing-homepage
but I've tried to replicate it and it didn't seem to work.

thanks :)

Answers (5)

2011-05-07

Baki Goxhaj answers:

Try setting the permalinks to default and share the results with us.


Rebecca Brueton comments:

Hi Baki, thanks for the lightening response :)

I checked the permalinks setting and it's set to default.


Baki Goxhaj comments:

What I would do in this case is go to config.php and set the WP_DEBUG to true. That would show where things break. But since you don't have PHP access, I don't know what more to suggest at this point.

My guess is that you have set that page to be the homepage, in the Settings => Reading, but you have not set a selected a Posts page under it, which I think causes the problem. Can you go back and select a posts page too, if you have not already.


Rebecca Brueton comments:

Thanks again for your reply.

You're right, I did set this page to be the homepage in Settings => Reading, and I didn't set a posts page under it.

However I have now set a posts page, but this has made no difference.

Incidentally, if I change the home page at Settings => Reading, the home page shows the correct page when it first loads, but after that every link (including "home") now defaults to this other page, even though it's no longer set to home page.

2011-05-07

Ryan Riatno answers:

Please paste your .htaccess and how you generate the menu? using wp_nav_menu or wp_list_pages.


Rebecca Brueton comments:

I'm afraid I don't have access to the PHP (until Monday) and I would need it for this, wouldn't I?

Please bear with me I am new to Wordpress and PHP!


Ryan Riatno comments:

Can you set permalink to "/%postname%/". I think the problem is your navigation as I can visit your [[LINK href="http://www.burstradio.co.uk/?page_id=6"]]contact page [[/LINK]]


Rebecca Brueton comments:

Hi, thanks for the reply :)

I entered /%postname%/ under permalinks >> Common settings >> Custom Structure

Is that where you meant?
It doesn't seem to have made any difference.

Perhaps I will try deleting the menu.

How did you manage to access the contact us page by the way?


Ryan Riatno comments:

Try to edit your .htaccess via ftp or if it doesn't exist try to create one. Then paste this code

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


Rebecca Brueton comments:

I don't think I can do this until I access to the PHP can I?

What is it trying to do by the way?


Rebecca Brueton comments:

Incidentally in answer to your question I created the menu using the settings in the theme (Suffusion).

However I don't think the menu is the problem as this happens on all links (e.g. clicking on a user profile link).

2011-05-07

Just Me answers:

If you are willing to give me temporary access to your admin panel I think it will be solved quickly. You can send me a message using my profile page.

In the meantime set your permalinks to /%postname%/
make sure the htaccess file is created or rewritten. If WordPress can't access it there will be a message at the bottom of the screen.

Also check if you didn't set any additional settings on the permalink tab, meaning the category one and such.


Rebecca Brueton comments:

Hiya Just Me,

I've tried the permalinks thing (if I put it in the right place - see above)

I notice on the permalnks page it says "You should update your .htaccess now."

What does that mean (please forgive my ignorance!)

There are blank fields for "category base" and "tag base"

At the bottom of the page it says

"If your .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all."


and then there's this code:


<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


Rebecca Brueton comments:

I'm really sorry I can't give you access to the admin. This is my college's student radio website. (It's "By students for students" though so no official tech support from the uni just yet, although I'm working on that!)


Just Me comments:

ok the system is telling you it want to write the htaccess, put the listed commands in it but it can't access it.
you could create a normal text file, put the commands in it (copy paste) then upload it to your wordpress root folder (using FTP) naming it .htaccess don't forget the dot in front of the name.

Right now your links look a little weird. I think things work better once the correct .htaccess has been uploaded


Rebecca Brueton comments:

I entered /%postname%/ under permalinks >> Common settings >> Custom Structure as suggested above - could this account for the links looking weird I wonder?

I also wonder if the key to this is that the rogue page seems to have control of some of the styling. I wonder if it's got some thing to do with parent child relationships?

If I trash the rogue page, the site looses the background image and menu styling.


Just Me comments:

By default WordPress uses links like your.domain.com/?page_id=342

When you set permalinks to /%postname%/ it will change to your.domain.com/contact (for example)

For some reason your links use both, that is a little weird.

Maybe something else is going wrong on your website, it is really hard to tell without seeing the admin panel, but it will be a good thing to make this permalink system work correctly.


Rebecca Brueton comments:

A-ha! I think we may be getting somewhere.

Instead of links being called stuff like:

/?page_id=26
/?page_id=27
/?page_id=2653

or whatever,

they are called

/?page-id=541/home
/?page-id=541/about

the rogue pages is, of course

/?page_id=541/


How has that happened I wonder?


Also, I just tried deleting the menu and recreating one.

I notice in the list of pages you can select to add to the menu, there is one called "Home - new website".

I have no page called this. I have one called "new website" - that is the rogue page which appears everywhere.

I also have one called "home" and one called "home 2" (Hone 2 was originally "home" but I renamed it when I restored it from the trash, during these experiments to work out what's up")



Rebecca Brueton comments:

I've got it! I've solved it, yippee!

It was totally down to an error I made late last night!

When I was trying to set the home page it seems I got it wrong the first time and set "Site address (URL)" under "general settings" to the /?page_id=541/ page. I don't remember doing this but I must have thought I was setting the home page.

What a muppet!

Lessons for myslef ...

Don't keep working till 3am!
BACK IT UP, BACK IT UP, BACK It UP!
I need to get the passwords and brush up on some basic PHP. Although I'm glad I didn't go around fiddling it this time!


Rebecca Brueton comments:

This is my first time using this site by the way.

I'm just reading up on awarding the cash and I'll be back in a couple of minutes ...

2011-05-07

MDan answers:

Try go to <strong>Pages</strong> tab and see if there are any pages in <strong>trash</strong>.At the top you'll see All, Drafts and Trash
If they are delete them all.
Important!
Remember if you have any caching plugin enabled,you must empty the plugins cache.


Rebecca Brueton comments:

I am considering this one, I'm playing about with the posts before I delete them.

You see, come to think of it, this is how this happened:

1. The blog page was set as the home page
2. I set a page to be the home page, one with a "magazine" template
3. I changed my mind and decided to have another page with the default page template on the home page, as the magazine template looked a bit funny half-populated
4. I tried to put the magazine template page back this morning. It didn't work. This is when I noticed something was wrong, all pages defaulting to the one.
5. I deleted the home page and created another in case this helped. (It didn't)
6 I deleted the rogue page. Then all my other pages lost a lot of their styling and became 404s!
7. I reinstated the rogue page and the styling came back

So I'm a little nervous about permanently deleting i case the key to this is in that page somewhere.

There is only one plug-in, an events calendar.



MDan comments:

After I saw your response above regarding your .htaccess file,it`s clear you need ftp access,to set up write permissions on the .htaccess file,so wordpress can automatically write the file.

Remember,with wordpress you can't reuse the same slug (permalink value) twice,so when you change/remove and added again the pages,they remained in trash. That i think it's your problem.

2011-05-07

Vidyut Kale answers:

Are you using any redirection plugin?


Rebecca Brueton comments:

Hiya,

thanks for the reply but I've found the answer (see above) and voted already.

I thought the question would lose automatically, is there something I need to do to mark it solved?