According to the codex, get_post_permalink applies to custom post types. I don’t think you are using a custom post type, right?
Instead, try get_page_link( $page->ID )
Related Posts:
- Show content if parent page has children
- Easy way to process search results before displaying
- Get only the grandchildren, not the direct children of page/current page?
- How do I list the child of a child page [duplicate]
- How to hide all child pages with post_query?
- Child page menu in sidebar
- How do I Turn This Into An if statement?
- Query Pages and post excerpts dynamically
- get_the_title() gets printed out twice
- Display child page content of a specific parent on home page
- Child and Parent Pages list of sub pages
- Getting a value from a custom field from a page that shares a parent with the current page
- My function echos only “array”
- PHP: Why does my code work in index.php but not a widget?
- List of child pages fetch next results at link click
- Sidebar current menu item for parent
- How to get URL of current page displayed?
- exclude multiple terms using get_terms() function
- Create a global variable for use in all templates
- Dynamic URL to reference custom PHP files
- How to auto login user again after change user_login
- WordPress Shortcode and Dynamic CSS
- Add value to usermeta without removing previous values?
- Duplicate domain database to local – How?
- Creating a WordPress shortcode
- Add WordPress to Meteor js site
- How to access function from outside of a class within this class in WP plugin?
- Get most recent media upload
- Colorbox ajax loading of outside HTML content works perfect on localhost but not on server
- Order posts randomly, not by date
- Get different images for mobile and desktop with php, advanced custom fields without using js and ajax
- How to update wp-config file in Docker
- Simple Plugin with custom javascript wont work – no console error
- Using file_get_contents with Gravity Forms uploads folder to create images in the media library returning false
- How do I dynamically populate a shortcode with a variable from URL?
- WP Walker using custom css classes
- Custom profile field with birthday. Troubles with
- WP CRON duplicate wp_insert_post with has < and > tag
- Programmatically create page when saving custom post type post
- Do not execute If User is login as Administrator or any Specific Role
- How to change menu order item
- Path for php file for inserting data through html form
- How to create pagination for users list using custom array?
- Add shortcode in my div
- Syntax error in a shortcode function
- Execute a function every hour in the background
- Hide a div to subscribers(user role) in one page (is_page)
- CSS change in woo commerce Place Order Text [closed]
- One account with multiple logins
- Get the name of menu item with wp_nav_menu
- What’s wrong with this piece of code? [closed]
- Where to copy woocommerce files to in my custom theme to avoid editing the core plugin?
- Run JS Code on userlog out
- Twentyfifteen style author comment
- I installed WordPress locally now how do I login?
- Check in which custom taxonomy belongs and change the style
- Attaching images to posts manually (i.e. with custom code, without the use of an API)
- How do I add my PHP app to a WordPress page whilst keeping semantic URLs?
- Query the links Database
- How do I choose not to display the title header on a specific page?
- How to internationalize header image?
- Isn’t Returning Value While Using SELECT COUNT(*) FROM {$wpdb->prefix}
- Cascading dropdown select search based on Parent Page & Child Page
- WordPress cascading dropdown selection search based on Parent Page & Child Page
- Is it possible to order posts using multiple meta queries, i.e. show posts from first meta query, then the second?
- Settings API form – submit with AJAX
- File from parent theme imported to child theme doesn’t work – any ideas?
- I can’t go to the page archive-{post_type}.php
- Loading Widgets Via Child Theme
- WordPress 5.6 Application Passwords
- Get title of page containing post grid within the posts
- Problem with displaying CSS Stylesheets – Am I adding them correctly in my wordpress child theme?
- (solved) WordPress Site not loading properly
- Class ‘WP_Privacy_Requests_Table’ not found
- Use Search Term in html link and redirect
- register_block_type is not working properly
- WordPress creating a compund query or using data from one post type to access another
- AJAX numerical pagination problem in TwentyFifteen-child theme
- Store data from JavaScript object to custom table in user account
- Permalink doesn’t navigate to post (changes only url)
- Javascript Tab Gallery with Advanced Custom Fields
- Generate a radius search of custom post type locations
- If input field has value Require another field – PHP
- Popular Post Not Show
- truncating imported rss-feeds
- WordPress Setting API – There is no field in options.php
- WP_Query count of different meta key values [duplicate]
- Snapshot Theme from WooThemes — empty ‘alt’ attribute
- how to set category name for a post
- Move wordpress sidebar on homepage up to new position
- Converting Menu Links to List Elements
- What’s the most efficient way to write multiple WP_Queries on a page?
- How to get shared CSS body class between translated WPML pages [closed]
- Can’t get options with $data[‘variable’]
- I am trying to replace a string with other from function.php
- Custom archives page by month and year – nesting problem
- kali php problem [closed]
- Why is my array_diff usage breaking things?
- PHP warning: Undefined array key 2 in feed.php
- How to continuously developing a WP site that is already deployed in production without damaging it during development