get_the_permalink()
doesn’t echo
anything. It just returns a string so that you can further manipulate it.
You need the_permalink()
instead, which will echo
the link.
The difference used to be clear in the Codex but now, in the much inferior, “developer” code reference toward which WordPress is migrating it is not so clear.
Related Posts:
- Is it possible to use a single custom post as the site front page
- Listing a post’s categories and subcategories
- Single post comment template not working
- How do I show google ads between post content?
- Add inline style to get_the_category_list
- Help with figuring out the future post workaround
- Archive page for custom post type not working
- Disable single view for specific post category
- Only nextpagelink on wp_link_pages
- Display a post map on a blank/new page
- How To Pass Current Post Type ID from Single Template To Custom Page Template
- Is it possible to create rel=”noindex, nofollow” for a single post if contain bad keywords?
- Custom seperate Single.php
- Set a cookie only in single posts
- Custom post type not respecting template hierarchy
- diffrent style for post single page
- WordPress object for comments frame [closed]
- I’m having a problem viewing the Youtube video
- Use different «Single.php» for custom categories
- force https except one page/post
- Single custom post type template not working (single-custom_post_template.php) not working
- adding custom post type “name” to single template
- Single.php category entries not showing right colours
- How to check if a post is in categories x,y,z inludint their subcategories
- Changing the display of the themename_posted_on() function
- How to Highlight current category on category and single page template?
- Exclude single page from function
- Make Next and Previous on single-$posttype.php use the same order as archive-$posttype.php
- WordPress, alternative single post template
- get full real path of thumbnail post img wordpress
- how to loop through this in blog single?
- Modify post template on Divi Theme
- I want to signin from first wordpress site to other wordpress website without registration..without using network mode
- Try to showing product file size on product single page
- Improve related posts
- Get active term on single (CPT) page
- Having single posts appear under the blog homepage and highlight menu items properly?
- Single.php loading fully on localhost but not on server
- explain why is_single doesn’t work
- Custom Post Type archive above Single Post in single.php (same author)
- How to disable the single view for a custom post type?
- How to check if the product is in a certain category on a single-product.php in Woocommerce?
- Custom post type single page returns 404 error
- Custom post type single-{custom}.php not working
- How to remove custom post type archive
- How to use a custom post type archive as front page?
- Custom Post Type Archives by Year & Month?
- Get custom post type slug for an archive page
- Create a custom archive page for a custom post type in a plugin
- What is singular.php?
- How to detect single.php (but not single-portfolio.php)?
- Custom Post Type Settings page, choose page to display archive
- Adding a menu item for a Custom Post Archive
- Conditional for single-{post-type}.php
- Custom Post Type Archive Page not showing
- Check IF is a “single product page” and Check the “role” for a Redirect
- Adding custom post type archives to a WordPress menu
- How to set a custom post type to have viewable future posts
- How to modify single.php in a child theme?
- Add_action to wp_head via functions.php
- Custom Post Type Template – Archive
- Page Template as Custom Post Type Archive
- Custom post type yearly/ monthly archive permalinks
- Custom Single Post By Category
- Can’t get post id on page that is a custom post type archive
- Meta_Query as a way how to setup CPT permalinks – is it a good thing?
- How to rewrite slug of custom post type archive page
- Using single.php from plugin folder instead of default template folder
- Template for specific post of custom post type
- How do I get the category URL from get_the_category?
- How do you create an archive for a custom post type from a plugin?
- Custom permalink structure only for default posts
- pre_get_posts with tax_query causes empty result
- Related Posts by Multiple Tags?
- Proper way of making custom post type landing page or archive page
- Custom Post Type Archives by Date with Custom Permalink
- Sort Custom Post Type Archive by Taxonomy Term [duplicate]
- Single custom post type page redirecting to 404 page
- A special single page templates for posts under a category and all its child category
- How do I create a link that will always show the latest post?
- How to List All Custom Post Types Names (Not Posts)
- Make Two Views of Post Type Archive At Two URLs
- Posts in multiple Categories different single.php
- How to seamlessly redirect between different archive and singular slugs?
- Change title in head on Archive page
- Archives for custom post type based on a “date” meta value
- Custom Post Type Archives with 0 Posts Redirects as 404
- Pre get posts for single post
- How to filter custom post type archive by meta value
- What are the advantages of using a custom post type archive?
- Page is defaulting to archive page and not designated template
- custom post type archive page url to point to Page permalink
- Pull Two Posts Into Custom Post Type `single-cpt.php`
- Custom SQL query to get List of posts with featured image url
- single page wordpress
- Get taxonomy name of current post
- “Edit” option for custom post types archive page
- is_singular() not working if called via callback function of admin-ajax.php
- Change number of posts to show on Archive page (custom post type)
- Disable Single Post View for Specific Taxonomy on Custom Post Type