I have a WordPress site where my front page is showing the latest posts.
If I have my permalinks set as plain showing...
https://example.com/paged?=2
The page loads. However, If I change the permalinks to Post name, giving me...
https://example.com/page/2/
That results in a 404.
.htaccess seems to be set up correctly. The first page has posts and the links are being generated in the pagination controls. Using Post name as the permalink setting my posts are properly linked...
https://example.com/my-wordpress-post
But https://example.com/page/2/ does not work.
Any ideas? I really need to set the permalinks to Post name. Could it be a server issue?
First thing I would recommend is to confirm your .htaccess file is set up correctly to process permalinks. If you create a new page, can you access that page with his human-friendly permalink, for example? If not, you may need to fix your .htaccess file to handle those rewrites properly.
Otherwise, can you provide more context for this issue? Is it safe to assume you have your homepage set up with a list of paginated posts?
I figured this out. Instead of selecting Post Name, I select the Custom Structure radio button instead and manually added /%postname%/ and then clicked saved.
Then it worked. :)
Related
The title says it. I renamed a page in wordpress along with the permalink (the slug also changed) and now I can't find it on my site.
The menu updated along with my changes, but the page content isn't there when I click on it.
Here's the offending page
If anyone can tell me what I did wrong and particularly how to fix it, I'd really appreciate it.
Thanks in advance!
Try regenerating permalinks - editing permalink settings triggers that regeneration.
Also, if you have any kind of cache plugin running, purge it's data too.
This was a conflict with a portfolio feature in my theme (Bello by WeGraphics)... I renamed the permalink and it works fine now
I am new to wordpress so trying to figure out something which I cannot and asking you guys. Please help if you know.
I have issues with URL formation in Wordpress. I want to show articles' category name in URL, so I am using Permlinks -> custom structure which is like /%category%/%postname%.htm I then pasted code given by WP in .htaccess file. So now articles use http://mysite/category1/article1.htm URL.
But then on index.php any links inside article shows URL ashttp://mysite/article2.htm and hence 404. I am using >Article2 inside a post. If I open http://mysite/category1/article1.htm then above link will show as http://mysite/category2/article2.htm which is the correct URL.
Can someone plese help me figure out correct way? Using above configuration, it works fine for all links when open individual posts but only main index.php does not include category name. Just to note, URLs in Recent Posts also show correct URL.
If the links are hardcoded inside the article itself, there's nothing inside WordPress PHP or settings to change. You just need to edit the post content and update the HTML link URLs using the new permalink structure, within Posts and/or Pages tab.
You can also try a plugin like Redirection which will redirect old post permalinks to the new (correct) permalink format.
http://wordpress.org/plugins/redirection/
I have a post in wordpress. I changed its permalink. Previously it was:
http://example.com/foo/dogs-so-awesome/
and I change the permalink to:
http://example.com/foo/dogs/
I was expecting the old url to no longer work, but I can still hit it from a web browser and see the page. The new url works, too. Is wordpress doing a redirect here? I'd actually like to remove the old url so it 404s when someone tries to hit it. But I can't find anything in the wordpress admin interface that suggests how to do that.
Thanks
Did you change the title of the page? or the permalink?
If you changed the "title" of it, then the page will be titled dogs, but the permalink will still be dogs-so-awesome. Just underneath the title is the permalink with an "Edit Permalink" option. Use that.
If you want to 404 it, you could use something (possibly the Page Links To plugin) and create a post at dogs-so-awesome and 404 it.
I have a wordpress multi-site:
site1.local.loc [with subdomains on my local] and I would like to have three pages on this.
site1.local.loc/works - (posts page, but I want 'Works' as my title)
site1.local.loc/about - (static page)
site1.local.loc/contact - (static page)
Since 'Works' is my posts page where I keep putting in content, I changed my permalinks for this site to:
/works/%postname%/
However, when clicking on 'view post' at the end of posting anything, it leads me to a '404' page which means there is a disconnect. This is also the case for viewing any page. Is my .htaccess file faulty?
How do I solve this? Also how do I make all my posts appear in my 'Works' page (as in, how to make that page the posts page?)
Thanks!
Updated: I've found out that I get a 404 for any page that I create for a site in a wordpress network.
You do not have to touch .htaccess file.
Make a custom post type that is called works. All those posts made in that custom post type will have that url that you desire. There is no other way to do it. (even if there is, it must be dirty) That is celanest way, and since wp does it by itself you can expect that nothing will go wrong wnen you update, install plugins, etc.
Create a category called "Works" that would then show all posts added to that category by simply going to /works/ all posts would then be shown as /works/post-name/.
You will need to change the permalink structure to /%category%/%postname%/
Check this in administration
Settings > Permalinks > Post name
I have a page template set up as the front page but it's not loading for some reason. I've done this plenty of times in the past just fine.
I should be getting a body class of "portfolio-page-template" but rather I just get the regular "page-template".
I've tried resetting the permalinks, deleting/recreating the Portfolio page, changing back to the default theme and changing back, and still no dice.
Anybody know of a fix?
Need more info.
Did you save it as home.php did you override it in the settings? http://img.lajlev.dk/5a842c1e3dc470468c322af0fe79c004.png
Had a similar problem, and while it’s not an eloquent solution but when my working home page template started defaulting to my taxonomy.php template without reason, I tried all of the things you mention and then:
deleted the taxonomy template,
deleted the .htacces and refreshed the permalinks
selected and set the page-template-home.php again
noticed all was well
put my taxonomy template back and surprise - everything worked
very strange.
If this is not your issue, I can give you a few pointers on what to check for when setting up a custom page template, and what to check for if it fails.
Check the status of theme path or theme sittings