Questions tagged [urls]

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

468 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
1answer
178 views

Prevent “main” WPMU site_url() being returned in functions

I've noticed that in a WordPress MU install with domain mapping enabled, some functions return URIs that don't use the current WPMU site's primary domain name which possibly means they are "WPMU ...
5
votes
1answer
717 views

Change the author slug from nickname to ID

I've changed the default registering option by allowing people to sign up with their e-mail addresses. They also have an option to add their firstname, lastname but it's not required. // Allow email ...
3
votes
0answers
118 views

How to create a custom page base on URL for Wordpress?

How can I achieve the following: example.com/mycategory/my-first-page example.com/mycategory/a-random-file-name-page If the user enters http://example.com/mycategory/*, it will load a standard ...
3
votes
0answers
171 views

Adding target and _blank as it's value to the allowedtags

I know that WordPress uses KSES to parse HTML and strip invalid XHTML so I took control of $allowedtags in my themes functions.php file inside a function then added 'target' keyed to an array which ...
3
votes
1answer
1k views

Wordpress on a subdirectory of Laravel - Wordpress pretty permalinks inner page shows laravel

I read lots of discussions about this and found no solution. I have a Laravel web app and added a Wordpress site in a subdirectory. This is what my .htaccess looks like within the public folder: <...
2
votes
0answers
20 views

Change permalink rule if category is called “uncategorized”

My current permalink looks like this /%category%/%postname% Basically I want something like this: If the category of the post is called "Uncategorized" then change the permalink rule from "/%...
2
votes
0answers
21 views

How can I change all links on pages to point to a different domain from where the site is hosted?

I saw this question: How can I change permalinks to use a different domain and path from where the blog is hosted? and was wondering if someone can help me. We're hosting a wordpress blog on WP ...
2
votes
0answers
192 views

Custom URL rewrite to specific page template

I have a standalone page with the slug: hubv2 that is using a custom page template which runs a small React app. The React app handles in browser routing and it works fine. For example I can hit /...
2
votes
0answers
163 views

Best way of removing emoji support from url / slug only

Couldn't find anything on the topic. I guess something could be done with the 'wp_unique_post_slug' filter but how would I go about just removing the emojis from the slug? I've tried all kinds of ...
2
votes
1answer
142 views

Add a URL prefix to permalinks of News category and sub-categories of posts only

I changed http://domain.com/%postname%/ to http://domain.com/news/%postname%/ using the answer provided here: Add a URL prefix to permalinks of one category of posts only. But I am having issues with ...
2
votes
1answer
273 views

Wordpress .htaccess - route other URLs to another app

I need help in WordPress .htaccess. My projects name is Project this is WordPress and onepage website, inside this I have one more project that is built in CI named app. What I want is, if someone ...
2
votes
0answers
158 views

Allow UTF-8 characters in the user slug part of URL

I want to be able to specify a custom slug for an author URL that may contain UTF-8 characters. I used the plugin Edit Author Slug but it does not accept UTF8 characters like accented characters, ...
2
votes
1answer
32 views

WordPress converting ../url to http://../url

I have a page on WordPress, it's slug is http://example/wordpress/page. I also have a second page, and it's slug is http://example/wordpress/page2. I want to a link in the first page that links to ...
2
votes
1answer
530 views

Wordpress custom URLs for pagination pages

I’m trying to find a way to make custom URLs for each pagination page separated by <!--nextpage--> tag. For example, if the first page is: myblog.com/my-topic/ the second one will be: myblog....
2
votes
0answers
152 views

add_rewrite_rule won't work

I did it in the past and it did work. But this time it won't work and I can't figure out why. The difference is the version of Wordpress and the version of WPML. So, I have the latest version of both:...
2
votes
1answer
349 views

preserve url parameters from affliliate sites

Please help, I am using a wp site as medium between e.g. a news site lets call it A and the actual site that e.g. sells a particular product lets call it B. A ---- medium site --- B news site ---- ...
2
votes
0answers
455 views

Wordpress url image redirect to the homepage

