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
1answer
2k 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 ...
7
votes
6answers
21k 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
1answer
22 views

Problem with links once in portfolio item

Hope someone could help me. Link problem: This is my Homepage URL: https://epix.com.mx Portfolio onepage link: https://epix.com.mx/#Projects Portfolio item link: https://epix.com.mx/?portfolio=...
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
656 views

How to change the canonical link from a category or taxonomy archive?

On this url: https://www.phuket-luxury-villas.us.com/tourist-spots/buddhist-temples-wats/ I have a wrong canonical link: <link rel="canonical" href="https://www.phuket-luxury-villas.us.com/tourist-...
0
votes
2answers
2k 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
1answer
791 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
24 views

Edit post & page option does not display on latest wordpress

I am not able to edit the WordPress default posts/pages from front-end. I have tried to deactivate all plugins, check/uncheck toolbar option(from profile) and also wp_footer() function in the file. ...
0
votes
2answers
60 views

Add link to php field text on wordpress form

I have bought a wordpress template but the developers say they cannot help me with what I need. The theme has a hotel reservation system integrated, and the form brings a field to “place” the user ...
1
vote
2answers
3k 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
2answers
4k 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">&...
2
votes
2answers
704 views

Change links automatically to affiliate links

My goal: I want external links to shops I'm affiliated with (for example amazon) to automatically get the affiliate ID attached to it. Example: link I put in my blog post editor https://www.amazon....
0
votes
0answers
15 views

How to find what pages are internally linking to a page?

I have searched and searched and I must be missing something really obvious. Sorry. I want to know which pages internally link to a particular page. So page-a has some content (eg 'look at this') that ...
0
votes
1answer
45 views

Wrong activation/confirmation link in email

I've created a custom login page login.php inside the root. (e.g.: http://www.example.com/login.php) /* LOGIN PAGE. */ // Login URL. function custom_login_url($login_url, $redirect, $force_reauth ...
0
votes
0answers
10 views

How to list posts from a sub-category that is listed in a parent category (more details below)?

I have an unusual situation I put myself in. I'm making a custom theme and I want to display a list of subcategory posts with its own URL like this: https://domain.com/category/sub-category So far, ...
0
votes
2answers
956 views

How to link a word comprised of a custom field with another?

I want to link content comprised of a custom field(field1_details) using another custom field(field2_link) which is a URL type. the_field('field1_details') is text_area field and get_field('...
0
votes
1answer
703 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
2answers
647 views

Custom loop pagination links not working

I'm bringing up an issue that could not be solved after googling for solutions over a few days. The goal I have to meet is to output a pagination for a custom post type named office-magazines with ...
0
votes
0answers
12 views

Adding wp users ID into a link address from a DIVI modul

I try to change the navigation of my members in the backend. A logged in user can edit his data on a post page. The link on the left menu "Meine Daten" will direct the user to his post. The ...
0
votes
2answers
659 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 ...
3
votes
1answer
758 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
746 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
2answers
2k 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
16 views

A dash can replace a period in a link, how to fix it

My link structure. I noticed that if you put a dash instead of a dot, it will also work. How to fix it? Normal link https://website.com/post-name-one.html Dash instead of dot link https://website.com/...
1
vote
1answer
2k views

Executing a shortcode from a "normal" text/hyperlink

Is it possible the executed a shortcode from a normal HTML? For example: <a href=[shortcode]> press here</a> and when the user clicks the text, the shortcode is called? I Basically I ...
1
vote
0answers
17 views

Including users in insert link internal link search in Gutenberg

When I select text and insert a link in WordPress admin using Gutenberg, WordPress searches for internal pages based on the link text. It returns posts, custom posts etc., but not users. I found some ...
1
vote
1answer
1k 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", ...
1
vote
0answers
18 views

Copy button for anchor link

I use my own webpage to help the users of my android app. I get many emails and many times they ask for help that is already in the help site. Sometimes the exact help they need is on a specific ...
3
votes
2answers
24k views

How to get a page url by a page id?

I tried to use get_page_link('page-id') and get_permalink('page-id') but the error below occurred. Fatal error: Call to a member function get_page_permastruct() on null in ... How can I get a page ...
0
votes
1answer
2k 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
634 views

Allow insecure embedded content in a SSL secured website

(After some research I think the straight answer is "no, your SSL secured website won't allow to embed insecure content" but I have to ask just to be 100% that is impossible.) I just activated a SSL ...
0
votes
1answer
2k 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
2answers
821 views

Add a data attribute to list item element in menu

Looking to add a data attribute to a list item in a menu, I can see that some threads on here can add it to the actual <a> link tag, I am looking to add it to the list item itself <li> So ...
0
votes
1answer
832 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 ...
3
votes
2answers
3k 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
772 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
2k 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
1k 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
vote
1answer
655 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 ...
0
votes
1answer
2k views

Adding a user's ID behind the <a> tag ref link address

Good day, everyone: I want to make wordpress to add the user's id number behind the ref's link string, so that, for example <div class="toolsbutton"> <a href="http://mysite.com/mysite/page-...
0
votes
2answers
1k 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
21 views

WordPress does not show correct page

Lately, my WordPress web tends to show a random page when an internal link is clicked. It currently does not show the home page as the root page. I can't find any system in this behavior. Sometimes, ...
0
votes
1answer
15 views

how to turn a link field into a button or link text

<?php if ( bbp_get_displayed_user_field( 'youtube' ) ) : ?> <p class="bbp-user-youtube"><?php printf( esc_html__( 'YouTube: %s', 'bbpress' ), bbp_rel_nofollow( ...
1
vote
2answers
1k views

Plugin for wikipedia style references in WP?

I find inline links offputting to read so want to use wikipedia style foot-of-article references with incremental numeric linking to the external link reference. I can just stick the HTML in but on ...
0
votes
1answer
17 views

How to share the author's archive?

<hr> <h3><?php esc_html_e( 'Forums', 'bbpress' ); ?></h3> <?php if ( bbp_get_user_last_posted() ) : ?> <p class="bbp-user-last-activity">...
3
votes
7answers
49k views

Change logo url link

I'm trying to change the logo url of the site to "mywebsite.com/side2", but it is not working, can anyone tell me where is the error in the code below? add_filter( 'login_headerurl', '...
1
vote
1answer
19 views

Why do my categories redirect?

When I create a new category I can't open it on my website and instead it redirects to another one called 'Macedonia' E.g. I made a new category called food but when I open the link http://...
0
votes
0answers
38 views

Best way to add onclick function to all internal links using javascript

As part of a plugin, I am looping all <a> link tags on a page and adding an onclick attribute. But I only want to add the onclick attribute IF the link URL is on the same site... So I am using ...
0
votes
1answer
14 views

Trying to get all links in my posts

I am trying to return all the links inside my posts'/pages' content, but I can't figure out how to get my regex/loop to work right. Here is what I have at the moment, that just returns a bunch of ...
0
votes
1answer
51 views

1
2 3 4 5
17