Based on this question about retrieving WordPress post slug, you could put together a link like the following:
<a href="http://www.example.com/md/<?php global $post; echo $post->post_name; ?>">link text</a>
Whether that goes to a functioning page or not, I don’t know. It seems like you may want to change rewrite rules in the functions but I’m not sure from what you’ve said.
By the way, you may want to read why links that only say ‘Click here’ are bad practice for SEO and accessibility.
Related Posts:
- How to get URL of current page displayed?
- Disable Attachment Pages Completely
- how to get permalink structure with php
- Facebook Comment Count
- How to Remove Parents Category Permalink from Posts
- add_rewrite_rule with bottom priority doesn’t handle the WordPress pages
- Put a link to a category round a hard coded A HREF
- How is WordPress manipulating the posts like there are folders?
- wordpress upgrade has broken my permalinks
- Featured image fallback link to permalink
- Do changes to WordPress permalink custom structure affect old urls?
- WordPress custom slug (endpoint) and compare all links
- 200 Rewrite blog post links
- php script to change slug in post automatically
- wp_trim_words() does not work with my code Am I doing any mistake in my code?
- Changes in permalink structure in WordPress and how to apply to in-site links
- WordPress Persistent connection rule does not work for “posts”
- WordPress every page is 404 not found including admin resources
- WordPress returning 404 for multisite pages
- How to use $_GET function WordPress backend
- Create custom permalinks to show Custom Post Type’s relationship?
- How to get post permalink url without a href
- get_template_directory_uri() providing wrong path for img
- stripping tags from excerpt in WordPress is not working
- Change product_base programmatically
- Divi change project category slug
- Custom post type permalinks do not appear using the link functions
- How to Handle Going Backwards in Navigation When Referrer in PHP/JavaScript won’t work?
- Remove slugs from custom posts type
- .html end of URl affected to SEO?
- Search only working on front page (index) , not working on other pages
- how to edit a specific post slug using a php code?
- Creating a Category Taxonomy
- WordPress theme showing blank page
- Strip hashtag off permalink with php
- Insert PHP code in Text
- Permalinks: site.com/post-tite vs site.com/post-id/post-title for SEO and Speed
- Can not call .php files after switching to %postname%
- WordPress permalink issue
- Change permalink structure specific category
- understand what code is doing when prepending /blog
- Custom URL for multiple categories hierarchy
- WordPress redirects to localhost
- Allow two posts (from different categories) to have the same slug
- Test the existence of a page/article by its URL, taking in consideration the URL rewriting by filters
- 404 on old link after changing post url
- url not using query string no longer working
- Custom PHP form needs refresh to load page correctly
- Child-Theme Category View with modified permalinks (%category% removed)
- Rewrite rule not working, but only when parameter is text
- How does Permalink work with the AMP plugin after Removing Parent Permalink Catalog from Posts
- Get WordPress username to customize url
- Permalink doesn’t navigate to post (changes only url)
- Post permalink buttons all going to the first post
- Permalink changes after several minutes after saving post
- How to edit button permalink inside function.php using a child theme?
- WordPress/NGINX not respecting the category URL for new posts
- WordPress generates weird permalinks
- Custom content using in_category
- What is the proper way to call a function (from functions.php) on a link click?
- How do I generate formatted permalinks as specified in backend options?
- 403 Forbidden Localhost Wamp Apache Php
- redirect 301 with special character like WIX site “#!”
- Permalinks and custom PHP application
- How to solve 404 permalink errors on nginx server
- Some links broken after updating WordPress version
- add_rewrite_rule questions
- Weird slug in archives permalink
- WordPress Rewrite Issue
- Would it be possible to route WordPress Through an MVC Application
- Newly published content gives 404 on wordpress
- set new link as permalink
- Multiple URL from Custom post name
- echo variable containing html and the_permalink();
- append links with unique number string
- get_permalink returning first letter
- Get permalink for a post from inside WordPress and route to a related site
- custom data in url
- Make a permalink to the most recent blog post
- PHP code for link with text
- Remove /category/ from category (archive) page URLs (without using a plugin)
- Accessing WordPress Functions get_permalink() in Vanilla PHP?
- WordPress add parameters with friendly url structure
- Add any username as link prefix and show data from that specific user’s profile on wordpress pages – with no login required
- how to goto specific page number including title with permalink
- How to extract URLs from wordpress taxonomies
- WordPress 6.1.1 UTF8 Slug Limit Increase
- why css file not link?how to create permalink?
- How to automatically flush permalinks?
- Execute wp_after_insert_post after the permalink is customized
- WordPress CPT & Custom Taxonomy with the SAME Permalink Structure
- Remove slug of multiple custom post types with and without hierarchical
- Modify the permalink structure for a specific category
- change the blog in the url if you go from a specific page wordpress
- Is it possible to go to the next post in the same category?
- WordPress per ACF – permalink is not working
- Processing data and redirecting with query string
- I’ve added SKU to Woocommerce permalinks, but I have small issue
- Post returns 404 after changing the permalink using post_type_link
- Cannot access the other pages after successfully editing post type