The urls tag has no wiki summary.
16
votes
6answers
2k 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
...
9
votes
4answers
1k 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 ...
9
votes
1answer
701 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 ...
7
votes
4answers
4k 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 ...
7
votes
2answers
178 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
1answer
476 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
...
5
votes
1answer
1k 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
443 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
2answers
1k 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?
...
5
votes
1answer
334 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
224 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
135 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
...
5
votes
2answers
3k 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 ...
4
votes
2answers
1k 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 ...
4
votes
3answers
1k 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', ...
4
votes
2answers
1k 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() ) ...
4
votes
2answers
146 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
175 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
1k 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
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 ...
4
votes
1answer
211 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
4answers
1k 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 ...
4
votes
3answers
655 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
1answer
166 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
2k 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
0answers
92 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
4answers
5k 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(){
...
3
votes
3answers
881 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
7answers
7k 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 ...
3
votes
4answers
7k 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?
3
votes
1answer
796 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
2answers
524 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
...
3
votes
2answers
591 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 ...
3
votes
1answer
605 views
Multiple endpoints to same page
I'm doing a bit of AB testing, and am looking for a way to point multiple endpoints to the same page in wordpress. My site is using wordpress as it's CMS tool.
http://mysite.com/test/link1
...
3
votes
2answers
323 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 ...
3
votes
1answer
198 views
Limiting the number of words or characters in the slug/permalink
Limiting the number of words or characters in Wordpress slug/permalink. I would like to limit the number to the first 5 words (or 20 characters) even if the post title is longer.
example:
Title: ...
3
votes
1answer
1k 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 ...
3
votes
1answer
90 views
How to make WordPress use protocol indepentent upload files?
I am using FORCE_SSL_ADMIN in wp-config.php so everytime I upload a new image and inserted into the post, it is using SSL version
e.g.
<img ...
3
votes
1answer
282 views
Preview Image Path in Admin Section
So I have run into a little glitch. i have a custom path for uploads and it works. the files get saved to the right place, etc. The problem I have is the 'widget box' in the admin section. immediately ...
3
votes
4answers
3k views
URL Rewrite + Page + Custom Post Type = Unusual Redirect
Yet another URL rewrite issue :)
The Problem
I have a URL rewrite rule that should work, but against all logic it redirects without passing the query var.
The Juicy Details
The site has a page ...
3
votes
1answer
82 views
Creating custom permalink structure for languages
I've written a simple multi-language system, whereby clicking on a flag icon sets a one year cookie containing a two letter language code (e.g. nl, de, etc).
I hook into the wp action to read the ...
2
votes
2answers
46 views
Migrating a page to be an article
I've decided, that some second level pages I have, should really be blog articles. I want to copy and paste the title and body to an article and then delete the page (is there a better way of doing ...
2
votes
1answer
2k views
Add query string to plugin URL
I am creating a plugin that resides at http://localhost/test/wp-admin/options-general.php?page=my-plugin
I am trying to add a query string to this page so that it can be used in my plugin such as ...
2
votes
2answers
3k 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.
...
2
votes
2answers
111 views
I need to generate the CSS for my plugin from a function, how do i map a request to a function in the front-end?
I'm generating my CSS dinamically in a function using a link like this
<link id="www-core-css" rel="stylesheet" href="http://wordpress/myplugin/theme-css-loader.php?v=1" />
and i was ...
2
votes
1answer
254 views
Is 'name' a reserved word in URL's?
I'm creating some custom templates and I keep running in to a problem where I get'Page not found'. After a bit of debugging, I discovered that I only get this if my URL contains ...
2
votes
1answer
641 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 ...
2
votes
1answer
66 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 ...
2
votes
1answer
102 views
How to increase the character limit for post name of 200?
I have post name in Thai which uses UTF-8 character. Many of them encode into super long in ASCII e.g. วิธีการหลีกเลี่ยงข้อผิดพลาดทั้ง-8-ในชีวิตการแต่งงาน
I've changed the type of "post_name" using ...
2
votes
2answers
52 views
Rewrite category wordpress
Is it possible to rewrite only one category ?
I have a category "Photos" and just for this category.
I just want to rewrite it from /category/photos to /photos