Tagged Questions

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.

learn more… | top users | synonyms (1)

1
vote
0answers
1k views

How to make permalink structure %category%/%postname%/ work for custom post type?

I'm trying to achieve the following permalink structure for a custom post type called "concept" with taxonomy "category" http://domain/categoryname/conceptname Note: The main problem here is I ...
0
votes
1answer
115 views

Pretty links for PHP pages above WP /blog directory?

I've made a new WP installation in a subfolder /blog, set up with "Post name" permalinks. I'm ready to make several other non-WP website PHP pages which would reside above the /blog directory. I was ...
0
votes
1answer
84 views

Image format not using single-image.php

I am trying to isolate a particular post format for images, and reading the Codex, I thought it would be possible to create a new template file single-image.php. However, that file is not being used. ...
0
votes
1answer
224 views

Confusion about how a URL is being parsed

I have a permalink that leads to some custom content like: http://mysite.com/extra-deal/91103/ That will take you to a page that is handled by the file: category-extra-deals.php On that page I ...
0
votes
2answers
141 views

Template files for Custom Post Type and Taxonomy

I've got a custom post type called "properties" and two custom taxonomies called "type" (office space, retail space, etc.) and "location" (new york, chicago, etc.). I have created ...
0
votes
0answers
31 views

I keep getting 404 Error when I attempt to view blog in single view

I'm a newbie to Stack Exchange. Hoping to get some answers now and again and maybe help out as well. My question is, I have (2) blog posts, and for some reason the latest one gives me a 404 Error ...
1
vote
2answers
580 views

Prevent page slug from interfering with custom post type archive permalink?

In my plugin, I'm creating a custom post type that has an archive and uses the rewrite parameter to choose a slug: $args = array ( 'public' => true, 'has_archive' => true, 'rewrite' ...
2
votes
1answer
149 views

Problem duplicated shortlinks bitly

