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

Linking to page with all posts

You have to create a page template with Loop inside. Then create a page “All My Posts” and assign the template you’ve created to it in “Page Attributes” section of “Edit Page” admin page. You can link to this page from the Front Page using get_page function. Function Reference/get page.

Redirect user if it’s not logged in

I wouldn’t use htaccess for that. What I would do is make a ‘download page’ template and use it to ‘serve’ the files. By doing that, I can do a check with is_user_logged_in() Codex and redirect with wp_login_url() Codex Just do: if ( is_user_logged_in() ) : //file link else : wp_login_url(); endif; I think it’s … 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

Adding different classes to anchor in navigation menu

Yes, it is possible. You can achieve this using wp_nav_menu_objects filter. function my_wp_nav_menu_objects($objects, $args) { foreach($objects as $key => $item) { $objects[$key]->classes[] = ‘my-class’; } return $objects; } add_filter(‘wp_nav_menu_objects’, ‘my_wp_nav_menu_objects’, 10, 2); The only problem is that these classes will be added to li elements and not to links directly. But it’s default WordPress behavior … 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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)