Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
2answers
1k views

How to append a URL parameter to all external 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
367 views

WordPress 404 Images - Images not found after deleted from media

I am trying to develop the website to find images that have been deleted from the media library as they were not needed. These Images that I have deleted have previously been on pages but have been ...
-1
votes
0answers
7 views

how can add link in img (before & after slide)

in slide before and after image like https://avada.theme-fusion.com/before-after-image how can add a link in before photo and different link in after photo which click it to open the link
0
votes
2answers
30 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
13 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
2answers
1k views

Automatically search and replace link in content (pages/posts)?

The users of my site mainly share documents by inserting links into content (pages/posts) using the built in editor. These files include everything from pdfs to word documents. The users currently get/...
0
votes
0answers
17 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
1answer
372 views

How to eliminate permalink prefix in Wordpress Multisite

I have installed the multisite plugin for Wordpress; I have one website in English, and the other in French. However, when I go to Settings -> Permalinks, my English website shows this: I don't ...
1
vote
0answers
16 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 ...
7
votes
3answers
519 views

The Essential WordPress Websites / Weblogs? [closed]

I am looking for the essential weblogs / references / sites to place in my bookmark collection / sidebar. Is it possible that add a) either a link to existing bookmark collections b) additional sites ...
0
votes
1answer
40 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( '...
1
vote
1answer
36 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
2answers
376 views

Problem with site's search results “Read More” link?

I'm hoping someone will be able to help me with this issue. I noticed today that when I search certain serch terms in my Wordpress site's search box the link is messed up (shown in the image below ...
0
votes
0answers
12 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
15 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
416 views

Difference and usage of uri (e.g. get_directory_uri) and absolute path (e.g. get_directory)

What is the difference uri (e.g. get_directory_uri) and absolute path (e.g. get_directory) and when it the best time to use each?
0
votes
1answer
16 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? Or how construct link, because this is link from e-mail verification user. if i write: echo ($...
0
votes
0answers
17 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
398 views

Fragment URL in navigation item without a custom link

Some of the pages in my navigation are fragmented urls that shouldn't actually go anywhere. In other words, I have a couple parent nav items like <a href="#">Services</a> that serve only ...
1
vote
1answer
436 views

Links open only on new tab or window

I'm experiencing this strange issue on a web site just launched (www.tavoleromane.it). There was an old thread on this and it should be related to javascript. Analyzing the page I don't see any ...
1
vote
1answer
2k views

Problem creating an edit link for a custom post type

In my last question, I asked How to build a post and comment editing form in a page?. But in order to edit the custom post type (called Question) I have to reference the edit page and the ID of the ...
0
votes
0answers
17 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 ...
0
votes
1answer
19 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
19 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
9 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/...
0
votes
1answer
32 views

How do I link a featured photo to it's post?

I cannot change the url of the photo in the featured-image edit section. The page can be found at https://irregularus.com/tips-and-stories/ and if you click on the picture you will see that it just ...
8
votes
1answer
10k views

remove links from images using functions.php

I am looking for a way to remove the attachment link from images in the post content. I would like to add this to the functions.php in my theme. I know you can disable this in the post on a per ...
0
votes
2answers
540 views

Permalinks not working after updating WordPress

Recently I have installed a new version of WordPress and immediately I tried to change permalinks to /%postname%/ and now it's not showing the result. Everything is default according to WordPress....
0
votes
1answer
33 views

Author Meta in Author URL Link

I am trying to modify the default author link url structure. In the URL, I would also like to change the string author to operator add some author meta along with the username. So far, I have ...
1
vote
1answer
690 views

I can't edit my homepage - the page editor is just blank

I've been tasked with taking over the website for my company - going well for the most part, but I've hit a wall with the homepage. I'm trying to update the Latest Issue widget Problem is, when I ...
0
votes
0answers
10 views

Find and replace wordpress DB to open all links in new window/tab?

After spending a while searching, I found this: Open external links in a new window Also found a javascript powered plugin to perform this change while enabled. But, I wanted to be able to replace ...
0
votes
0answers
16 views

How to copy data from one CF7 to another via a link

I have 2 contact form 7 forms, a shorter one with name, number, email etc, and a second one with the same fields, plus much more details. I need people to submit all their details, but i feel they ...
0
votes
1answer
637 views

Why is there /index.php/ in all my links? How do I remove it?

I recently realized that my rss feed is not working, because a plugin was assuming it's under mydomain.com/feed But it isn't. I get an 404 error. I figured out that instead my feed is under ...
0
votes
1answer
23 views

Search Results No Link

The search results page is not showing a link that the user can click on. I am needing the heading to be the link. Does anyone know what the issue might be? Below is my search.php and content.php ...
0
votes
0answers
20 views

how to link local pages with flags in submenu

we have 4 flags on our website in the submenu. two, german and english are leading to the internal translation (wpml) the other two (chinese and russian) are leding to external links (local copies of ...
0
votes
1answer
5 views

Metallex Theme modifies links after saving them

The Problem The theme I'm using allows one, in its options, to enter some contact info to be put in the header. The demo content has an empty link like this: <a href="#">Random Shit</a>. ...
0
votes
1answer
634 views

Exists filter or action that change Add New Post link?

I want to know if exists some method from filters or actions to change the link of the Add New button in backend , for example the regular url is http://wordpress_install/wp-admin/post-new.php but I ...
1
vote
2answers
44 views

How to change old permalink?

My old permalink structure is /index.php/%year%/%monthnum%/%day%/%postname%/. For example: https://example.com/index.php/2019/01/08/technological-innovation-for-agriculture-sector-in-india/ but I ...
0
votes
1answer
40 views

How Can I Concatenate A String With One Of My Custom Field Value Before Saving The Post?

My website is a daily deals and offers site. I promote many online stores with affiliate links. I have created a php script to detect any merchant's link (ex- Amazon) and convert it to my affiliate ...
0
votes
1answer
780 views

Creating a Back button on detail post page to go back to blog page with same query strings and page id

So, I would like to have a back button on the single post page that can be dynamic to the point to where it knows where it is in the query and bring me back to the blog page on the right page number ...
0
votes
1answer
23 views

How do I point bloginfo('stylesheet_directory') to my parent theme?

I've created a child theme but the parent theme seems to use bloginfo('stylesheet_directory') to point to a lot of CSS and js files, none of which are currently loading. As I believe the '...
1
vote
1answer
21 views

My custom link works only on home page

I created a custom ID for the Portfolio section on my home page. Then I linked it to the "Portfolio" menu, but for some reason it only works from Home page and not from other pages. I tried to add /...
0
votes
2answers
1k 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 ...
0
votes
2answers
2k views

Link to Portfolio page by id instead of name

I'm trying to make a dynamic button that goes to portfolio page (no matter what ID/name it has), it's currently like this: $portfolio_page = get_option('theme_portfolio_page'); $portfolio_pid = ...
0
votes
1answer
903 views

How to pre-fill Google Forms URLs with logged-in WordPress user's data

We need to have our logged-in users' data (username , Email , First Name , Last Name) pre-fill the links to Google Forms existing on our site. Why? We have Google Forms spread out on our site that ...
0
votes
1answer
1k views

Taxonomy link not working (leads to 404 page)

I've created a website where I use Taxonomies for adding an extra category future. This feature works in the backend (admin) and is showing up correctly under the article. The problem is that the link ...
0
votes
1answer
1k views

Menu custom link not working for external site

I've got this header menu in my site (made editing a theme), but i've noticed that the custom links pointing at local anchor section (like #section) correctly navigate in the same page to the desired ...
0
votes
0answers
9 views

How to Create pages and link them to a keyword simultaneously?

I am designing a very big listing site where I would have to refer certain pages to a specific keyword. My Query is is there a way by which I can avoid manual creation of links. That is whenever I ...