A uniform resource locator, abbreviated URL, also known as web address, is a specific character string that constitutes a reference to a resource.

learn more… | top users | synonyms (1)

17
votes
6answers
3k views

Detecting a WordPress URL without doing a full HTTP GET?

I'm trying to write a oneboxing routine that gives WordPress blog entries special treatment. So given a simple, unadorned URL in content, such as ...
12
votes
4answers
11k views

What's the difference between home_url() and site_url()

My understanding is that site_url() returns the location where the wordpress core files are. So, if my blog is hosted at http://example.com/blog then site_url() returns http://example.com/blog But ...
10
votes
4answers
2k views

Unwanted media library URLs in posts?

When doing a bit of Google searching for content on our blog, I noticed to my shock and horror that individual images from the Media Library are somehow generating their own URLs that Google is ...
10
votes
2answers
1k views

Symbolic Links on dev box with plugins and stylesheets

I'm using mac os x 10.6 with xampp. http://wp3.1/ is the url to where I have WordPress installed. The physical path is /Users/myUserName/Sites/wp3.1/ I do not install plugins or themes in the ...
8
votes
1answer
1k views

Does WordPress keep track of a post's URL history and provide automatic redirects?

I just changed the URL of one of my posts from http://2011.denmark.wordcamp.org/session/theme-frameworks-trends-og-standardisering/ to ...
7
votes
2answers
413 views

Which asset URLs are acceptable in a “vanilla” MU install?

Wordpress appears to let content be addressed by many URIs in an MU install. For example: example.com/wp-content/blogs.dir/5/files/picture.jpg example.com/bob/files/picture.jpg ...
6
votes
3answers
10k views

How do I get the avatar URL instead of an HTML IMG tag when using get_avatar?

I'm using a plugin called Simple Local Avatars which lets me upload author images which are stored on my server locally (no Gravatar). The plugin works fine and get_avatar returns the local avatar. ...
6
votes
2answers
2k views

Override default url for author pages?

So the default url to display a list of posts by a particular author looks like this: http://domain.com/author/{username} I am wondering how to change the 'author' in that url to something else? I ...
6
votes
3answers
4k views

Add .html (dot HTML) extension to custom post types

