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.

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

Url for random post (in specific category)

I know that a URL formed: samplewebsite.com/?random will redirect to a random post. Is it possible to create a URL that will redirect to a random post within a particular category? samplewebsite....
0
votes
1answer
705 views

Cannot access to dashboard on localhost

while i am trying to migrate my WP website from to localhost, i changed the Host Name from Dashboard -->> Settings (WordPress/localhost ---> exp.00webhost.com) Now i want to access my website on ...
1
vote
1answer
624 views

URL parameters causing 404 on home page, but nowhere else

I am writing a plugin that utilizes URL parameters. For some reason, adding one of these parameters to the home page of my website causes a 404 (http://bleaney.ca/?source=asdf). Adding the parameter ...
0
votes
1answer
703 views

Magento and WordPress URL integration

I'm in a bit of a conundrum. I've integrated WordPress into my Magento site, currently by a subdirectory. Check it out: http://vapetropolis.ca. If you go to the "reviews" section, you'll note there's ...
0
votes
1answer
714 views

Generate one time URL

I need to implement one time URLs in a wordpress website. I found this script on phpclasses website and I integrated it in wordpress and it seems to work. I think this script can also be useful to ...
0
votes
1answer
461 views

Dynamic URL generates dynamic content

I am keen to understand how I might be able to do the following. A list of products or things that might be a JSON data object or flat text file of things. Let's say the list of things is: twitter ...
58
votes
7answers
194k views

How to get URL of current page displayed?

I want to add custom PHP code to ensure that whenever a page on my site loads in my browser, the URL of that page is echoed to the screen. I can use echo get_permalink(), but that does not work on ...
0
votes
0answers
37 views

URLs for (MultiSite) link images are always relative

How I can I get WordPress to stop making link-image URLs relative? I'm trying to add logos to the blog-roll widget, but WordPress makes the URLs of the images relative to the current blog. For ...
0
votes
2answers
1k views

Automatic set a featured image from the first image's url (or tag) in the article

Is there a way or a plugin to set a featured image from the first image's url (or tag) posted in the article?
1
vote
1answer
34 views

Special domain for a page

I have a wp instalation on example.com and want to have secondary.com to show contents of example.com/b (b is a page) but keep secondary.com in the url (not secondary.com/b) I tried this approach: ...
0
votes
0answers
23 views

Allow duplicate slugs for pages and posts

My use case is: I have a two pages, they each have a meta information "language". Posts and pages having same language cannot have the same slug, but with different slugs it is totally fine. Currently ...
0
votes
1answer
14 views

bloginfo url in javascript

I'm trying to set <?php bloginfo('template_url'); ?> in a variable on Javascript, and then to set src of an img element, but in the html it's been printed as src="<?php bloginfo('template_url'...
0
votes
0answers
4 views

Add ?piura final url of products generated

I need to add via the functions.php at the end of the parameter ?Piura. Since I am using this code so that all users who have the ?Piura parameter have a special code. The problem is that the url ...
1
vote
1answer
743 views

Wordpress shows error related to allow_url_fopen

I just installed wordpress with plugins, everything works find except on a 'contact me' page, where I can see an error like this. Warning: getimagesize(): php_network_getaddresses: getaddrinfo ...
5
votes
1answer
725 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 ...
0
votes
0answers
19 views

Change url based on logged in user/different root?

I'm not sure how to word this question so I'm sure the answer is out there but I'm using the wrong search words. I have a URL where the end remains the same, but the beginning changes based on the ...
0
votes
2answers
141 views

Giving specific category posts its own permalink structure returns 404

i am trying to give a specific category posts it's own permalink. Followed the steps from this topic (Give specific category its own permalink structure) but the posts are giving a 404 error. Cleared ...
0
votes
1answer
702 views

Exclude image url from search query

I have a question today. I have recently completed a website and there is search box integrated. And, I have a post which has an attachment(attachment's url is www.sample.com/image/sampleimage.jpg) ...
0
votes
1answer
15 views

How to show a full page when someone links directly to an image on my site

My site contains a lot of custom images. I've searched the web and found a lot of websites that link directly to the images on my site. Meaning, they link to the jpeg itself, not to the actual page on ...
0
votes
1answer
615 views

Scrape external webpage for first image and add it to new post

I'm looking for a way to scrape an external page for its first/best/largest image and insert a copy of that image as the featured image of a new post on my Wordpress site. The way that I was hoping ...
0
votes
1answer
41 views

Custom Post Type Category URL

I've created a simple CPT named shop which contains some shop items. After that I've added category support to it which works fine ('taxonomies' => array( 'category' )). Then I created template-...
11
votes
2answers
14k 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 : http://www....
1
vote
2answers
760 views

Start post pagination at 0 instead of 1

Is it possible to start post pagination count at zero instead of 1? I want the URLs to be like this: ../page (Foreword) ../page/1 (Chapter 1) ../page/2 (Chapter 2) But by default the URL ...
0
votes
1answer
166 views

sub menu link is not working

I am using a theme which is showing table of content by using this code : <div class="menu-panel"> <h3>' . __('Table of Contents', 'odrin') . '</h3> ...
3
votes
1answer
9k views

Access post from post id in URL

I'm doing unit tests for my plugin, and in my unit test, I check some basic things such as posting a custom post type. My script can create new post, and I can retrieve the ID of the posted item (I'm ...
3
votes
2answers
2k views

Custom slug in front of search URL

I'll try explain this the best I can... I have a search form on my homepage: <form role="search" method="get" id="searchform" class="form" action="<?php echo esc_url( home_url( '/' ) ); ?>"&...
0
votes
1answer
18 views

Does having category name in permalinks affect SEO when having a post in multiple categories?

If I change the permalink structure to the following in the Permalinks settings page in WordPress: www.example.com/%category%/%postname%/ Then I create a post with the slug my-post and add two ...
1
vote
1answer
679 views

Per Page Permalink Structure for Page Post Type

I am trying to Re-Write Page URL's so that they END with .htm I was able to do this using... /* Add .htm extension to Page URL Links */ add_action('init', 'htm_page_permalink', -1); function ...
1
vote
2answers
2k 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 / ...
0
votes
1answer
2k views

Change dynamically URL to SEO friendly via .htaccess?

Is it possible to change the URL structure for the specific URL only? Currently: https://www.website.com/brochure/?brochure_id=new-year-guide Desired: https://www.website.com/brochure/new-year-guide ...
0
votes
1answer
25 views

Extra url paths as variable

I have this WordPress pretty permalinks structure: https://example.com/house/name (where house define post_type) I want this one url: https://example.com/house/name/2/3 (that works like https://...
0
votes
0answers
18 views

Dynamic URL with custom tag permalink

I'm trying to have some dynamic URL. I made a custom tag for my permalink to show the language of the blog, but i'm facing an issue with dynamic URL. The problem is that it only consider 'fr' in my ...
1
vote
1answer
28 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 ...
4
votes
2answers
12k views

How to get URL param to shortcode?

I can't find solution for this ... URL: www.foo.com/some_page/?name=John Page content: Hi [Name]! Worpress still redirects back to www.foo.com/some_page/ I tried everything ... I need ...
2
votes
2answers
5k views

Is dynamic URL possible in Wordpress

I know the title seems little bit confusing, but what I am looking for is something possible in symfony or ror. I have a page with this URL: http://mydomain.com/job/. Now I want this URL structure ...
3
votes
3answers
75 views

Why WordPress automatically removes http from the url of my website's sub domain?

I am witnessing a strange problem in WordPress which automatically removes 'http' from my sub domain link. I don't know why this is happening. Note that my domain is https while it's subdomain is ...
0
votes
1answer
15 views

Is there a way to test if a URL is part of the current blog?

In a scenario where, say, your plugin or theme has been given a URL. You want to know, is this URL a URL from this very blog? How would you test if it is?
4
votes
2answers
158 views

How to check if feed URL was requested?

I'm writing a plugin to block some pages to anonymous users on my site. I already blocked some pages but I can't get to identify the feed page my-wordpress-site.com/feed. I've tried: $GLOBALS['...
0
votes
2answers
2k views

changing static link to relative link

I have self hosted my wordpress today, but I realised it is still having static link of my local installation, since now I am opening using my IP (as i haven't done DDNS yet) i want that link should ...
1
vote
1answer
18 views

URL parsing - what is it?

I am reading the conversation about WP_USE_THEMES and I don't understand the term 'URL parsing'. Can someone please explain that to me in the context of Wordpress ? Google didn't produce significant ...
0
votes
0answers
15 views

Having multiple URL structure for wordpress blog

I'm moving a blog from hubspot to wordpress and i'm facing an issue, I would like to have multiple structure URLs for the blog, we are a company and the goal is to keep separate news about company, ...
0
votes
2answers
2k views

Use wp_redirect to add a parameter

I am trying to add a function to my child theme to append the currently logged user as a parameter. For example, when the user test1 logs in and clicks on the following page: http://www.example.com/...
0
votes
1answer
37 views

Query custom post type and custom field by URL parameters

I have a custom post type staff. and a custom field alphabet for posts in that post type. Each staff will be assigned to a letter either A or B ... Z based on the first letter of the staff's name. On ...
0
votes
1answer
1k views

Use Parent Pages for URL Structure without Landing Page

So this is more a philosophical question than anything, and if I'm asking this in the wrong place, I'm happy to remove the post: What's the best way to use a parent page for structure while keeping ...
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 ...
0
votes
0answers
7 views

How can I stop WP from appending a URL to a link that calls a JS function?

I would like to call a JS function on the onClick() event. The problem is WP keeps adding the URL. The function doesn't work because it results in a 404 error. Thanks in advance.
-1
votes
1answer
37 views

Why my wordpress site URL does not begin with my domain?

I'm hosting a web app on my-app.pro, and it's the main domain for the hosting. The containing folder is /home/my-app.pro/www. I'm using a framework, and it does the rewriting job, so all my pages are ...
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, ...
0
votes
1answer
17 views

Creating a return url for getting data from external api

I am working on a plugin with a payment system. I need to provide a return url for the payment gateway in order to receive its answers. I don't want to create a specific page but to have a kind of ...
0
votes
1answer
1k views

Previewing/Updating some Pages causes “The requested URL was rejected” Error

The wordpress site is suddenly having a problem where on some (not all) of the pages, when you click preview page or update changes it gives an error message: "The requested URL was rejected. If you ...