Need help please. I have run into an issue with image pages on my site. All url image, redirect to the homepage. I have double check in YOAST SEO and Redirection and found nothing. img: ...
2
votes
1answer
926 views

Can two products with the same name but different category produce unique URLs?

In the permalinks settings I have /courses/%product_cat%. Using WooCommerce I created two different Courses that are named "English", but they have different categories that end up making my urls look ...
2
votes
1answer
392 views

Password protected page Hash url

I am using owl carosel which takes a hash url to go to a specific slide (http://www.owlcarousel.owlgraphic.com/demos/urlhashnav.html#five) Lets say I want to visit a password protected page with the ...
2
votes
2answers
2k views

Add a query string to ALL links on site

Our client would like to embed his site into an iframe in their software backend. I get a query string on the first link but need to make sure that string persists across URLs for all links and ...
2
votes
1answer
435 views

custom taxonomy and custom post type url conflict

i am having one serious url issue. there is news custom post type. it's slug is news. News taxonomy slug: news_category News taxonomy url is: http://domain.com/news_category/press-release i want ...
2
votes
1answer
178 views

CPT posts listed by category with custom rewrite URL, please help!

Here is what I'm trying to do: I have 10 total dessert recipes (in shared dessert category) that are divided by 2 custom post types. I want to create 3 different views of these posts with the custom ...
2
votes
1answer
46 views

How is WordPress manipulating the posts like there are folders?

As you know, a WordPress post can usually be seen going to a link similar to this: myblog.com/2014/03/27/sample-post/ There is no folder named 2014, 03, 27 or sample-post in the blog. Until now, I ...
2
votes
2answers
950 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 "/bar/...
2
votes
1answer
261 views

How to create custom taxonomy URLs without taxonomy name?

I have a website that lists businesses in different cities (this is a niche site, so all businesses have the same "classification"). For starters I created a CPT for locations and a taxonomy called "...
2
votes
1answer
478 views

Wordpress address URL keeps dropping the www

My Wordpress Address (URL) in general settings keeps losing the www from the URL - I type in http://www.domain.com and it saves and works fine. Next time I go in the address has changed to http://...
2
votes
0answers
439 views

Pages redirected to attachment post

THE SETUP I'm using WordPress 3.4.2 with Magic Fields 2 plugin. Using MagicFields2, I've added a custom field to the builtin 'page' post type. This field is called 'section_header' (which is ...
2
votes
1answer
228 views

Which of WordPress's .php files need to be directly accessible via HTTP?

I'm trying to tighten up security on my WordPress installation, and one of the things that seems like it might be a good idea is preventing all of the internal-use .php files from being accessed ...
2
votes
1answer
3k views

Remove site root trailing slash

I am using Wordpress for a "news" section on a e-commerce site. So the root of the wordpress install is in a sub-folder. www.mysite.com/news I have setup the home & site URL to reflect this in ...
1
vote
1answer
27 views

Colon is Missing In My Website Url in Wordpress

add_action( 'init', function() { add_shortcode( 'site_url', function( $atts = null, $content = null ) { return site_url(); }); }); I'm Using The Short Code [site_url] and My Short ...
1
vote
1answer
10 views

Can I change the URL of a video, or upload a video to a specific URL?

Let's say a video has been uploaded to: https://www.example.com/wp-content/uploads/2019/08/2017-12-21_XXX.mp4 But the URL has to be: http://www.example.com/videos/12/2017-12-21_XXX.mp4 Is there ...
1
vote
0answers
18 views

Multiple permalinks for Wordpress post types

I've set a custom permalink on Wordpress so all my blog posts end up as example.com/blog/post-title Where post-title is the title of the post. This helps keep track of all the blog posts vs pages, ...
1
vote
1answer
14 views

How to edit URL Slug?

Some of my blog post slugs show abnormal characters within the edit post screen (ie. 3%e2%80%8b-%e2%80%8bperks%e2%80%8b-%e2%80%8bof%e2%80%8b-%e2%80%8bsmartphone-based%e2%80%8b-%e2%80%8belds) but shows ...
1
vote
1answer
36 views

How can i have a custom post type with more slugs for each post?

I have a post type /city/ .. lets say i create a city called toronto with the slug toronto-canada. now i have /city/toronto-canada/ is there a way i can have more paths for each post in the custom ...
1
vote
0answers
22 views

Changing the search url according to language

I'm using Search and filter, Polylang and Custom post type UI plugins. I have a problem with the project's search in a specific language. The search form allow you to select category and location of ...
1
vote
1answer
36 views

Add language prefix to permalinks

I have a wordpress website that has multiple translations, and i was trying to get the website to determine the language to load from the URL e.g. if its https://website.com/sp/about-us, load contents ...
1
vote
2answers
48 views

How to change redirection route to a php page for making it only accessible by logged-in members?

Background of my problem: I'd like to mask external download links as internal links and to be only accessible by logged-in wp users at htaccess level or with PHP script but when redirection happens ...
1
vote
0answers
27 views

How to show the root webpage on all subpaths

I want to show the same page on all the subpaths on my web site /events/ /events/firstOne /events/secondOne/edit /events/whatever/blahblahbla/helloworld All that urls must load the same root page. ...
1
vote
3answers
136 views

How to use $_GET function Wordpress backend

I use Plugin Boilerplate for my project. I searched the internet and read all the questions but I couldn’t find what I need. I also read the WordPress Codex. I think I couldn’t get the idea. I have ...
1
vote
1answer
81 views

Changing WP_Query params with url Query Var

:) I've used WP_Query to display there posts (travels) here http://boost19.delavec.si/wordpressP/produkti/ So... I've got this WP_Query that is looping through my custom posts <?php $paged = (...
1
vote
1answer
19 views

Storing the contents from txt file into The_Contents"

Currently I am trying to fetch data from an external page, which I have stored via a custom field and store it into the top portion of my WordPress the_content when the post is saved. The steps are ...
1
vote
0answers
31 views

How can I change a media attachment URL/slug, so that I can use that slug for a page?

As in the title. Yoast is now installed so that all media page URLs redirect to the image itself, but how can I change that slug for the image? It's currently using the slug I'd like to use for a ...
1
vote
0answers
47 views

Alias 'wp-content' directory to something shorter (framework?)

I recall seeing this as a feature of a Wordpress Development Framework, so I know it's possible (can't remember the framework). I am interested in how to condense the Wordpress-generated urls to ...
1
vote
0answers
20 views

Use “search” in permalink?

I am currently in the process of migrating a custom web app to WordPress and in the custom app, search requests have a URL structure of mydomain.com/search?q={search criteria}. I attempted to add ...
1
vote
0answers
25 views

Check if user is logged in to site A when visiting site B

I have two separate WP installs. The main site (a.com) and the blog for that site, which is on a subdomain (blog.a.com). I need to be able to check if a user visiting blog.a.com is logged in to a.com....
1
vote
0answers
11 views

wp-comment author- url +, email filter hook

Don't know how to change '@' and 'HTTP/S' in ALL comment-stuff, so those will be displayed in WP as unclickable contents. Do you have the knowledge and patience to straighten the following lines? ...
1
vote
0answers
12 views

Is it possible to configure WordPress's Core Files to accept duplicate Child Categories?

I am currently building a site structure, for an eCommerce site. The shopping platform, is WooCommerce As well as much research, I have spoken with many people, regarding best practices for URL ...
1
vote
1answer
133 views

How can I get the permalink of a post before it is published?

I'm trying to create a plugin that gives you a push notifications button, through the WordPress editor and I can't find a way to get the permalink of a draft post before its status is set to published....
1
vote
1answer
36 views

reducing number of URL Redirects and increasing speed

Currently my website URL, for quickest access to the site, it is of the form https://www.example.co.uk. Generally, if people know of your website, they will enter example.co.uk. Entering the website ...
1
vote
2answers
1k views

How to append a URL parameter to all outbound URLs

Is it possible to append ?ref=myref to all external URLs? If so I'm guessing I will also need to check if a ? already exists and use & if so. I'm a WP noob just coming from Joomla, any tips / ...