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
1
vote
0answers
15 views

Add custom attributes to link in Gutenberg

Is it possible to add custom attributes to link in Gutenberg editor? Please don't tell me to add those attributes from Edit as HTML view. Probably, there can add a new field in the link editor popup ...
0
votes
0answers
25 views

No https in url when writing links like: <a href="//

please help someone , hope you will understand me . Problems is with <a href="// no https in link when i try to edit on my web panel , i have correct link with https and when i see my page's ...
0
votes
0answers
20 views

Link to products with the same image title (woocommerce)

I have products with a generic image. The image title is for example abc.png. I would like to generate a link to all products with that image title. Any help would be appreciated. Thank you.
0
votes
0answers
18 views

Best practice to generate token for email action

I need to make a custom link to confirm order from user by email. This is the basic code : private static function get_confirmation_link( int $recipient_id, array $params = null ){ return home_url(...
0
votes
0answers
5 views

how to redirect a url to a secondary category?

let me explain, I have this url website.com/category1/category2/category3/postname I would like to redirect you to the youngest or lowest category "category3" let it be like this: website/...
0
votes
0answers
7 views

Filter out external links in the WooCommerce product description functions.php

I have an online marketplace powered by WooCommerce and need to prevent vendors from adding links to their websites or Etsy URLs in the product descriptions. Is there a way to filter out external ...
0
votes
0answers
11 views

Why am I getting 404 after using category_link and post_link filters?

I want to customize the posts category and single permalinks. I'm doing something like this: add_filter('post_link', 'set_post_links' , 10, 2); function set_post_links($permalink, $post){ if(...
0
votes
2answers
23 views

Wordpress rewrites my link with custom URL scheme to http(s)

I have a page that only users of my native iOS app will find, which should open the app. This works (on any other HTML page anyway) by linking to "myapp://path/inside/app". Wordpress keeps &...
0
votes
0answers
13 views

Prevent the automatic URL linking added in last update

Since one of the recent WP updates, all URLs in my post contents are now magically converted to clickable links using some obscure Javascript function on page load, and I can't find a way to disable ...
0
votes
0answers
10 views

Pagination url canonical problem for other pages

I have a WordPress Page setup, named 'Blog', where I've added the WP Query to bring through my blog posts. I also have pagination, setup on these pages such as: example.com/blog, example.com/blog/page/...
0
votes
0answers
8 views

Display URL from Widget content inside href=“”

I'm creating list of social networks. I displayed on front-end and styled in code. Now I want to have option in Widgets to change URLs for each socia network. I created sidebar: register_sidebar( ...
0
votes
1answer
11 views

How can I automatically display the section link on my one-page Elementor website?

My website is using long one-page posts for each issue of our magazine and these are navigated through anchor links. I add the anchor links through Elementor. I want to be able to display the section ...
1
vote
1answer
49 views

How to use <LinkControl />

I am a beginner in WordPress development looking to build a block with tab navigation using <LinkControl />. I am still learning, so any guidance/materials/code examples will be appreciated. My ...
0
votes
0answers
19 views

How do you run code on a specific page without missing the init hook?

The earliest that functions such as get_permalink or is_page are available is parse_query (afaik). Then I thought, ok, clearly, I can't say if( is_page('myPage') ) { add_action( 'init'... // because ...
0
votes
1answer
15 views

Wordpress 5: prevent link from displaying page title instead of URL

I noticed in one of the updates since wordpress 5 that when I paste in a link to another site it shows the page title as the hyperlink (usually "Home") instead of the URL. I don't want that,...
0
votes
1answer
49 views

I need a link that directs the user that is logged to his profile

I want a link in the form to an image in the frontpage, that direct the user that is logged to the subscription packages that are on its profile: The link look like this: https://mywebsite.co.uk/...
0
votes
1answer
12 views

make link to search page

I have a search Icon in menu section of my site and looking for a way to when a user click on this search icon, redirected to the search page. in the search page, there is a search form and also ...
0
votes
0answers
11 views

Single.php - Back To Category Button

I've used this code to create a back button to my previous category and it works perfectly, but I want the button title in this case hard coded RETURN to be dynamic too TITLED the previous category. ...
0
votes
0answers
33 views

Best practice to call a function from a button-link?

I am developing a WordPress website where I have to link a button to a function inside the functions.php file. Meaning that when someone clicks on a certain button, this will trigger a call to a ...
0
votes
1answer
28 views

How to get post permalink url without a href

I need code to get post url without a href, for example: <a href="http://mywebsite.com/permalink" rel="permalink">single post title</a> i just need the url like: http://...
0
votes
1answer
12 views

White image when I share my site

when I share the link to my WordPress, it shows a white image as the thumbnail. How do I alter this image?
0
votes
0answers
39 views

Generic Link Button in Custom Gutenberg Toolbar

Is there any way to add the link button you get in the richtext component into either a sidebar or a toolbar? I'm trying to set an overarching url for the whole block that is forced to open in a new ...
0
votes
1answer
51 views

Dynamic subdomains for woocommerce affiliate sales but NO multisite. Is that possible?

I've got a woocommerce installation that sells things. We want to offer affiliates to sell our products with their own url, ie mysite.thebasesite.com. Basically, the way that it works is that a ...
0
votes
0answers
48 views

How to enable HTML tags in category description without breaking the category page

I'm trying to include hyperlinks as part of the description on a category page. Since WordPress strips the necessary HTML tags, I've added the following PHP code in a plugin, which stops the HTML tags ...
1
vote
1answer
21 views

How can I modify all existing <a> tags while keeping the urls themselves?

I want to modify all current links to Amazon on my site, to add a rel="nofollower" tag — they currently have an existing rel="noopener" tag which, as I thought, was always placed ...
0
votes
0answers
17 views

From the Admin, how to open non-Admin links in a new window?

I'd like the Admin's behavior to be slightly different than the default: If I click an Admin link (say, go from Dashboard to Plugins), that happens in the same window - no change here. I'd like any ...
0
votes
2answers
435 views

How to remove author name and link from a shared link preview?

I have a weird problem with a wordpress site I'm working on, when we share links for it on discord shared link contains my login name and a link to author posts page (index is a page not a blog page) ...
0
votes
0answers
15 views

I want to change URLs structure of a classified ads site

I want to change URLs structures of my Classified Ads website and want to set as categories based links https://www.dashingworld.com/ad_category/mobiles-and-tablets/ TO For Main and SUb Categories ...
0
votes
0answers
13 views

../../page-name backend links are not rewritten

UPDATE: when selecting images in the media library, the view command leads to a wrong URL in the form of domain-name.com/image, though the actual URL is properly stored on the image details. On my ...
0
votes
1answer
79 views

widget to output a link to archive view

REVISED POST I am trying to go a different route as the suggested answer to this post didn't work for me. I am using child theme where I added nav widget with custom menu 'archive' containing only ...
0
votes
0answers
17 views

i need to rewrite a custom URL

i want to rewrite this url: example.com/ygal/1 to be pointed to: example.com/?vk_callback=1 add_rewrite_rule('^ygal/(\d+)/', 'index.php?vk_callback=$matches[1]', 'top'); I have press on save setting ...
0
votes
0answers
26 views

how can i add a nofollow link to the author link

Install a plugin for author box. Follow links are generated automatically. How can I change the link to nofollow in the author box a). above the author's name b). above the author's profile picture
0
votes
1answer
18 views

Remove Comment Author Link only for subscribers

I am using this function add_filter( 'get_comment_author_link', 'remove_comment_author_link', 10, 3 ); function remove_comment_author_link( $return, $author, $comment_ID ) { return $author; } to ...
0
votes
0answers
13 views

Open new links in a new tab option does not work

When adding a link a post, a page etc, I select the "the open in a new window" option. In theory, the link should always open in a new window: it does not and opens in the same page. What can I do? ...
-1
votes
1answer
59 views

How to download file without login to wordpress account?

The following link is used to share individual customer/user to download invoice PDF file. But each time they have to login and download PDF file. I want this link should download PDF file without ...
0
votes
0answers
7 views

Latest Posts' links and recent links in Link Manager in single section / widget

I am using Link Manager in WordPress 5.4.1. Is there a way to display the latest Links combined with the recently published posts in a single section on the sidebar sorted by date ? I don't want 2 ...
0
votes
3answers
141 views

How to change hover link colour for blog post (body) text only

I am using the Shamrock theme and I am happy with link colours on the main page however when you go into a blog post and hover over any links within the body they are red. I have tried multiple ...
0
votes
0answers
10 views

Audio page link not working

I have uploaded some audio files into my media lbrary (Savona Pro theme) and then successfully inserted the links on to a page. However when I click the link it doesn't work? Can anyone help as to why ...
0
votes
0answers
23 views

How to track which users click link/button?

I'd like to be able to track specifically which users click a link or button in a private paid members only section of my site. For example, if the user lands on the link site.com/media/1.pdf, I would ...
0
votes
1answer
18 views

Problems styling a Custom Link in a Menu

I have a primary menu on my Wordpress site with links to other pages within that Wordpress site. However, the last menu option is a custom link that directs the user to an external site. That link ...
0
votes
0answers
36 views

.com creates automated link in post

In classic mode, if we write "example.com", it creates automated link like : <a class="vglnk" href="http://example.com" rel="nofollow"> <span>example</span> <span>.&...
0
votes
0answers
13 views

Amazon Affiliate Native ads and Text+Images Affiliate links won't go live in WordPress

This is my first time asking a question. I am working for this website and my job is to add Amazon affiliate links to the blog posts. https://www.texasrealfood.com/ The problem is, when I add text ...
0
votes
1answer
90 views

Disable automatic embed links

Is there a way on current wordpress versions (5.2..), to turn of the automatic embed links(wp-embed.min.js), that will turn an url into an iframe? I have tried plugins, snippets, functions.php ... it ...
0
votes
1answer
23 views

author_link filter not work correctly

i want to change author link page. by default it's: site.com/author/user_nice_name but i want change it to: site.com/teacher/user_nice_name i used this code and it worked, but when i click on the ...
0
votes
1answer
128 views

My WP homepage works, but the other pages don't when accessing from out side of my network

So, I host my WordPress website on my PC. 192.168.1.5:25566 (port forward). On my LAN, I can access homepage and other pages on the site. But from outside the LAN, I can access homepage but cannot ...
0
votes
0answers
12 views

Cloned website in subfolder has wrong links

I'm sorry to ask you guys but I'm going crazy. I've been trying to figure my problem out but I spent 8 hours and still nothing seems to work. So here's my problem: I have copied my website in a ...
1
vote
0answers
26 views

Removing Title From Links to Site

So I've been using my wordpress site to blog. I've also been importing those blogs to Medium, and anytime I share the article the site title is appended to the end. So if the article is named "100 ...
0
votes
1answer
42 views

How to add a column into the link manager?

Inside WordPress admin panel, there is the "old" link manager, know also a Bloggroll. It has multiple columns in the overview, and I would like to add a column. How can I do this? (I only want to ...
0
votes
0answers
16 views

Some custom post types did not return an object

I wrote a function to register custom post types below - appetizer (working well) - vermicelli (working well) - pho (working well) - seafoodNoodle (X) - koreanSpecial (X) - koreanRice (X) - lunchBox (...
1
vote
1answer
46 views

How to automatically nofollow a set domains? (I seem to have half of the answer)

There we go with my first question ever on WPSE. Hope someone can lend me a hand here :) I am sick of adding nofollow rel attribute manually on every single outbount link. I´m looking for a code ...

1
2 3 4 5
16