Get post / page ID from ACF Link field

The Page Link documentation actually shows how to retrieve the ID from a Page Link field. Just needed to do this myself and came across it. It worked well for me. <?php // vars $post_id = get_field(‘url’, false, false); // check if( $post_id ): ?> <a href=”https://wordpress.stackexchange.com/questions/304960/<?php echo get_the_permalink($post_id); ?>”><?php echo get_the_title($post_id); ?></a> <?php endif; … Read more

Plugin that inserts favicon next to links

(from the closing duplicate) I typed this plugin very quickly during posting this… It seems to work, see http://leau.co (where I quickly tested it) or http://edward.de.leau.net (where I have tested it against more links in the post content) e.g. see the bottom left sidebar or some posts with multiple links in it. Hmmm, I will … Read more

How do I make my navigation bar link to an external page?

It depends on your theme and WP version (you’re using 2.9.1 – you should consider upgrading). You can: upgrade to V3+ to use the menu editor that’s built in (recommended) more info: http://templatic.com/news/wordpress-3-0-menu-management hard code your theme template with the link added to the end in the HTML modify the theme call to wp_list_pages() function … Read more

How to list all external URLs that I have posted on my WordPress blog?

The above code had pagination concerns when I wanted to parse each and every page. So, building on the above, plus a kicker to search for links without ‘nofollow’ attributes, I came up with the following: <ol> <?php global $post; //Write Site URL below. //Don’t write http:// or anything like that. just domain.com or domain.net … Read more

Getting only the most recent bookmark?

As far as I know it’s not possible to query the links directly, but there is definetly a link_updated field in the wp_links table, so you can use wpdb to interact with it and return the latest (modified) links. There’s also a solution here. EDIT : Updating a link doesn’t change link_updated, but here is … Read more