How to link to local post

Use the ugly link instead of the pretty link. For example, if your post id is 123, you can link to http://www.yoursite.com/?p=123. This will automatically get rewritten to your current pretty permalink. If you do it relative from the root, it also keeps the link intact if you change your domain name. (ex. href=”https://wordpress.stackexchange.com/?p=123″). To … Read more

Is there anyway to use relative link instead of absolute link?

You should be using home_url() ( or something similar ) in your links for theme files when linking to pages. This will allow the domain to change and not affect your hardcoded links – assuming the ID’s are the same of course. <a href=”https://wordpress.stackexchange.com/questions/161179/<?php echo home_url();?>/?page_id=634″>Link</a> Good luck!

How do I get link URLs from the WordPress links backend into an array?

I believe that you’re looking for the get_bookmarks() function, which returns an array of bookmark objects. You could then implement this into your code: <?php // Get RSS Feed(s) include_once(ABSPATH . WPINC . ‘/feed.php’); $bookmarks = get_bookmarks(); $rsslist = array(); foreach ( $bookmarks as $bm ) { if ( $bm->link_rss ) $rsslist[] = $bm->link_rss; } … Read more