Is there any way to add the .html extension to custom post types without plugin ? For posts I can use /%postname.html on the permalink settings For pages I can use: add_action('init', ...
6
votes
2answers
2k views

How to Change 404 page title

i have try many methods after searching on internet but unable to ramove Nothing Found from my 404 page title how to do it please help me even i have us this in my 404 page header if( is_404() ) ...
6
votes
2answers
2k views

How to prevent apostrophes and quotes from appearing in permalinks?

I'm using custom permalinks "/%category%/%postname%/". Whenever a post title contains quotes or apostrophes they appear in the URL. Can someone tell me how prevent them from appearing in the slug? ...
6
votes
3answers
7k views

How to add a Custom Link to a Menu with an URL that is relative to the blog URL

Part of my work is to create Wordpress websites. I usually work on my laptop until I have something good enough to be uploaded to the test server where the client reviews it. I create a VirtualHost ...
5
votes
1answer
2k views

Programmatically get images by URL and save in uploads folder

I am involved in a large migration from another CMS to WordPress. We have a copy of the database and have worked out how to extract the content and programmatically create WordPress posts from it ...
5
votes
3answers
1k views

Filter any HTTP request URI?

I want to filter any HTTP request URI done through the HTTP API. Use cases: The WordPress update check goes to http://api.wordpress.org/core/version-check/1.6/, but ...
5
votes
1answer
2k views

Changing attachment urls?

How can I change the format of attachment page urls from /[post-url]/[attachment-name]/ to /media/[attachment-name]/? I understand that I can override the output of get_attachment_link via the ...
5
votes
4answers
2k views

Problem with guids and absolute links

Post and page guids include the full absolute URL of my site (e.g. http://www.example.com/wordpress/?p=1). This causes a problem if the domain, or wordpress path changes, or if I'm viewing the site ...
5
votes
1answer
2k views

Use a separate upload folder for custom post attachment upload

So, i'm trying to find out a way to use two separate upload folders, being the default one wp-content/uploads for general media uploads, and another one say wp-content/custom for one specific type of ...
5
votes
1answer
430 views

How to give a CPT (custom post type) a date based url

I have events that have an event-date custom field. I want to create a date based page to display all events for a given day, and my hope was to use the url to help with that. I have a 7 day ...
5
votes
1answer
266 views

Clash of the rewrites

I have a category called 'neighborhoods'. I also have child categories within 'neighborhoods' E.G. Lakewood, Highland Park... When I click 'highland park' the url is ...
5
votes
1answer
328 views

Wordpress Permalink changes to question mark (?) in URL

My Permalink custom url is /%post_id%/%postname%/ and my website is in Persian language, for some posts the Permalink is change in URL from ...
4
votes
5answers
10k views

Redirect user to original url after login?

I have a function that redirects users to the login page (home) if they're trying to access any other page without being logged in, here's how it works: function restrict_access_if_logged_out(){ ...
4
votes
7answers
11k views

How to use relative links on my pages?

In my web pages I want to use relative links instead of absolute links. However, pages do not allow php code inside them, so i cannot do to from a url in a relative manner. How does one get ...
4
votes
4answers
11k views

Why is ?doing_wp_cron being appended to my URLs

I'm finding this string appended to the end of my URLs sometimes: /?doing_wp_cron Does anyone know what it for? How can I remove it?
4
votes
2answers
2k views

How to add category to: 'wp-admin/post-new.php'?

I want to have a link to create a new post that sets the category also. I have tried wp-admin/post-new.php?post_category=12 and wp-admin/post-new.php?cat=12, but neither worked. I also tried using ...
4
votes
2answers
1k views

Possible to change the URL for the regular post type without affecting the URL of other custom post types?

The Dilemma I have a few custom post types: Portfolio Items Testimonials FAQs The URL structures for these custom post types are: mysite.com/portfolio/name-of-custom-post ...
4
votes
2answers
166 views

Allow admin login at /admin

I am interested in: how can we change the default login url /wp-admin to /login how can we add another url for login so that both /wp-admin and /login would work I tried to use a custom filter and ...
4
votes
1answer
188 views

Multisite - sub-subfolders for certain blogs

Consolidating several blogs into a single multisite instance - we have 2 sets of blogs - active and archived. What's the best way of adding /archive/ to the URLs of the archived blogs? So, as an ...
4
votes
2answers
2k views

Preserve custom URL parameter on more pages

I created a custom URL parameter for sorting posts by their vote scores. I have a "most voted" link that sends a ?sort=most_voted URL paramater and using a query posts filter I display posts with most ...
4
votes
1answer
345 views

Display posts with author in the url with custom post types

I'm having a really difficult time with this. I have a multi-user gallery site. Each author has his own page that lists the author's posts (this is a custom post type). I have made it so that the ...
4
votes
1answer
553 views

Add forward slash on categories url (serve one version of a url)

How can I a add forward slash on categories URLs and serve only that version of a category (meaning URLs not ending in forward-slash will redirect to URLs ending in forward slash). I manage to remove ...
4
votes
3answers
822 views

Natural URL Design and static front page

A static front page and other pages which are children of it are used on a blog. To give an example: www.example.com The slug for that page shows up in the permalink for sub pages like ...
4
votes
2answers
983 views

Catch 404 after changing permalink structure from /%postname%/ to /%category%/%postname%/

I made a site some time ago and after some days some posts were indexed by search engines. Today I changed the permalink structure from /%postname%/ to /%category%/%postname%/. After that, when ...
4
votes
1answer
188 views

Which method is best to enqueue scripts

I'm currently authoring the development of a plugin for wordpress, and I'm having trouble figuring out which would be the best way to add scripts to the plugin. I'm in the process of adding more ...
4
votes
2answers
3k views

What's the URL for a category archive?

If my category URL is: /blogs/category/foo and my archive URL is: /blogs/2011/02/ what's the URL for 'foo' blogs from February 2011?
4
votes
2answers
352 views

How do I set up a custom URL shortener for my posts?

I have several different sites running off WordPress, and the URLs tend to get fairly long and cumbersome (particularly when I try to publish them via Twitter). I recently purchased a very short ...
4
votes
1answer
102 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 ...
4
votes
1answer
62 views

Run WordPress frontend and backend in different domains

I want to run my WP frontend as www.example.com and my backend (i.e. wp-admin) as user1.example.org, is it possible? The reason is I want to host lot of sites in a single server which has only 1 IP ...
4
votes
0answers
93 views

Restrict url to one segment, even when page or post is nested [duplicate]

I use nested/hierarchic pages purely for organizational purposes in the admin but on the main site I don't want a nested url structure. So if the page structure is /page/another-page/and-another-page, ...
3
votes
3answers
1k views

Force the Website URL to Include “www” and to be Upper Case?

No matter what url somebody uses to access my site, I'd like it to redirect to www.MyUrl.com. Is this possible?
3
votes
1answer
1k views

Is it safe to use $_SERVER['REQUEST_URI']?

I've looked at other answers and I see that $_SERVER['REQUEST_URI'] is usually recommended and is the accepted answer for getting the current page URI along with $_SERVER['HTTP_HOST']. I looked at ...
3
votes
2answers
836 views

Disable Wordpress URL auto complete

I recently noticed that Wordpress tries to auto-complete a URL when it's not submitted in its entirety. E.g. I have a post URL that looks like this: http://www.mysite.com/some-post-title If I ...
3
votes
1answer
2k 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: ...
3
votes
1answer
2k views

Difference between esc_url() and esc_url_raw()

http://core.trac.wordpress.org/browser/trunk/wp-includes/formatting.php#L2239 I'm confused about when should either of them be used. Assuming I have this URL: http://site.com/?getsomejavascript=1, ...
3
votes
1answer
1k views

Is it possible to use a forgot password url filter?

i recently found that a login url filter is available but i can't find a solution for the forgot password as well, for the login url i use this: function custom_login_url($login_url) { return ...
3
votes
5answers
220 views

Update URL Snippet to Canonical Permalink URL

My permalinks is in the format domain.com/post-id/post-slug I notice this is a great choice for permalinks as I can share articles with a short URL like domain.com/123 But when I go to this short ...
3
votes
1answer
886 views

Custom plugin route in Wordpress

Okay so my question is quite simple. I need to implement some custom routing rules for my plugin. Those routes would only take one argument (so nothing complicated) and would look like : ...
3
votes
1answer
429 views

Outputting Canonical Resource URLs Across a Multisite Network?

Say a theme "foo" is used on across a network of sites. In each site, all the theme resources (.css, .js, etc.) will have distinct URLs: http://network/siteA/wp-content/themes/foo/style.css ...
3
votes
1answer
172 views

Why does wordpress still strip my query var?

Im trying to pass a query var to a custom page template with pretty permalinks. So basically i have a page called "albums". And i want to pass a query var to that page called "type". So the ...
3
votes
2answers
262 views

How to build custom WP admin with custom URLs

I would like to create a custom WP admin area, that uses custom URLs to navigate thought it and have a custom generated HTML. A member will be able to login via a custom URL, for example: ...
3
votes
3answers
1k views

Force home page to be https?

I have a SSL certificate and https plugin which both work fine along with changing the Settings in the Wordpress menu to https but I have to manually enter 'https' to see the Secure version, is there ...