Skip to main content

Questions tagged [shortlink]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
9 views

Where does the redirect from shortlink to permalink happen?

When requesting short urls they are redirected to their matching permalink, for instances : shortlink permalink /?cat=category_id /category_base/category_slug /?p=post_or_page_id /custom_structure/...
challet's user avatar
  • 111
0 votes
1 answer
118 views

Automatic short URL in posts

I have a domain for (maindomain.com) which my site is running on it, I want to automatically add short URL at the end of each post. 1- I want to use another domain for short links 2- I want to have ...
Siaavash's user avatar
0 votes
1 answer
242 views

Wordpress creates shortlinks for each page and post

When I checked my web site with SEO Powersuite, I see a shortlink created for each page and then 301 redirected to the actual URL. For example: https://blokitap.com/?p=544 https://blokitap.com/...
Tolga Inci's user avatar
0 votes
0 answers
28 views

Shortlinks work only for logged in users

In my wordpress site, i can see this line in the code: <link rel="canonical" href="https://example.com/?p=7736" /> But only if i am logged in. If i'm not logged in I see the ...
mondi's user avatar
  • 255
0 votes
2 answers
231 views

Change slug shortlink “/?p=” base in WordPress

How to Change The Default slug shortlink “/?p=” base in WordPress? https://site.ltd/?p=115756 to https://site.ltd/post/115756/ or https://site.ltd/115756 Please provide the function code
wikivb's user avatar
  • 1
0 votes
1 answer
503 views

How do I do a redirect to WordPress permalink with post id via htaccess?

Years ago I saw Jeff Starr of Perishable Press set up shortlinks for a book of his where URLs such as example.com/u/123 redirected to example.com?p=123. I thought that was a handy way to set up no-...
nathanbweb's user avatar
0 votes
2 answers
393 views

Custom short url for wordpress post

How can I display a short url of the post in the content arrea like Shortlink - https://www.example.com/abc24g4 instead of the standard Shortlink - http://example.com/?p=1234 WITHOUT USING ANY ...
user avatar
1 vote
1 answer
394 views

Create additional short URL with custom field and 301 redirect

I want to create an additional shorter Version of my Post-Permalink with a 301 redirect to the real post URL. The shorter Version of the URL should get its Custom Field I added as a post meta. It is ...
gimsech's user avatar
  • 13
0 votes
1 answer
2k views

Why are <link rel> tags from the header showing up on my Wordpress site? [closed]

I am testing my new WP site. I wanted to see how it worked using a text-only browser, so I fired up "links" from my shell to visit the site. At the top of the page before my navigation menu, the ...
Francis Barton's user avatar
2 votes
1 answer
1k views

How get a value from a plugin into another plugin through action/filter

I have a plugin 'url shortener' that shortens the urls. I have another plugin 'social media auto publish' to auto publish a post to social media. But this plugin doesn't allow me to use short urls, ...
Vik's user avatar
  • 21
1 vote
0 answers
51 views

Twitter shortlink 404 not found [closed]

When i put a url of my wordpress page on twitter show the following however if i click go to the correct page any idea?
Miguel Ruiz Bas's user avatar
0 votes
4 answers
5k views

How to remove ?p= from wordpress short links

How to remove ?p= from WordPress short links? I removed ?p= from wp_get_shortlink and it's get the links without ?p= successfully but the problem that this links not working until added ?p= so how ...
Yogu's user avatar
  • 85
1 vote
1 answer
196 views

What is the term shortlink structure?

I know I can access to posts with this url structure : mysite.com/?p=X where X is the post ID. It's convenient because it will work even if the permalink for this post is modified. But you you now if ...
Matthieu's user avatar
  • 147
0 votes
1 answer
114 views

Get (eventual) permalink from post within Edit Post in Admin panel

I'm working on a plugin that needs to access grab the Permalink from within the Edit Post screen to send it to a link-shortener API. The catch is that I will need to grab the permalink before the post ...
Pdnell's user avatar
  • 103
2 votes
1 answer
1k views

Short links in wordpress not working properly

