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/
Related
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. :)
My current blog is www.bostonsbettah.com and my current permalink set-up is http://www.bostonsbettah.com/%category%/%postname%/
Now, in a perfect world, the a post should appear as something like www.bostonsbettah.com/bostonbruins/boston-bruins-1st-line-playing-like-a-1st-line/ and that should take you to the post. When I click on the page title at the top such as "Bruins Blog", it should take me to www.bostonsbettah.com/bostonbruins/ that has an archive of all posts categorized as "Bruins". Currently, however, every page besides the home page is a 404 error.
Now I know I can fix something in the .htaccess file and I know how to access it, but I don't want to mess with it as I don't know how to code. Is there a fix someone can provide that will allow me to fix my website? Thank you in advance.
Never,ever,ever put your blog URL inside custom permalink structure!. You must use one of the structure tags, or a combination of tags only.
Read the documentation first.
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 slight problem... we made a change to our url structure the other day and have broken links all over.
What I did was change links from:
http://blog.mydomain.com/articles/123
To:
http://blog.mydomain.com/articles/this-is-a-smaple
Is there anyway to direct any links linking to the pages ID number to the postname????
The old url structure is still being published throughout our RSS feed on facebook. So I am trying to catch those people that are or maybe clicking on our links on our facebook posts and redirect them to that posts postname url? Does that make sense?
Thanks and help would do
Matthew,
You can use the Advanced Permalinks plugin. It'll redirect old permalink structures to the correct posts. Checkout the description on the plugin page.
In your new URL handling code, check to see if everything after the last slash is decimal numbers, if so, use the old URL handling code.