Questions tagged [permalinks]
A permanent link to an item (a blog post, an attachment, ...). The default structure is "?p=123", but WordPress can handle "pretty permalinks" and will rewrite them internally to the former version. If you have a question about special rewrite structures you should use the [url-rewriting] tag.
3,168
questions
0
votes
1
answer
581
views
Enabling permalinks disables custom page template
I have assigned a custom template on a page in wordpress, but it's not working anymore after I enable permalinks. Instead of the custom template, the "post-type-archive-portfolio" template is used.
...
0
votes
2
answers
4k
views
Get link of inserted media file of post within loop
Inside the loop I would like to retrieve the URL of an inserted media file of each post.
My attempt was:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<a href="<?php ...
0
votes
1
answer
9k
views
Fix 404 error after changing permalink structure
hope you are all doing good!
I have this problem. I had set "Post Name" as the URL scheme, therefore, I get www.site.com/article-title for blog entries. I've written a few test posts and I realize I ...
0
votes
1
answer
46
views
Creating a Category Taxonomy
I have this entertainment site for TV shows. I cover at least 27 shows so far. I use so many different post types for the shows and it slows down the site, I eventually want to add more shows.
I ...
0
votes
1
answer
40
views
Post/page title to permalink transformation - what is behind the scenes?
If the post name is used as the permalink, what "transformations" does Wordpress do to it when using it as the URL and when does it perform these transformations? Like stropping spaces and special ...
0
votes
1
answer
107
views
How can I add a custom permalink to a term?
How can I make a taxonomy term have a custom permalink? (on a term basis, e.g. /anything/here for a taxonomy called food and a term called burrito)
I don't think there's much more to explain so, my ...
0
votes
2
answers
847
views
How can I set up a secondary permalink structure?
So I have a situation on a site where I need multiple permalink structures. Now, I already know what you're going to say because literally every Google and SX result I've looked through says the same ...
0
votes
1
answer
484
views
External PHP file & Pretty Permalink
I'm working in developing REST API for a WP based website. Endpoint is http://example.com/api.php I've included wp-load.php in the top of the file to access WP functions etc.
However, http://example....
0
votes
1
answer
1k
views
Rewrite rule not passing variable
I have the following code in my functions.php file, and it simply will not work to return the value passed via the URL. This is the code below:
function custom_url_source() {
...
0
votes
1
answer
91
views
How to enable http (not just https) in wordpress?
My wp-config.php file contains
define('FORCE_SSL_ADMIN', false);
but all my permalinks are https: by default.
I want the site to be accessible by http. What do I need to change please?
0
votes
1
answer
3k
views
Permalinks using event date (year & month) instead of publication date
The site http://www.bikefun.org is live and working, but the permalinks are not quite right. It is an event calendar site. Events are stored as a custom post type "bf_events", with dates stored as ...
0
votes
2
answers
97
views
WordPress Custom URLs
Based on the link maioman posted, below I have revised this question:
I am having trouble getting a custom post type/taxonomy to work. I want a custom post type of Episodes, and the taxonomy for the ...
0
votes
2
answers
2k
views
Redirect year month day postname permalink structure to category postname structure
I have a Wordpress site with a /%year%/%monthnum%/%day%/%postname%/ permalink structure, and now the client wants it changed to /%category%/%postname%/.
How do I do a generic redirect for the old ...
0
votes
1
answer
3k
views
Redirect to post after publish or update a published post
How can I get the permalink of a post from functions.php in my theme? I know this code:
get_permalink($post->ID);
but this produces something like this:
mydomain.com/index.php?p=123
and I need ...
0
votes
1
answer
22
views
Which is the neatest way to have homepage articles and a blog?
I have a homepage that should display a few different posts from different categories. I use the "Stick this post to the front page" option to this matter and each post permalink looks like http://...
0
votes
1
answer
732
views
How to set "with_front'=>false" to a plugin-generated cpt?
I am using an external plugin (not my own CPT) to manage events on a site where the blog permalinks structure is /news/%category%/%postname%/
Normally for CPTs I could set the prepend with front to ...
0
votes
2
answers
1k
views
Custom permalink structure only saves with index.php inserted
So I'm having this weird issue on the dashboard where custom permalinks only (default, day and name, month and name etc. those all work fine) doesn't save. I can choose the radio button and click "...
0
votes
1
answer
7k
views
Why does enabling Permalinks make pages not found?
I'm new to Wordpress and am creating a site using v3.9.1 of WordPress. When I create a new page, I can see it in edit mode, but the URL it is supposedly creating is not found when permalinks is used, ...
0
votes
1
answer
89
views
Setting a homepage - doesn't seem to work
have a page (home) that runs a template page-home.php that I can access at mydomin.com/home. I am wanting to have this as my static homepage page, so accessible at mydomain.com/ however I cannot seem ...
0
votes
1
answer
36
views
Can I access Posts of custom-fields via URL?
Is there a way to access all posts where the value of a given custom field is concurrent? like you can access all posts of a category like this:
http://yoursite/category/<category-name>
so I ...
0
votes
2
answers
1k
views
When WP_Query only returns 1 post, how do I automatically redirect to that post?
I've been searching around for a few hours now and can't figure out how to do this. Seems really simple. I've seen lots of redundant examples on how to redirect to a single post when a search result ...
0
votes
1
answer
51
views
Wordpress Permalinks 404 bug with "next" button
I have changed wordpress to use permalinks for post names. /%postname%/ so that they are in the form wordpress.com/sample-post.
The permalinks work great but it messes up the "next" and "previous" ...
0
votes
1
answer
73
views
CPT, meta-data, url parameter
does someone could point me a lecture that could explain me how to create some "filter" passed by pretty link ?
Let me explain my self, I have a custom post type called "spectacle" and I have a ...
0
votes
1
answer
3k
views
category link not working for a specific slug, works for others
I have setup several categories and set the permalinks to /%category%/%postname%.html with a category base of . to remove "category" from the url.
All categories are working except for one with the ...
0
votes
1
answer
330
views
Combine category AND custom taxonomy in permalink structure
It seems like this question has been asked not infrequently, but I still can't make heads of it. I followed the Rewrite API Guide to look at how to merge, but I want something like this:
Category = ...
0
votes
1
answer
2k
views
Passing variable as permalink URL
I've been trying to adapt the rewrite functions described here with little success:
Passing variables through permalink structure
WordPress
permalinks and custom $_GET Variables
The structure of the ...
0
votes
1
answer
669
views
Two custom taxonomies in permalink structure
I'm struggling setting up custom permalink structure with custom taxonomies. I've read many questions/answers here but I can't get it to work (most frustrating is that I don't know of a way to debug ...
0
votes
1
answer
433
views
How to get raw unwritten querystring
Without permalink enabled, the urls look like ?p=1 and when permalink is activated it's the postname that appears... question .. isn't this a rewritten version of ?p=1 ..
When I use $_GET['p'], ...
0
votes
1
answer
295
views
What is with the one month time limit for sub directory installs for multisite network?
http://codex.wordpress.org/Before_You_Create_A_Network
If you scroll down to the bottom you see:
You cannot choose Sub-directory Install (for a path-based network) if
your existing WordPress ...
0
votes
1
answer
156
views
Need to return a string as permalink insted of str_replace
I'm using this code to get a alphabetic list of CPT's at my site. It's great and works perfect.
One problem, the snippet returns urls as a string, tha just converts the_title to a slug, and that does ...
0
votes
1
answer
2k
views
Change permalinks for custom post type based on taxonomy term
I have a custom post type 'profile'. Each profile can be one and only one of either student, staff or alumni, which is set through the 'profile_types' custom taxonomy. This gives me permalinks of:
...
0
votes
1
answer
54
views
Forward an old url rewrite scheme to a new one?
I have the following url rewrite for custom post type:
add_rewrite_rule(
'event/([0-9]+)',
'index.php?post_type=event&p=$matches[1]',
'top' );
Due to a site structure change, I'll be ...
0
votes
2
answers
1k
views
Wordpress theme showing blank page
Something is wrong to my installed theme, because when I am clicking on Visit Site than its showing blank page.
No error and no content, no navigation nothing to display.
There is link below :-
...
0
votes
1
answer
64
views
Blogger To WordPress Permalink Redirection
Is there any way to redirect following or anything permalink like this:
http://www.example.com/2014/02/post-title.html
to
http://www.example.com/2014/02/post-title/
Any link with a .html in the ...
0
votes
2
answers
2k
views
Can't get the previous and next posts permalink
I tried to get the next and previous URL, and create a navigation. But it seems to only retrieve the permalink from the two first posts (but not the others recents posts).
I have 5 posts (ID = 25, 86,...
0
votes
2
answers
1k
views
get_permalink() gives a certain page link only. how to solve this.?
the_title('<a class="" href="' . get_permalink() . '"><h1 class="">', '</h1></a>');
anywhere if I use get_permalink() it's just giving myblog.com/about_us
eg: the above code ...
0
votes
1
answer
158
views
Wordpress Permalink
I need to make my wordpress permalink like the following
Permalink For Category:
www.mydomain.com/category/%category%
Permalink For Posts:
www.mydomain.com/category/%category%/article/%postname%
...
0
votes
1
answer
2k
views
How to setup a permalink structure for a custom post type
I would like to know the correct way to setup the permalink structure for a custom post type.
Is there any attribute I am to set when I run a register_post_type() ?
e.g.
custom post type: product
...
0
votes
2
answers
1k
views
How to Force HTTPS on a WordPress and remove HTTPS from permalinks
I have recently secured SSL certificates for my website and I would like to force HTTPS for all visitors.
And i want to remove HTTPS From permalinks
Like this
<link rel="canonical" href="http://...
0
votes
1
answer
3k
views
Changing permalink settings causes 404
I would like to have permalinks of the form http://localhost/mysite/sample-post/. I tried to achieve this by changing the permalink settings in the admin panel to 'Post name' from default. But this ...
0
votes
1
answer
39
views
new page redirect to old page which had the same permalink
I had a page on /features/
and a newer page on /features-2/
I wanted the newer page to get the more pretty slug /features/
So i did the following:
/features/ => /features-old/
/features-2/ => /...
0
votes
2
answers
6k
views
Main blog page works but title says Page not found
Here's a strange one. I've been developing a site, including a custom template that I originally worked up from the functionality of the Naked theme. The site has no public blog at the moment; the use ...
0
votes
1
answer
2k
views
How to keep the /blog slug even in single post slug
I have a simple website on wordpress (latest version), assume example.org.
I wanna have the user posts at something like example.org/blog/username/posttitle.
So I need some levels:
1) example.org/...
0
votes
1
answer
3k
views
How to replace permalinks
I have exported and imported my wordpress project into live server. Now the problem is I have permalink structures as "localhost" format.
When I click on any links in my website it redirects me to ...
0
votes
1
answer
379
views
Improve Custom Post Permalink Structure
I've created a custom post type, with an easy permalink structure. Now I want to enhance this permalink structure with some extra information.
public function custom_post_mission() {
$labels =...
0
votes
1
answer
155
views
How to translate "Permanent link to" text
My theme contains the following to create permalinks:
<h3><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></...
0
votes
1
answer
128
views
defining child page permalink
I have written a page whose slug is mypage. I have set it as a child of mymainpage.
However, I want that its permalink is www.example.org/mypage in place of www.example.org/mymainpage/mypage. Is it ...
0
votes
1
answer
1k
views
replacing post ID by custom post name in url
I am stuck in replacing post ID by custom post name in url.
link is as shown below:
href="'.$url.'/'.$options['applyp'].'/?pos='.$post[$i]->ID.'"
i need to replace ?pos='.$post[$i]->ID.' by custom ...
0
votes
1
answer
121
views
Permalinks with custom taxonomies and regular categories
I have created a few custom taxonmies in Wordpress (e.g. author, book, comic..). I also have a few categories using the built-in category system (e.g. news, review,...).
I try to get a permalink ...
0
votes
1
answer
88
views
Change type of permalinks on TinyMCE link dialogue
I recently ran into a problem when inserting text links into post content, and then updating the target post's slug or changing permalink options - the link in the post content won't get updated.
...