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.
2
votes
2answers
1k views
custom taxonomies on permalink
is it possible to bring custom
taxonomies to permalink?
currently my permalink is looking
something like this
/%postname%/%category%
but i also want to add custom
taxonomies to ...
2
votes
2answers
1k views
Filtering categories in the permalink structure
Using /%category%/%postname%/ for the permalink I get a URL string of all the categories that the specific post is included in.
I would like the categories in the url to be filtered down to only one ...
1
vote
3answers
479 views
single-type.php not working, delivering 404
I've created a custom post type, and have successfully added a few entries. I can call these entries out with query_posts() to show on the front page, but the_permalink() on each of them just sends me ...
1
vote
2answers
1k views
URL rewrite based on a custom field value
I'm working on a migration from another CMS to WordPress. The old site had terrible SEO-unfriendly URLs in the format http://example.com?lid=1234.
We have imported all the posts from the old site ...
1
vote
3answers
125 views
How to call a plugin function from index.php
I have created a function in my plugin myplugin with the name foo, how to call it from the frontend?
e.g. index.php?
1
vote
2answers
316 views
Does WordPress Change the .htaccess File When Updating?
I've just implemented a new WP website, replacing an older hardcoded HTML site. I will be adding 301 redirects in the .htaccess file to point the old URIs to the new WP Permalinks.
My questions is, ...
1
vote
1answer
749 views
Function to get permalink of custom post type archives?
Is there a function that will return the permalink to a custom post types archives that is available to use in WordPress?
Something like:
get_cpt_permalink("events") which will return ...
1
vote
3answers
756 views
Category archive by year with permalink support /category/YYYY
I am currently looking at creating a new type of site archive within WordPress that allows users to filter by category AND by year rather than the default category OR year.
I am hoping to build a ...
1
vote
4answers
324 views
How can I force WordPress to redirect to canonical permalinks?
In WordPress 3.1 a post can be reached a number of ways, for example each one of these takes you to the same post (where /id is the base)
http://myblog.com/id/1008
http://myblog.com/id/1008/my-slug
...
1
vote
1answer
67 views
why does anchor name add a slash to url?
I am trying to do what should be some the most basic html, but it's not working for me. Here is my code:
<a name="rocket"></a>
<div>
<h3>The Title</h3>
<p>some ...
1
vote
3answers
927 views
Get page permalink without wpurl
I currently have an ID of a page that I want to use its permalink as the front of a permastruct of a CPT I'm setting up.
Now I can use get_permalink() but that returns the full URL:
...
1
vote
2answers
127 views
If the only permalink setting is %postname% what happens in the case of old duplicates?
I am tempted to change my blog to be site.com/postname.
I know that for new posts Wordpress is smart enough to add a unique number to them, but what about old posts that would get updated?
I can run ...
1
vote
3answers
235 views
wordpress upgrade has broken my permalinks
I have just upgraded my wordpress installation from 3.1 to 3.1.1 and my custom structure permalinks are now broken,
The permalinks were set to follow this procedure,
/%category%/%postname%
...
1
vote
1answer
2k views
Changing permalink changes stylesheet path?
I have changed my permalink structure to /%category%/%postname%/.The links are working, but the problem is that my style.css is not working in some of the posts which are inside the category.
1
vote
1answer
943 views
Move WordPress site from one domain to another
I've read through the codexs and I'm trying to find out the best way to change or move my MySQL and subdirectory files to a new domain without extraneous effort. For instance, I built a stage site ...
1
vote
1answer
179 views
How do I prefix blog post urls as mysite.com/blog/%postname%/ but allow authors to still be located at mysite.com/authors/%nicename%?
I've tried a bunch of things but cannot find a solution that works.
I want my site to have the structure:
mysite.com/ = homepage
mysite.com/blogs/ = blog archive
mysite.com/blogs/year/ = blog ...
1
vote
2answers
203 views
Is there a wordpress function that I can use to retrieve the current page that is loaded?
Suppose that I create a page in the admin section (under 'Pages') and I have permalinks turned on and this pages slug is 'my-new-page', then is there a WordPress function that will work outside the ...
1
vote
1answer
707 views
How can I reverse engineer a Permalink to Find the Page?
I am new to WordPress, and I need to make some quick changes.
How can I find the Page that is referenced by a permalink: e.g. for www.example.com/mypermalink how can I locate the actual WP Page so I ...
1
vote
2answers
1k views
mod_rewrite enabled but Permalinks show index.php
I just installed a friends blog on my LAMP stack, which has mod_rewrite enabled (I'm using it for clean URLs on my Drupal installs on the same server). For some reason, WordPress (3.0.3) isn't ...
1
vote
2answers
384 views
Combine Multiple Categories Into One URL Slug
I have a Wordpress website with 20+ categories. To make it easier to navigate I want to decrease the categories, but at the same time keep the original categories. In other words I want to be able to ...
1
vote
2answers
692 views
How to modify URL structures in custom post types and taxonomies or terms
I am well aware that there are several posts covering the topic of customizing the permalink URL structure of custom post types, custom taxonomies, and taxonomy terms. However, none of them are real ...
1
vote
2answers
289 views
Get closest page ID from URL
Lets say on my WordPress website I navigate to:
www.example.com/media-centre/news/17/an-example-news-post
In this case I am looking at a post in a CPT called News.
What I want to do is get the ...
1
vote
1answer
4k views
Rewriting a custom-post-type permalink with taxonomy term?
I'm trying to rewrite my url for a custom_post_type named wr_events with one of its custom_taxonomy terms from event_type
add_action('init', 'wr_events');
function wr_events() {
...
1
vote
1answer
286 views
Is the '/category/post-name-date/' permalink structure okay?
Wordpress Codex says: Make sure to end your structure with either
%post_id% or %postname% (e.g. /%year%/%monthnum%/%day%/%postname%/) so
that each permalink points to an individual post.
But ...
1
vote
1answer
1k views
“.#[random-char-string]” being inserted at end of URLs
I've seen this on a couple of sites now and I'm having trouble finding information about (probably because it's awkward to describe):
All internal URLs like this for example:
...
1
vote
1answer
356 views
How Do I Programmatically Force Custom Permalinks with My Theme?
I'm making a custom theme. It's a highly specialized theme to make WordPress into like an application rather than a CMS system or blog. For instance, a Dental Office Scheduling System (with CMS and ...
1
vote
2answers
445 views
Can't change permalink url after hitting 'ok' and 'update'
I am trying to change some of the titles of my posts and their respective permalinks. After I edit the title and permalink and click 'ok', the permalink appears to have changed temporarily. However, ...
1
vote
2answers
2k views
Removing taxonomy base using WP rewrite
I´m trying to create the following URL structure:
example.com/attractions <-- post type archive
example.com/attractions/taxonomy_term <-- taxonomy archive
...
1
vote
5answers
2k views
How do I get the permalink of a custom post type?
I can get the permalink of a specific post tag or category, but what if I want to get the permalink of a custom post type? I can't find anything in the Codex or anywhere else about how to do this.
1
vote
1answer
72 views
Permalinks - Different structures for different categories?
Currently I use /%category%/%postname%/ as my permalink structure. However, I would like to have a different structure for different categories. This is because I have a "News" blog that I would like ...
1
vote
1answer
409 views
Custom Permalinks don't work on local LAMP installation
I'm on Ubuntu and using LAMP for local dev. I've several WordPress installations for different project and tried to set custom permalinks on all of them, but only default permalink setting ( ...
1
vote
1answer
627 views
Specifying multiple categories in URL (permalink)?
For example: http://www.example.com/dell/studio/studio-1558
where dell and studio are categories
A few months back I heard from someone that it is not possible. I need to know why? Which part of code ...
1
vote
1answer
388 views
How to change Post ID during import
I'm importing posts from a Joomla v1.5 site using http://wordpress.org/extend/plugins/joomla-15-importer/ (The goal is to clone the site in WordPress then switch off Joomla)
On both sites the ...
1
vote
1answer
180 views
Author page doesn't change after username change
I changed my user profile name with WP-Optimize from 'admin' to 'indie' (not really 'indie', just to show you better) but author page still is available only trough example.com/author/admin - not ...
1
vote
2answers
714 views
How do I fix permalinks for custom post types that has the same slug as a page?
I know that it's impossible to have the same custom post type slug as a page.
So, I thought it might be resolved in this way:
'rewrite' => array('slug' => 'my-category/!#') for ...
1
vote
4answers
2k views
After server migration only the homepage works
I have recently changed hosting of my WordPress site to VPS.net. I have moved all of my files and imported the database. Everything appeared to be fine until I clicked a link and noticed that all of ...
1
vote
1answer
715 views
Permalinks not working using wordPress Networking with custom post types
Hay All, I've setup a WordPress network and have a couple of websites. Within these 'sub-websites' have a created a new custom post type called 'courses'. When i create a new 'course' a sample ...
1
vote
1answer
867 views
wordpress wp_list_categories
i'm using wp_list_categories like so:
<?php
//list terms in a given taxonomy using wp_list_categories (also useful as a widget if using a PHP Code plugin)
$taxonomy = ...
1
vote
4answers
1k views
Remove Custom Taxonomy Base
I am using custom taxonomies with WordPress 3.0.4
I am wondering if anyone knows how to remove the taxonomy base from the URL?
I have seen plugins that do it for categories and tags, but not for ...
1
vote
1answer
829 views
Is there a way to use regular categories with custom post types?
Is there a way to use regular categories with custom post types? It seems like there is better functionality and options with regular categories (such as permalink options, etc.).
1
vote
1answer
2k views
How to reset canonical URLs / fix redirect loop
Couldn't find anything in the related questions, so here goes:
I have a post which, when viewed on the site, is returning a redirect loop. The error page is showing an address for the post that ...
1
vote
1answer
27 views
Permalink redirection from 'Day and name' to 'Post name'
In my blog, I used the Day and name permalink structure for many days. Recently I came to know the SEO tips and made the permalink structure to Post name.
So I migrated from:
...
1
vote
1answer
79 views
How to get the url to tag & category base set by the user?
I'm searching for half an hour now on how to get the url/permalink base in Wordpress (the 'category' and 'tag' value set in the backend). Could you please point me in the right direction?
I want to ...
1
vote
1answer
77 views
Add a css class to a taxonomy permalink
I need to add a css class to every <a> element retrieved by the_terms() (or similar function) in order to open the taxonomy permalink in a fancybox modal window.
I've been searching this whole ...
1
vote
1answer
33 views
Post incorrectly displaying as page
I have a small WordPress install that I'm setting up, and have run into an issue that I've encountered before, but do not understand the cause.
Issue:
With permalinks set to /%postname%/, on a site ...
1
vote
1answer
61 views
Problem with wordpress links on a live site
I am trying to create a website at the following link: http://www.knowthelaw.in/
The website was created with wordpress using the twentyeleven theme. The problem I am facing is as follows:
As ...
1
vote
1answer
213 views
Parent Category link to its sub categories on different page
I am creating a magazine style wordpress site. We have multiple issues which will be parent categories and these will have around 3-5 sub categories. Every quarter we will create a new issue with new ...
1
vote
1answer
592 views
Custom permalink for search and pagination
@Chip Bennet helped me out in a previous question and posted his entire pagination function. This function works perfectly fine for me but I'd like to have custom permalinks in german.
/**
* ...
1
vote
1answer
655 views
Get Permalink without domain (i.e. get relative permalink)
This is the code I am using:
<?php echo str_replace( home_url(), '', get_permalink($post->ID) ); ?>
What it does is output the permalink as a relative URL i.e. only the slug. For instance, ...
1
vote
1answer
102 views
How to prefix post permalinks with /blog/ - without affecting custom post types?
I have several custom post types, which are properly structured as /%post_type%/%postname%/, however I wish to have the same effect for regular blog entries: /blog/%postname%/
If I prepend the ...
