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
- What’s the net::ERR_HTTP2_PROTOCOL_ERROR about?
- Undefined function mysql_connect()
- MySQL column count doesn’t match value count at row 1 [closed]
- Override get_template_directory() in child theme?
- $wpdb->get_results(…) returns empty array despite correct query
- How to create a test that calls is_front_page in phpunit?
- Inserting dynamic content into a page
- WordPress AJAX Pagination with query_posts
- Only Showing Upcoming Events
- Check if post of title already exists
- Remove/unset options field from backend Settings->General?
- Site Title and Tagline in Theme Options Page
- Static Frontpage Pagination – Custom loop
- Check if user already visited this post today
- wp_signon always passed the password eventhough password is wrong
- How can I hook into and edit the text of a wp_nav_menu tag?
- How do I remove a require_once admin panel from the parent theme from the child theme functions.php?
- Removing jQuery migrate and working with dependencies
- How to get the registered sidebar’s name by its id?
- Export User Info to CSV from Front End
- How to change date language without changing the entire site language?
- Check if page parent has certain template
- WordPress admin never finishes saving page on site with large page count
- How to loop over custom fields in a page template?
- wp_delete_post deletes all posts instead of just expired ones
- populate dropdown wordpress form from database custom table
- Prevent publish status/date saved on transition_post_status hook
- How to sort results from a custom database table
- How to get the term before the last from a custom taxonomy?
- Add/echo div with Analytics-Code to function in functions.php
- Trim first 2 words of the exceprt
- How do I put the homepage link inside the php _e code?
- Initiate only latest version of a class
- Check if a user already voted [closed]
- Strip Image Classes from HTML Output
- Additional image sizes are not being generated
- Appending meta value onto post content in WordPress during save_post
- sql query to put quotes around numbers in img tag
- Problem with WordPress Ajax form
- WordPress if (is_page) translation on certain page
- Uploading video to google drive via frontend [closed]
- Using Font Awesome as post thumbnail
- Header has extra HTML block at top before my code
- admin-ajax.php responding with 0
- Deregister and Dequeue Stylesheets From a Plugin and Enqueue a Child’s Stylesheet/s
- How to use return in my custom function instead of echo
- Validate Uploaded Image using WordPress’ Built-in Functions?
- Strange wordpress slowness
- Setting All Drafts to ‘exclude-from-catalog’ in WooCommerce
- How to properly insert a link to a template in WordPress?
- Difference between ‘type’ => ‘text’ and WP_Customize_Control
- Locating Global Variables
- WordPress php filter admin_body_class not working
- $wpdb->flush(); breaks the loop
- Create a new usermeta field for users
- get post based on category chosen in drop down – The ajax method
- Is there an equivalent to WP_Error object I can return in the case of a successful REST request?
- Global variable $post returning incorrect object
- how to make separate field in wordpress user_data_
- Where to edit the template that is generating the code for dynamic_sidebar left-sidebar in the Understrap theme? [closed]
- Append HTML Using Shortcode
- Set the background to a default image if there isn’t a specified “featured image”
- Proper syntax or method for keeping url in modified isotope / category links
- Get rid of this Strict Standards warning [closed]
- WordPress Access allowed to fewer pages till user logs in
- How to pass aa JS variable to PHP?
- Gutenberg block – Save PHP function’s output as HTML?
- Custom search results page not working with empty search
- Image upload via FormData API and AJAX is not working ($_FILES always empty)
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- Use DOMDocument with ob_start breaks my HTML code
- How to only enqueue script if it’s a post
- Adding number to date not working [closed]
- Which hook/action will help me solve my problem?
- Tax query in pre_get_posts not working
- how to fix error “called incorrectly, should not be accessed directly”?
- trigger html cleanup for all posts
- get widget number from array dynamically
- How to auto fetch customer details in Woocommerce in checkout page
- How to exclude tags and categories from a function?
- Programmatically inserting post through URL – when including wp-load.php, it’s redirecting to wp-admin/install.php
- Validation algorithm in checkout field
- Custom Theme’s “Preview Changes” Doesn’t Work for Previously Published Posts
- curl_exec causes timeout on mod_fcgid