I've this plugin to create shortlink using the bitly API, but there's a problem! function yoast_bitly_shortlink($url, $id, $context, $allow_slugs) { if ( ( is_singular() && !is_preview() ...
1
vote
0answers
90 views

Using arbitrary paths in page urls

I have been looking all over the place and maybe I'm just searching the wrong terminology but I need to be able to allow an end user (completely non-technical) to add an arbitrary path to the url ...
0
votes
0answers
654 views

Adding rewrite rules to Custom Post-type mixed with Taxonomy

I turn to you because I can not find any solution to my problem. I created 3 custom post types "Actualités", "Dossiers", "Vidéos" (I'm french :D) I created 1 taxonomy: "Thématiques" with the ...
0
votes
2answers
589 views

remove custom post type permalink

I've registered post type with following -- $holidayLabels = array( 'name' => __( 'Holidays'), 'singular_name' => __( 'Holidays'), 'all_items' => __( 'All Holidays'), ...
1
vote
2answers
1k views

Permalinks: custom post type -> custom taxonomy -> post

I am having trouble working with wordpress' rewrite rules, and could use some help. I have a custom post type called shows. All shows have a single custom taxonomy category show-category. A show ...
2
votes
2answers
85 views

When is it a good idea to build a permalink structure from scratch?

Is it a good idea to design a permalink structure from scratch? The requirements to the structure are as follows: Pages to be referenced by their structure ...
0
votes
1answer
84 views

url for posts for a date within a category

I am trying to create something like a newsletter. I'd like to show a set of categories with hyperlinks. however, I want to restrict that to the specific date. Clicking on the hyperlink will show ...
0
votes
2answers
145 views

stripping tags from excerpt in Wordpress is not working

I am using this snippet <a href='<?php the_permalink() ?>' title='<?php echo strip_tags(the_excerpt()); ?> with which I am intending to remove all ellipses, <p> tags and other ...
1
vote
2answers
88 views

Avoid Wordpress categorizing a permalink request as Not found 404 Page

I've been looking all over the web for something like what I need and I haven't find anything resemble not even similar, the thing is this: I got a Page Template to a simple page post type, let's say ...
0
votes
0answers
177 views

Changing /author/ link to something else: what is a better way?

Is there a better way than this snippet I am using? function change_author_permalinks() { global $wp_rewrite; // Change the value of the author permalink base to whatever you want here ...
0
votes
2answers
244 views

Post titles and thumbnails as links to custom post types?

I am struggling with the php structure. How do I need to rewrite the code to get the links to the titles and thumbnails of the custom posts? <ul class="thumbnails"> <?php $pfportfolio = ...
1
vote
1answer
157 views

Random Alphanumeric Key URLs

I need random (and unique) alphanumeric permalinks. I've looked at several plugins but they all seem to do some form of redirection to a longer URL. That's not what I want, I want the permalink to be ...
0
votes
1answer
48 views

localization for Permalink

Originally, wordpress creates permalink like /2013/07/ , /archives/123 here I want to localize with my native numeric numbers . is it possible to do like that ?
1
vote
1answer
208 views

Removing subcategories from permalinks [duplicate]

I run a small news site with tens of thousands of entries. I'm currently importing all of these into wordpress by rebuilding our old CMS into wordpress. So far, everything is coming over smoothly. ...
1
vote
2answers
151 views

Wordpress not opening posts with only numbers if permalink is post_name

Someone knows why this happens? For instance, I have a post called 1987, but it does not open it when I click on the link. When I use a different permalink structure, it opens it. Why is this and how ...
0
votes
1answer
30 views

Incorporate single WordPress page into an existing static website [duplicate]

I have a static website and I recently created one single WordPress page, or template, that I am trying to incorporate into my existing static site. I am having trouble. My single WordPress page looks ...
2
votes
1answer
123 views

Regex in add_rewrite_tag not accepting OR operators?

I am trying to add a custom field to the post permalinks by using a combo of add_rewrite_tag and applying a post_link filter. What I am aiming for is something like this: ...
0
votes
0answers
90 views

Remove blog slug from WPMU?

i have wordpress MU, everything is fine in child sites , but in the main site in the permalink structure have been changed itself , mean that after the site url it have like http://example.com/blog , ...
3
votes
2answers
2k views

Remove the blog slug from Wordpress Multisite root node

I have been looking at whether it is possible to remove the blog from the post & caetegory URL's in a multisite setup on the root node. I have found the Multisite sites settings and removed the ...
0
votes
3answers
272 views

WordPress keep redirecting me to random URLs

When I go to my homepage, http://example.com, I sometimes get redirected to http://example.com/SXKSLW/ or some other random URL along that pattern that yields 404 page. I do not remember doing ...
0
votes
1answer
94 views

What is the proper way implement a global $wp_rewrite?

The below code works correctly, but I don't know if it is proper coding. Can anyone confirm or comment on the code? add_action('init', 'news_rewrite'); function news_rewrite() { global ...
0
votes
1answer
30 views

Permalink / sub-template issue

I've got a WP page with many subpages with their own template. The main template includes them. Each element with its own template can be received with an id and an anchor that is linked to this idea, ...
0
votes
2answers
76 views

Is it possible to remove the word “date” from archives?

I can't figure out how to remove the word "date from the permalink for yearly archives. For example: [http://localhost/wordpress/news/date/2012] On single news pages the permalink looks like this: ...
1
vote
1answer
342 views

WP Site in subdirectory Joomla! Site - Permalinks not working

I have WordPress in a test folder inside the root directory where I Joomla! 3.x site is running. Somehow the Joomla! rewrite rules are interfering with the WordPress permalinks rules. I keep on ...
1
vote
0answers
179 views

Multiple post categories - single permalink

I created a post which is assigned to multiple categories. Eg: I have a post "My Post", and I put it in "foo" and "bar" categories. Now my article will have two permalinks, "/foo/my-post" and ...
1
vote
0answers
201 views

Changing a custom post type “has_archive” after registered

Ok, I've seen some similar posts on how to change a custom post type's attributes after it has been registered (in my case, I'm trying to modify a custom post type created by a plugin without ...
2
votes
1answer
104 views

Put a link to a category round a hard coded A HREF

In my footer I have hard coded the links and would like to link some to there category, I could just copy the full URL to it and paste in the href="" but I would rather call it using php. My ...
0
votes
0answers
64 views

first load of the page gives 404 error

I'm having problem loading the page first time on my browser. For example if I load the page from a link it gives me 404 error but when I refresh the page It works perfectly. Any ideas on how to ...
0
votes
3answers
383 views

Force Wordpress to Show Pages Instead of Category

I am trying to create a SILO structure on one of my WordPress site. I have always checked this option on Yoast SEO plugin "Strip the category base (usually /category/) from the category URL." So my ...
4
votes
1answer
106 views

Pretty Permalinks

I've created my own search functionality which basically finds the nearest store closest to the entered postal code. My URL for the search currently looks like this ...
2
votes
3answers
154 views

Wordpress within specific sub-directories, implicitly not root

I have an existing application running at my website root now. Using .htaccess, would it be possible for a single Wordpress installation to manage sub-directories? For example, /press/, /careers/, ...
0
votes
1answer
447 views

add_query_arg() for custom post type on all visible links

I am trying to add add_query_art() $GET['var'] to auto filled form field. I have custom post type call career and want to auto filled field for the Position so url I want is ...
0
votes
1answer
1k views

remove “index.php” from permalinks

I have been trying to find a solution. but I can't.. my links are all domain.com/index.php/post_name/ I really want to remove "/index.php" I have searched and found some... saying I need to add ...
0
votes
1answer
198 views

Custom Permalinks for Custom Post Types and Taxonomies

I've been struggling with this for hours. I'm trying to get this URL structure: example.com/business/%custom-tax-name%/%custom-post-name%/ By custom tax name I don't mean the name of the taxonomy ...
1
vote
0answers
60 views

set permalink for CPT

I have a CPT and two custom taxonomy I registered. I also registered the taxonomy for the CPT. This is my register code: $args = array( 'labels' => $labels, 'public' => true, ...
2
votes
0answers
149 views

How to remove slug from hierarchical custom types in 3.5.2

I know that is not suggested and that there is lots of discussion about this argument out there. Unfortunally, after a week of trying and tests, I have not managed to remove the slug from my custom ...
0
votes
0answers
46 views

Pagination is not working, how to trace it properly?

Suddenly a website of my own started to doing this: pagination links jumps homepage, www.mysite.com/page/2 >>> www.mysite.com Pagination generator works correct, but WP wont show, How to ...
1
vote
1answer
325 views

How to display comments on different page

I am creating a reviews site and I want to display the customer reviews (comments) on a separate page from the single-restaurant.php. I'll just have a link that says (Read reviews/ add yours). I ...
0
votes
2answers
441 views

“Custom Post Type Permalinks” plugin URL strcuture

I've found this great plugin Custom Post Type Permalinks by a Japenese developer which is awesome at generating hierarchical permalink structures for Custom Post Types. Only I'm having an issue which ...
0
votes
1answer
88 views

How to remove permalinks links presents in each page of my site?

I have this WordPress static site: http://www.saranistri.com/ As you can see at the end of each page there is a link named Pemalink into a box. I want to remove this box and this link. Can I do this ...
3
votes
1answer
467 views

Menu Link Redirect Based on Username or User ID

I am building a client portal where my clients can log in and see all their pending projects, completed projects and create new projects. Though I'm stuck at the start. The dropdown menu is called ...
0
votes
1answer
98 views

Pretty Permalinks cause site to crash on main domain

Here is the problem I am getting in a nutshell. Pretty Permalink + Main Domain = Site goes down Immediately. MySQL gets hammered. Pretty Permalink + Sub-Domain = Site is up No Permalink (default ...
0
votes
1answer
420 views

Permalinks not working

I know, asked and answered a million times. For the life of me I can't find my error. Trying to set up Permalinks to use post name, /%postname%/ Trying to visit anywhere else other than the homepage ...