How do I remove or disable “Or link to existing content” in “insert link” dialogue?

We could hook into the after_wp_tiny_mce with some CSS to hide it, if the wplink editor plugin is loaded. Example: add_action( ‘after_wp_tiny_mce’, function( $settings ) { // Check for the ‘wplink’ editor plugin if( isset( $settings[‘content’][‘plugins’] ) && false !== strpos( $settings[‘content’][‘plugins’], ‘wplink’ ) ) echo ‘<style> #link-selector > .howto, #link-selector > #search-panel { display:none; … Read more

HTTPS page link in menu

You will need to convert the relative links to absolute links. You can do this in the wp_nav_menu_objects filter, which gets all menu items. Just edit the url property of each item. Another option would be to extend the default Walker_Nav_Menu with one that overrides start_el(), so you can modify the passed $item there before … Read more

Remove all links to a specific website

You can use the Search Regex plugin. This will allow you to create a regular expression to intelligently search and replace across all of your posts. After you activate the plugin, go to Tools, Search Regex. If you want to remove all links to http://example.com, here is one regular expression you could try: /<a href=”http:\/\/example\.com[^>]*>([\s\S]*?)<\/a>/ … Read more

how can i add a menu link that goes to an external page

Admin Dashboard -> Appearance -> Menus If the theme is WP 3.0 ready, you will have an option to add a custom link (ie external link) on the left side, and you can drag and drop it into the order you want. Justin Tadlock wrote an awesome post about 3.0 menus – http://justintadlock.com/archives/2010/06/01/goodbye-headaches-hello-menus If your … Read more

What is the canonical way to link to pages?

This link WordPress Codex: Linking… provides detailed information on how to link different types of content. One nice feature that solves the above problem is to use a link of the form /wordpress/archives.php. This will transfer nicely (in most cases) to any particular server deployment. Further, looking in wp-includes/link-template.php gives you more insight to what … Read more

Is there an easy way to create a links index page?

I think the WordPress bookmarks feature would work grand here. Here’s how I got this to work (generically). Go to Links->Link Categories and add all the letters of the alphabet as categories Create a new link, add a description and notes, and assign it to a specific alphabetical category. Create a page template (as shown … Read more

widget to output a link to archive view

get_archive_link() is used to generate internal html links for output. If you want to link to archive page from single.php why dont you use get_post_type_archive_link here is an example of how you can use this. it takes only one parameter (post type) <a href=”https://wordpress.stackexchange.com/questions/368468/<?php echo get_post_type_archive_link(“movies’ ); ?>”>Movies Archive</a> //here movies is the post type

Get link value only from the_content()?

You can scan the content to see whether it contains a link and then parse it to find the href attribute. There are many ways to do this, this example uses the built-in kses functionality, as demonstrated by Otto: $post_link = get_the_permalink(); if ( preg_match(‘/<a (.+?)>/’, get_the_content(), $match) ) { $link = array(); foreach ( … Read more