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
77 views

How to prevent Wordpress from abbreviating long slugs?

By default, WordPress cut some words from long titles of posts, How to prevent Wordpress from abbreviating long slugs?
0
votes
2answers
397 views

Open the_author_link() in a new window

I need an extra pair of eyes on this. I have customized a block of code in a function of a commercial theme, which is the following code: <div class="author-description"> <h5>...
0
votes
1answer
28 views

Easing the download of a regularly uploaded pdf

I have a Wordpress page. The user of it, who is not a computer expert, weekly uploads a one-page pdf onto a page. The menu has a link to the page, and then the visitors can click on the ever fresh ...
0
votes
1answer
843 views

Image linking and lightbox

I'm having one problem that i can't solve for quite some time. I'm building a portfolio site using Expositio theme. I need all pictures to open in lightbox when clicked, but instead of that, when I ...
1
vote
2answers
205 views

How to properly insert a link to a template in WordPress?

I am used to creating websites outside of wordpress just using HTML, CSS and JS. Normally if I want to create a link to a page, about-us.html, I simply add: <a href="/about-us.html">About Us<...
0
votes
1answer
73 views

Links open when scrolling on touch devices/mobile

On all touch devices both Android and iPhone and iPad, when scrolling with finger over a link the site opens the link instead of ignoring the press and just scrolling as touch devices normally do when ...
1
vote
4answers
154 views

Page-Linking Structure

I'm trying to create a custom WordPress theme from scratch. As you can see, my file structure looks like this - footer.php, header.php, index.php, about.php, and contact.php within my theme folder: I'...
1
vote
2answers
564 views

Button insert link on front wp_editor not working

I display a wp_editor on the front-end and everything was going fine until a recent WP update. Now, the "insert/edit link" is not working due to a Javascript error: Uncaught TypeError: Cannot set ...
1
vote
2answers
460 views

How do I write the link from front-page.php to home.php?

Sorry for this, but I really combed everything there is on the subject and cannot come to the solution, although it is probably super-simple: I have a front-page.php set as the static front page of ...
0
votes
2answers
17 views

trying to locate the correct file to edit my internal linking anchor tags

I am trying to locate the correct file to edit my internal linking anchor tags i.e.<a href= Can anyone point me to to the correct file? When I view the source code I see about 50 of them but I am ...
1
vote
0answers
110 views

How to filter the image embed code based on link type

I want to add a new class to the <a> that gets generated around an <img> when it's inserted into a post, but only if the link type is set to "Media File". I see that similar info is ...
1
vote
1answer
39 views

Creating a navigation link to my front-page

I have a menu linking to each of my pages, but I cannot seem to get the link to my front-page working...What is the correct way in Wordpress to link back to your front-page? This works for all of the ...
1
vote
1answer
41 views

Linking from Menu and a Page to the latest post from a specific category

I am trying to figure this out from similar questions asked, but I am not sure I am finding what I need. I have a utility menu and a page that should have links to go to the latest post of a specific ...
0
votes
1answer
161 views

Edit permalink for certain pages

I'm creating a website based on an old and positioned one. I've created all the sections and I need to know how can I add "/services/" as a prefix for some pages... I mean, not all pages are ...
0
votes
1answer
49 views

Server peek by Own-IP-Calls?

My site did not load a few times in the past day so I contacted my webhost and asked for a reason - their answer revealed, that Own-IP-Calls were the reason for the increased traffic. As far as I ...
0
votes
1answer
516 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') ...
2
votes
1answer
1k views

append url parameters to all links

I have a form in all my pages, and it has an hidden field named ref If the user land at www.example.com/1/ref=fb_ad and fill in the form in this page - the form catches the URL parameter. However, ...
-1
votes
1answer
945 views

How to make temporary expiring link for a downloadable file

we need a plugin or code. which work for download link expire after some hour. like when anyone click on download link its generate a string and its save to db after 24 hour this download link string ...
0
votes
1answer
352 views

Passing parameter from the current URL to redirect to another url

I have a search results page and on the page, I would like to be able to filter by category. So when the user searches an item, it gets passed to the results page in the url like: website.com/?s=...
0
votes
0answers
199 views

User Affiliate Token Generator?

I want to add the feature if a user clicks on a Link which is already generated with a affiliate link: www.example.com/id82312312312?mt=8&uo=4&at=AFFILIATE-ID But if a user clicks on the ...
0
votes
1answer
3k views

My home page is still showing link “localhost” [duplicate]

Please I have created my site and hosted it..all links and pages are working fine, but when I want to go back to homepage from another page it creates an error, I discovered the page address is ...
2
votes
3answers
3k views

Keep getting same permalink with WP_Query?

I have this code below, and I wish to show each link of each post, but I keep getting same link to all posts which is the link of the page. $args = array('posts_per_page' => 5,'order' => 'DESC')...
1
vote
0answers
259 views

Internal Links that Automatically Update

I am currently building out a big site with a lot of content right now and am struggling with an aspect of internal linking. I had assumed I'd find lots of people with the same issue, however as I can'...
1
vote
2answers
1k views

Read more link to external webpage

is it possible for the "Read More" buttons in front page which normally leads to the post , to change it to lead to an external webpage. So one can lead to post and the other can lead to external ...
0
votes
1answer
111 views

How do I create a root link in wordpress to a PDF file?

