Solved!,
Change $postID by $post->ID, so, rewriting function:
function noticias_print_permalink( $permalink, $post, $leavename ){
$external_link = get_post_meta( $post->ID, 'external_link', true );
if( !empty( $external_link ) ) {
$permalink = $external_link;
}
return $permalink;
}
Regards.
Related Posts:
- where is permalink info stored in database?
- Passing and retrieving query vars in wordpress
- Get the current page URL (including pagination)
- How can I reverse engineer a Permalink to Find the Page?
- Mapping Domains to Permalinks (not multisite)
- How to remove dates from existing permalinks?
- Setting up WordPress with Custom Permalinks and no .htaccess File?
- How would I create a different permalink structure for pages and posts?
- My permalinks are broken! Can I use mod_rewrite to ignore a physical file?
- Is there an action for when permalinks are rebuilt?
- When creating a WordPress page, a “-2” suffix is added to new pages’ permalinks
- mod_rewrite enabled but Permalinks show index.php
- How to get a page url by a page id?
- Why does /wp-json/ not work on the “plain” permalink structure?
- Custom Permalink: /year/month/post-goes-here/?
- Can’t add a Page with Name 2011
- Nicest way to 301 Redirect traffic when changing permalink settings
- Custom permalink structure with a prefix just for posts
- Is there a log for the ajax calls made when changing a post’s slug?
- Permalinks for WooCommerce Categories and Subcategories
- Permalinks not working (.htaccess is writable)
- Passing a parameter to a permalink
- Possible to use /%monthname%/ in my permalink structure without using a plugin?
- get the_title_attribute by id
- display URL or permalink instead of page title in dashboard
- How to improve WordPress security by hiding non public facing files?
- Is there a wordpress function that I can use to retrieve the current page that is loaded?
- .htaccess file missing from WordPress install directory
- CSS not loaded when omitting www. part of URL
- Is it possible to keep all special letters for foreign languages in slug as in title?
- Server Move: All pages leading home
- WordPress Permalink 404
- Link to the post displays ID instead of slug
- index.php is always displayed before any file on the URL
- How do I fix permalink and media library issues on a LEMP stack?
- Include Post Format in permalink
- Non latin post slug truncate
- Why I can’t change the permalink of a WP page?
- Page preview is shown, updating page gives 404 error
- Dynamic Template file for subpage
- How to 301 redirect from one url to another properly
- How do I change the permalink of a scheduled post so that it can be linked to?
- remove product-category base but still redirect to page with same permalink
- Correct permalinks and 404-error
- What would cause a theme to add extra characters to blog post links?
- Getting 404 when Access post which name start with Digit
- Advanced author permalinks
- How to check if the current page is the permalink page?
- Format HTTP links
- Permalinks on post is working, on pages 404 error
- Change directory url to be same as page permalink?
- Some Pemalink problems, probably caused by wrong .htaccess configuration?
- Permalinks set to /%postname%/ but still have links being indexed in the form ?p=x
- WordPress author.php template does not work with custom permalink structure! Help!
- LAMP WordPress Permalinks 404 error
- Links in post content don’t work on home page
- Arabic permalink redirect to home page
- Changing permalink settings causes 404
- Issues when changing permalink Structure
- How can I see a list of all pages my WordPress site has generated?
- permalinks on title tag
- Non Latin page permalink problem
- Custom permalink structure for product
- index.php in URL
- archive by year and category: permalink support doesn’t work on pagination
- Empty the_excerpt() broke the_permalink() under him?
- Permalink not changing according to post type
- iFrame permalinks on WordPress
- Custom permalink structure with a prefix just for posts
- How to change permalink for listings
- WordPress Pages that use Domain URL
- 404 page not found – Yet open admin page it works
- How can I have a page’s permalink include my custom post type’s slug?
- wordpress admin panel loop on nginx
- Can’t access new WP install on subdirectory
- WordPress Permalinks
- Problem with permalinks
- Find internal links to post
- How to change link of an uploaded file to the media library
- On Macbook, my permalinks with post name don’t work. Returning 404 error
- “Undefined” added to page content after google Adwords click
- create user’s view profile link with username
- WordPress pages break with custom permalink settings (theme directory not output)
- Remove /index.php from Permalink
- Image upload ruined my links
- How to rewrite a folder in WordPress?
- The Permalink doesn’t work after the foreach ended
- Tag search not working after permalink structure change
- Why is there a # and other characters in URL for WordPress site?
- permalink repeated
- standard post with extra parameter brings permalink problem
- redirect old pages by .htaccess
- wp_get_attachment_url not working
- Custom permalink to make a page respond properly
- How to avoid duplicate Url for the home page
- WordPress 3.1 problem, getting 404
- Display a custom slug in URL depending on user variable
- Redirect Loops Problems
- Problems loading stylesheet and permalinks after rebooting
- Settings > Permalinks – mod_rewrite ineffective if expression not preceded by /index.php/