The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [links]

Apart from the obvious meaning, `link` in the WP context also stands for a special post format. Please use the `permalink` tag for questions about the url structure of a site.

Filter by
Sorted by
Tagged with
0
votes
0answers
15 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
0answers
16 views

Add Developer Link on Homepage Only

<?php if ( is_front_page() ) { ?> | Developed by: <a href="https://mohsinalam.com" target="_blank">Mohsin Alam</a><?php } ?> <?php if ( is_home() ) { ?> | Developed by: &...
0
votes
1answer
12 views

Using Static HTML instead of the `home_url()` WP function

When I add links to pages in a custom WordPress theme I use the following function: href="<?php echo esc_url(home_url( '/contact-page' ));?>" If I don't use the home_ur() function, but the ...
1
vote
0answers
14 views

How to add Wordpress Admin “Insert Link” UI (searches through existing posts for URL) and functionality into a custom plugin?

When inserting a link into a post using the Wordpress Visual Editor, a popup UI shows up allowing you to type in / live search for the title of a published post. Is there any way to allow this ...
0
votes
1answer
12 views

Link To Child Category For A Post

I'm trying to display a link to just the child category on a Wordpress post. For instance if the category for a post is parent > child I want to show a link to just the child category page. I'm using ...
0
votes
1answer
12 views

Scroll to ID broken in main menu

I've taken over the task to maintain the website of your orchestra. Unfortunately the previous maintainer installed quite a lot plugins so it's hard for me to figure out which plugin is actually used ...
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
21 views

How do I list custom taxonomy terms with the links?

I've the following code which gives the list of the portfolio category as text. What can I do to have them as links instead? thank you function thb_display_category_cus() { if ('portfolio' === ...
-1
votes
1answer
9 views

Trying to chance my link style

I'm trying to edit the style of my hyperlink to be underlined like it currently is, but have a bit more space between the word and the underline. Is this possible? https://stridedigital.com/
-1
votes
0answers
15 views

Exit redirect Age verify

Im looking for a plugin that redirects my external Links to a custom page ( bridge Page ) where the user verifys his age. for example ( YOU ARE ABOUT TO VIEW ADULT CONTENT, PLEASE CONFIRM THAT YOU'RE ...
0
votes
1answer
11 views

Insert wrap span tag around contents of a link tag automatically

I've searched around a good bit last night and today and haven't been able to find just what I'm looking for here. Basically I'm trying to automate this process: When I click the link button inside ...
0
votes
1answer
24 views

How do i get the link of the assigned taxonomy term?

So currently i have a taxonomy named 'blog-category' which contains the categories of the custom post type 'blogs'. On my home page i have posts that show their respective categories with them. I am ...
0
votes
0answers
6 views

Interlink Pluggin Special charectors Issue

I am using interlinking pluggin but when I put a key word like "Invisalign®" it is not working while reading docs couldnt found the special charectors handling there.Any support would be appreciable
0
votes
0answers
22 views

My Site is not filtering posts as per Categories

So I made a custom taxonomy like this and named it blog-category function homekong_blog_categories() { $labels = array( 'name' => _x( 'Blog Categories', 'taxonomy general ...
1
vote
0answers
38 views

Changes in permalink structure in WordPress and how to apply to in-site links

I have some work for wordPress internationalization. Actually, I got good results. Part of my code: add_filter( 'query_vars', 'queryi18n' ); function queryi18n( $query_vars ){ $query_vars[] = '...
0
votes
1answer
16 views

add_query_arg() and empty variables inside

I have link: <a href="'.esc_url(add_query_arg(array('search' => $search, 'category' => $category, 'filter' => $filter), '/site')).'">Click</a> And some variables sometimes exist ...
0
votes
2answers
39 views

Remove nofollow from specific internal links

I got all my website with a lot of internal cloaked links with a nofollow attribute. I need a function or filter to add inside functions.php that removes the nofollow attribute when the permalink ...
0
votes
1answer
47 views

How to add a target to a link

Is there a filter I could use to get and change the html output of a link? I would need to add a target="_blank" in some cases. I'm using the filter post_link to change the url itself where ...
0
votes
2answers
47 views

Cannot go back to the first paginated page using pagination links

I embedded standard code for pagination links and everything is working fine except that clicking the Previous or Page 1 link does not take me back to the first paginated page. This is different from ...
0
votes
0answers
136 views

Insert “javascript:void(0);” into URL

I am no beginner Wordpress developer by any means but I am completely stuck with this. I have tried an array of alternatives without any result (href="#", href="#void", etc.). I need "javascript:void(...
0
votes
0answers
24 views

Link Author's Website in Author Bio

I'm wondering if there is a way to link a website in the Author's bio under Wordpress Users? I have tried this code but to no avail: <a href="sampleWebsiteURLHere" title="Sample title here">...
0
votes
0answers
8 views

Gutemberg image block adding link to homepage

We recently started using Gutemberg on a website we are slowly changing. Everything seemed great, until we noticed that the image block is adding a link to our homepage on every instance, even though ...
-1
votes
1answer
33 views

Weird strange letters appeared in all website links [duplicate]

I have an issue with my new wordpress website running WooCommerce plugin. There is a random letters added in all website links “?v=d3d4c5deb455” I tried deactivating the addon’s and it didn't work - ...
0
votes
0answers
11 views

Passing a variable in a customer url menu

I'm trying to add a link to my menu that leads to the following page: /ar/variable where the variable is the page the user is currently visiting for example: when the user is on page site.com/contact ...
1
vote
2answers
41 views

Add dynamic links in WordPress custom theme

I want to implement a system to insert custom links in my wordpress custom theme. I don't want to hardcode these links inside my theme. These links are for the socials or partners website. So they ...
0
votes
1answer
28 views

How to mask external download links to be only accessible by logged-in users?

How to mask external download links to be only accessible by logged-in users? Like the direct download link example: www.example.com/direct-download-link1 We want to mask it like: www.ourwebsite.com/...
1
vote
0answers
22 views

Wordpress links https overwrite issue

We're running WP woocommerce website, we got there problem with generating links. Steam api is generating link in this format: steam://rungame/730/76561202255233023/+csgo_econ_action_preview%...
-1
votes
1answer
30 views

How to block external download link access if visitor not referred from WP?

How to block link access (on a custom script installed server) if visitor not referred from our wordpress site? I mean we want to block access to links inside of our wordpress posts and make them ...
0
votes
0answers
23 views

link not working in image section

Hi in my site paintint there is an interior designer section under slider whenever I put a link to that image like this link it adds /v after any link automatically: https://paintint.com/interior-...
0
votes
0answers
12 views

Wordpress change homepage link (htaccess) (index)

Currently I'm creating content for a website. I noticed that in the homepage extension, there was 'homepage' added to the homepage link: www.charlottes-haarmode.nl/homepage When I tried to remove the ...
0
votes
0answers
20 views

Links to root domain from search engines don't work, but direct links and links from other referrers do

I've got a really odd situation with a wordpress website I manage - when I directly type the domain into my browser, the site comes up just fine - similarly, when I click a link to my site from ...
0
votes
1answer
26 views

Display child-page links in sidebar on both Parent Pages AND Child Pages

I am currently developing a WordPress website that has a sidebar on most of the pages, this sidebar is supposed to display a small navigation of any child pages that are under the current parent page ...
-1
votes
1answer
14 views

one time visit to the page

I want to set up a page with PayPal subscription gate away to my members area. It's a simple page with PayPal button which offer discounted subscription price for the chosen customers only. ...
0
votes
0answers
22 views

Content -> Post is easy, but Post -> Content is hard

I have a CPT/Pods, so it makes Post to Country, but it's the almost identical. Content to Post (or Country) is easy, example: /country/page/5 (Content) to /country/taiwan/ (Post). while ( $query->...
0
votes
2answers
44 views

Security concerns with external links

In this article I read, that using <a href="" target="blank"> is related to some security issues. They recommend rel=noopener. How do I implement this in my WP-Installation? Which file is the ...
1
vote
0answers
24 views

Move Image Captions Inside Link (<a> tag) if Added

I'm just looking for a relatively simple way to modify the default output when a standard post image with a caption is linked somewhere (generally to another page), so that the caption is included in ...
0
votes
0answers
27 views

How to use the WordPress API to get links and scripts in <head> and <body>

I'm using the WordPress API as a headless CMS. I have Elementor plugin installed to do page building in the WordPress admin. I'm trying to figure out how to get all of the <link> and <script&...
1
vote
0answers
17 views

Is it possible to change 'Link to' in all images in all articles?

After some update, they all changed to none. Need to change to 'Media file'. Can I do it once and for all pictures in all articles? I see in the text of article difference between images with Link To ...
0
votes
1answer
298 views

Change homepage's logo link [duplicate]

i've tried to change the logo link in the homepage with this code i've found: <?php echo esc_url( home_url( '/home' ) ); ?> this in the header.php but doesn't work, also i tried add_filter( '...
0
votes
0answers
16 views

Taxonomies delete link get_the_terms

I added the taxonomies in my CPT. I taken this in the wordpress codex. Because I want that my taxonomie hasn't link on the a click. The code is okay but my problem i would like delete the place in the ...
0
votes
0answers
25 views

Can I nest a <figcaption> element within <a> tags from default wordpress?

I am making a page with Gutenberg but there is a problem that the link does not work within a . This is the code when I inspect: <figure> <a href="..."> <img> </a> <...
0
votes
0answers
14 views

Making download links from short code

I want to create a word press download page with links to all my downloadable files (various types) and keep a running total of downloads. WPMP seems to do this but I cannot seem to create the link ...
0
votes
1answer
22 views

Get arguments from URL

I have example link http://mysite/login?user_id=6?reg=true how get user_id and reg values form $_GET? if i write: echo ($_GET['user_id']); Then get this: 6?reg=true And i try : echo ...
0
votes
0answers
18 views

Can't connect to a page inside my theme(I created it) directory

This is my nav bar <div class="header-menu"> <a href="/index.php">home</a> <a href="/about/single-about.php">about</a> <a href="/services/service.php"&...
0
votes
1answer
99 views

WooCommerce product id as permalink

Currently, the WooCommerce product permalinks is '/product/shoes-3' , '/product/cup-12' etc. How to change product permalinks to only be like /p/product_ID , for example '/p/1122' without using any ...
1
vote
1answer
121 views

Automatically append ID to at the end of specific URLs

I need to be able to automatically change normal links to affiliate links on my Wordpress website. For example: when I add a GOG.com link, it should automatically append my partner ID at the end of ...
0
votes
1answer
22 views

How to remove massive link in WordPress content

I would like to delete certain link that I have in the content of all the entries, for example : <a href="https://www.sitio.com">link contenido</a> Change it to: link contenido Or ...
0
votes
2answers
21 views

Trying to link to a custom css file in a new folder

I'm trying to link to a custom css file in a new folder of a small plugin I'm trying to make. I can't seem to get it to work. This is the line I have echo '<link rel="stylesheet" href="' . ...
0
votes
0answers
10 views

How find images my site is hotlinking to?

I used to employee a freelancer as a virtual assistant on my website and the guy has hotlinked many images to other website in more thant one hunder articles. Checking all the articles by hand is time ...
0
votes
1answer
29 views

Delete all href attribute in Wordpress posts

i want to replace all links with plain text. So <a href="http://www.anydomain.com/2">anchor text</a> should be just anchor text So I tried regex and it works here https://regex101.com/...