URL, which automatically close tab

You can’t. JavaScript can only close tabs/windows that have been created by JavaScript on the same page for security reasons. You could add a userscript that runs outside of page context and reacts to certain tags within the page, with Grease Monkey for example. But that would require the user to have that plugin + … Read more

img src not working correctly in custom post type

Add this following function to your functions.php of your theme or child theme. function homeURLshortcode() { return home_url(); } add_shortcode(‘homeurl’, ‘homeURLshortcode’); This will create a shortcode like [homeurl] which you can use to add in any visual editor and it will render as your main domain address, like http://domain.com. So for your image url you … Read more

Why my wordpress site URL does not begin with my domain?

I’ve had similar issues in the past, hosting two different sites with two domains on one host. Here are the two things that have helped me: Update WordPress Settings In the WordPress Admin Dashboard, go to Settings > General. You’ll notice that there’s the WordPress Address (URL) and the Site Address (URL). These control where … Read more

Remove /category/ from category (archive) page URLs (without using a plugin)

Please add this code in functions.php to remove the “category” text from permalink. function remove_category( $string, $type ) { if ( $type != ‘single’ && $type == ‘category’ && ( strpos( $string, ‘category’ ) !== false ) ){ $url_without_category = str_replace( “/category/”, “/”, $string ); return trailingslashit( $url_without_category ); } return $string; } add_filter( ‘user_trailingslashit’, … Read more

HTML link within my plugin settings page

Just use old simple HTML, the <a> tag. <a href=”https://wordpress.stackexchange.com/questions/24208/admin.php?page=yourplugin/another-page.php” title=”another page”>Another Page</a> If your page is php only: echo ‘<a href=”https://wordpress.stackexchange.com/questions/24208/admin.php?page=yourplugin/another-page.php” title=”another page”>Another Page</a>’; Where yourplugin is your plugin folder name, and another-page.php is that other page.

map urls to plugins

The general implementation of such “pretty” permalinks in WordPress is realm of WP Rewrite. However it is pretty wide topic and low level code is a bit of abomination. I would say these are three most common techniques for it, complexity ascending: Use WordPress native data structures (such as Custom Post Types and/or Taxonomies) and … Read more

Whats wrong with my code? Need To add String to shortcode? [closed]

$special_id = ‘ . do_shortcode(‘[url_path_number]’)’ ; Is completely wrong. do_shortcode() is a function and shouldn’t be inside quotes, because that just makes a string that says “do_shortcode()”. I don’t even know what you’re trying to do with the dot at the beginning. $special_id = do_shortcode(‘[url_path_number]’); Is correct.

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