Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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
901 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
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
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
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
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/
0
votes
1answer
686 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 ...
0
votes
1answer
993 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 ...
-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 ...
1
vote
4answers
4k views

Create anchor from Wysiwyg editor

Is there any way to create internal anchors without using the HTML rendering option? I don't mind but I guess my customer will ;) Thanks!
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 ...
1
vote
2answers
1k 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
25 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 ...
5
votes
5answers
15k views

Get the prev / next page links only (not title, <a> etc)

I currently use the following method to get a prev / next blog page link: <?php previous_post_link( '%link', '%title' ); ?> However this includes the outer element, name etc, I want just the ...
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 ...
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 ...
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
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
1answer
414 views

Direct link to “New post” in specific category?

How can i create a direct link to "New post" (/post-new.php), which will create a new post automatically added in specific category? In other words, i click on the link "new post in category one", ...
0
votes
1answer
1k 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 ...
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
2answers
3k views

How to remove anchor of current menu item in navbar?

Wordpress nav menu created by wp_nav_menu can highlight current menu item. How can i strip anchor from current menu item? For example, we have menu: <ul> <li class="current-menu-item">&...
0
votes
1answer
1k views

Remove all link title attributes

After reading this and this, I want to remove the title attribute from all links of my blog, as that is good from accessibility point of view. How this can be achieved? UPDATE I found a solution how ...
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
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 ...
2
votes
2answers
2k views

Add a query string to ALL links on site

Our client would like to embed his site into an iframe in their software backend. I get a query string on the first link but need to make sure that string persists across URLs for all links and ...
0
votes
1answer
939 views

How to not display a category post on blog page?

As you know, we can assign a "Category" to any post we write. We can also use a "Category" as link on the menu. Good! By default, WordPress will display all your posts in all the categories on your ...
0
votes
1answer
482 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 ...
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/...
1
vote
1answer
449 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 ...
2
votes
3answers
3k views

How do I customize my WordPress shortlink structure in link-template.php without a plugin?

Right now my shortlink structure looks something like this: example.com/?p=451 I would prefer it to look more like this: example.com/abc123 Any ideas how I can alter the code to do just this?
0
votes
3answers
602 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
2answers
431 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 ...
2
votes
3answers
9k views

Adding different classes to anchor in navigation menu

Is this possible? I want to add different classes to the anchors, so not the same on all anchors. How can I do this? PS: I am using this: function add_nav_class($output) { $output= ...
0
votes
1answer
477 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
486 views

Link for the page archive for posts, like using custom post types with get_post_type_archive_link

I am trying to get the page to list all my posts (post type = post) in archive. I can do this with custom post types, with get_post_type_archive_link(), but using get_post_type_archive_link('post') ...
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
1answer
444 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
488 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

Admin only menu/page

Is it possible to show a menu item If only admin is logged in) For any other user the menu item does not appear. For example: if there are a few pages that have shortcodes or other functionality ...
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
2answers
552 views

Recovered Wordpress installation (on localhost) links broken and images not showing

I initially had a wordpress installation on a free hosting service. After the hosting suffered an attack I got a backup of all files and the database and am recovering the site on my localhost (using ...
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(...