Short links generated by wordpress is not working for post permalinks like this: https: //www.mysite.com/test/mypage It's working if the permalink looks like this: https: //www.mysite.com/mypage ...
Imrul.H's user avatar
  • 175
4 votes
1 answer
3k views

Shortlink directly to a media file?

We have a nice short domain name, but links to media files are way too long because the file names are long and you have the extended path for WordPress media. Like so: http://example.com/wp-content/...
hawbsl's user avatar
  • 500
0 votes
1 answer
45 views

Make custom post available under main domain directly?

i have a custom post type called project. The shortlinks are all www.myapp.com/project/project-slug i want to change that to www.myapp.com/project-slug someone knows what I have to change in, i ...
Toskan's user avatar
  • 524
2 votes
1 answer
510 views

Using API to generate short link

I want to use a shortcode that generates a short URL from API of Premium URL Shortener script. I added code from API to my template functions: // Main Function function shorten_url($url){ $...
Mateo 's user avatar
  • 23
0 votes
1 answer
70 views

How to replace part of shortlink with nothing

I am attempting to shorten the wp_get_shortlink. I want to remove the "http://" which is unnecessary. I have attempted the regular php way of (Replace("http://"," " )); but it seems WordPress has a ...
Justin Munce's user avatar
0 votes
1 answer
157 views

How to append short url to specific external links

I'm trying to find a way to pass on the page ID as a string for certain links. For example, any link that starts with http://forms.woo.com/ will have " ?pageurl='http://example.com/?p=1234' " ...
JMC's user avatar
  • 1
1 vote
0 answers
70 views

Short URL in content

One of our clients is looking to use shortURL's in their content posts. Does anyone know if it's possible to setup shortURL's in the content of posts? I know bit.ly offers a shortURL for the post url ...
rwzdoorn's user avatar
  • 375
0 votes
1 answer
497 views

linking to post outside the loop

Is there an easy way to link to a specific page/post outside the loop? I used the get_permalink() code as follows. <a href="<?php echo get_permalink( 164 ); ?>/post-slug/"> </a> ...
user45758's user avatar
2 votes
1 answer
1k views

How to include DW Question & Answer plugin in front page template?

I tried using a shortlink code, but only the link is displaying and it isn't working either. <?php the_shortlink('http://abc.com/?p=52'); ?> I am using DW Question & Answer plugin and want ...
user123's user avatar
  • 29
0 votes
1 answer
110 views

Updating shortlinks from staging [closed]

Many of the shortlinks on pages of our site are links to our staging site. The current live site started life as the staging version, so I imagine that's why, but I don't know how to fix the issue. ...
toby1kenobi's user avatar
2 votes
1 answer
300 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() )...
user2650484's user avatar
3 votes
2 answers
5k 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 ...
user1960364's user avatar
0 votes
1 answer
155 views

Use shortlink as permalink

I'm using Url shortener plugin with bit.ly API. When I use the bit.ly url, it's redirecting to my Wordpress permalink. How Can I use the bit.ly all the time ? I want the bit.ly url become the ...
Mathieu's user avatar
  • 199
2 votes
2 answers
1k views

Social sharing post's shortlink instead of permalink

Is there a way to force a social sharing plugin to use the shortlink each of my WP posts automatically gets (YOURLS service in my case) to pass to the social service the visitor clicked, instead of ...
Saxtus's user avatar
  • 121
0 votes
2 answers
1k views

Remove short link tag from particular page

I want to remove the short link header tag from a specific page. Please suggest me a filter guys. I want to remove the entire <link rel='shortlink'... section from a specific page. Adding a ...
Kalai Vannan's user avatar
0 votes
1 answer
1k views

Replacing the WP.me URL shortener with Bit.ly

I am setting up a big blog for a client and we're looking to replace the wp.me shortlinks in the header and in everything with our custom domain on bit.ly. I have working code to build the Shortlinks,...
alpha1's user avatar
  • 245
2 votes
1 answer
650 views

Change link to other post to shortlink in the editor

Curently if we use the insert link dialog to insert a link to another post, WordPress always use the permalink of that post. The problem is when we change permalink structure, that link will be broken....
Anh Tran's user avatar
  • 4,132