I want to upload my resume to media (which I have done) but link it directly to joeblow.com/resume I want that link to display the PDF ideally or if not possible to redirect to a URL (the resume is ...
1
vote
1answer
461 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 ...
6
votes
3answers
5k views

How to print translation supported text with HTML URL

I am somewhat new in WordPress if it is about "deeper" customization. Now I am having this function: esc_html_e( 'Dear Guest, with Your information we not find any room at the moment. Please contact ...
0
votes
1answer
913 views

Add pagination to search.php page

When I want to use the_posts_pagination() in my search.php page and I click "2" or "3", it goes on 404 page (this link: mywebsite/page/2/?s=a). How can I add pagination for search.php page? SOLVED ...
0
votes
1answer
294 views

Adding images to anchors in the list created and fetched with wp_nav_menu

I have created a custom menu which is usable from the wp-admin. I call it using wp_nav_menu and the menu is created in an ul as text-only links. I wonder if there is a way to change these text-links ...
1
vote
1answer
491 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 ...
2
votes
2answers
327 views

programatically change href to onclick=window.open

Does anyone know how to programatically change link from: <a href="some_url">click</a> to: <a onclick="window.open('some_url','_blank', 'location=no')">click</a> so that ...
3
votes
1answer
1k views

Count and show Clicks on external links in a single page/post

I have the following scenario I have a post that calls a table by shortcode The table contains links to outside hosts (MediaFire, Dropbox..etc) I want to track how many times all the links from that ...
1
vote
1answer
36 views

Removing link '<a>' from '<li>' on meta_value in custom feilds

I want to remove all links on my custom fields. My fields for now : <li><a href="">my item</a></li> and I'm trying to get this: <li>my item</li> This is the ...
1
vote
1answer
829 views

Text Widget Links Not Working

I am trying to add a simple link to an 'About' page in a Sidebar Text Widget but when I test it the link does not work and I get an error on the linked page: "The page cannot be displayed because an ...
0
votes
1answer
206 views

Wrapping shortcode content in a span or link

My shortcode includes a switch statement, that outputs a one-word weather summary. This displays correctly when I swap $summary = for return, but I cannot seem to get it working with a <span> or ...
1
vote
1answer
40 views

Link that refers to a menu item with dynamically generated URL

I have a menu item that always links to the latest post from a specific category. The link is generated dynamically. So every time I create a new post, the menu item URL changes. I need a CTA ...
2
votes
4answers
19k 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
3answers
199 views

Why is the Links Manager visible?

The admin panel of my WordPress (4.7.2) installation on my hosting (godaddy) has "Links" section enabled. I set it up a few seconds ago with storefront theme. Then removed storefront and activated ...
0
votes
1answer
332 views

Position a hard-coded menu item

I used a piece of code I found here in wordpress.stackexchange to add a custom link to my menu/nav. I adapted to my needs and it works great. The problem is it adds the link in the first position in ...
0
votes
1answer
68 views

Wordpress Conditional Login Links

I am simply trying to add conditional Woocommerce login links to a widget area. I need help identifying my code issues. I would like it to Welcome the user in the initial conditional statement but ...
0
votes
1answer
221 views

Disable links to images only if link is an image

I'm looking for a code to put in my custom-functions.php that will only disable the links to images that link to an image (jpg, jpeg, png, gif, ect.) I used this code provided from this page: remove ...
1
vote
1answer
131 views

cancel reply link results in 404 error

Our blog is in a subdirectory of the WebPage http://example.com/blog. Here is an example of a cancel reply link: <a rel="nofollow" id="cancel-comment-reply-link" href="/postcategory/postname.html#...
1
vote
0answers
289 views

Get the url of a page template without using the page slug and ID

Can I get the url of the page "page-template-contactus.php" using "template-contactus" only?
3
votes
1answer
1k views

opening links in new tab using - add_filter( 'the_content', 'make_clickable');

The following code in function.php, works fine for making the links - clickable, add_filter( 'the_content', 'make_clickable', 12 ); But can I make the links to open in new tab?
0
votes
2answers
298 views

Link to another website with the same url path

Can I add a button on the menu bar that take the user to another website with the same current path? For example, I am in the page with url: www.example.com/test/blank And when press the button it ...
1
vote
1answer
236 views

Linking to the most recent post in a Custom Post Type

I found this wonderful code that allows you to create a link to the most recent post in a category, and it's perfect for what I need. I tried it out, it works great. However, it doesn't include posts ...
0
votes
2answers
490 views

How to set all external links to a certain domain to “nofollow”?

I am searching for a code or better a wordpress plugin to set automatically all links only to a certain domain (and of course to all of its subpages) to "nofollow". I could not find any plugin which ...
0
votes
1answer
314 views

Wordpress4.1.15 Dashboard links not working

I have Wordpress 4.1.15. When I tried to update to ver. 4.7.2 (clicked the link on the dashboard). It wrked for few seconds and returned back to dashboard screen. After that, no links in Dashboard are ...
0
votes
1answer
34 views

Let Wordpress to go opening an external URL

I need to let my WP site go external with some links. I've got this variable in function.php $link=<a href=". $_COOKIE['link'] .">TEXT SHOWN</a> Where $_COOKIE['link'] contains a ...
0
votes
1answer
48 views

How to use page jumps to top of banner and page title?

I've tried using page jumps as instructed by countless websites to "jump to the top of my page": Source code followed by destination code: <a href="top_page">LINK TEXT HERE</a> <a id=...