get_the_permalink() returns the permalink as a string and doesn’t echo it. You either need to echo this yourself
<?php echo get_the_permalink(); ?>
as you’ve got in some of your other <?php tags, or you can use the helper function the_permalink() which does echo
<?php the_permalink(); ?>
the same pattern as you’ve used for the_title().
Note that these aren’t completely equivalent: the_permalink() applies an extra filter, so it’s probably worth using that one in case some other code you’ve got does use the filter.
Related Posts:
- Disable Attachment Pages Completely
- Facebook Comment Count
- Conditionally loading JavaScript based on the Advanced Custom Fields in the post
- Is there a reason why my wordpress PHP page isn’t loading into my PHP template
- Conditional statement for parent, child and grandchild pages
- Problem with ACF shortcode with Repeater Field in WordPress? [closed]
- How to Explode a Textarea Field and Echo each line separately, wrapped with HTML
- Advanced Custom Fields Image Field returning ID instead of URL [closed]
- Can an array be used as a meta_query value?
- Featured image fallback link to permalink
- ACF check if variable has http, if else return string
- Do changes to WordPress permalink custom structure affect old urls?
- Importing hard coded custom field into acf field
- Strip characters, Including spaces, for tel: link
- How can I add multiple ‘tax_query’ arrays via a loop?
- ACF page while loop breaks footer while loop
- Change output based on text field value
- 200 Rewrite blog post links
- ACF: how do I get the fields and its values of a specific group?
- Saving an array of dynamic repeater data as post_meta
- Output ACF repeater on frontend user’s profile page (created with Ultimate Member) [closed]
- WordPress Persistent connection rule does not work for “posts”
- Remove the first 5 characters of the_title and orderby that
- Unread Repeater field IMG alt not working
- Slick + PHP + ACF + JQuery slide reveal not working
- 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
- How to create an ACF shortcode with Repeater Field in WordPress? [duplicate]
- stripping tags from excerpt in WordPress is not working
- ACF put a comma after the last repeater field value [closed]
- Show ACF field with link to ultimate member profile/WordPress user profile below the post (single post layout)
- Can I set up a hover animation in CSS depending on a PHP conditional?
- ACF Repeater Pagination stopped working since upgrade to php7.2
- what is the method to echo class attribute inside the i tag? [closed]
- Show get_sub_field value if it exists [closed]
- Search only working on front page (index) , not working on other pages
- Including Custom fields within the_content
- Remove Post if Advanced Custom Field is checked to fix paging
- WordPress theme showing blank page
- Strip hashtag off permalink with php
- WordPress permalink issue
- Update user repeater meta (ACF) with another user meta field value
- Delete images from media library when user deletes an image from ACF Gallery
- Get main parent category for post (WordPress/Advanced Custom Fields)
- ACF Taxonomy field values not select in backend
- Use WPQuery to match to specific repeater row in post
- Rewrite rule not working, but only when parameter is text
- ACF values to Script with auto refresh
- ACF relationship on user profile page used for allowed access
- ACF – Can’t get custom post type by taxonomy
- Advance custom fields variable with if statement & Function
- ElseIf Statement with ACF Group field
- How does Permalink work with the AMP plugin after Removing Parent Permalink Catalog from Posts
- Place product field value as variable in php
- ACF – Get ID of relationship field in flexible content
- Post permalink buttons all going to the first post
- WordPress/NGINX not respecting the category URL for new posts
- WordPress generates weird permalinks
- Get list of posts from attachment
- How to output values from a loop into a javascript array
- Pulling Products from an API
- Permalink like example.com/taxonomy/post_type/postname
- Scheduling a post using publish date from a custom field. Resulting post is set as published in the future instead of scheduled
- Custom content using in_category
- What is the proper way to call a function (from functions.php) on a link click?
- Ordering / grouping posts by datepicker ACF
- How do I generate formatted permalinks as specified in backend options?
- ACF Images If/else
- How to solve 404 permalink errors on nginx server
- add_rewrite_rule questions
- Page returning ID from array, how to return the correct values for post in acf wordpress
- Sort by multiple options in custom field
- Newly published content gives 404 on wordpress
- If or/and statement advanced custom fields [closed]
- set new link as permalink
- echo variable containing html and the_permalink();
- Top menu disapears in Category Pages when filtering using ACF
- append links with unique number string
- the_post_thumbnail unless video id is added
- get_permalink returning first letter
- custom data in url
- Add comma between variables [closed]
- ACF | WooCommerce | Theme Development | How to include a /template-part/ that makes use of ACF’s on a custom WooCommerce homepage?
- Add any username as link prefix and show data from that specific user’s profile on wordpress pages – with no login required
- Custom WordPress Function – Adding items from Foreach Loop into an array and Updating Field based on array of IDs (ACF + WooCommerce)
- Show button in header when product custom field is not empty
- 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
- How can I get values from a custom post type depending on where I click on my SVG map?
- Creating posts with php-script + csv
- How to automatically flush permalinks?
- Execute wp_after_insert_post after the permalink is customized
- “acf/load_field” Critical error upon saving/updating WooCommerce products [closed]
- How to get ACF field to show up on all posts on front end?
- How to create advanced custom fields for backend content
- Processing data and redirecting with query string
- Why does my custom slug only show in Gutenberg editor after page refresh?
- I’ve added SKU to Woocommerce permalinks, but I have small issue