>
Download This Plugin | |
Download Elegant Themes | |
Name | Domain Name Autoswitch |
Version | 1.2.4 |
Author | Benjamin Menant |
Rating | 0 |
Last updated | 2014-06-14 02:22:00 |
Downloads |
209
|
Download Plugins Speed Test plugin for Wordpress |
Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%
Domain Name Autoswitch plugin added 3 bytes of resources to the Home page and 6 bytes of resources to the sample Post page.
Domain Name Autoswitch plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.
Great! Domain Name Autoswitch plugin ads no tables to your Wordpress blog database.Here is a useful method you should use any where you need it dnas_get_post_ID()
.
It returns the post ID (if any) related to the current domain name. For instance, if you would like to display URL of the fake home page:
<?php echo get_the_permalink( dnas_get_post_ID() ); ?>
You can check the plugin development on github.
Pros:
.htaccess
file,
it works with every permalink formats.Cons:
is_home()
could not work as expected if a dedicated domain name is triggered.The plugin works with both custom post types and classic post type. You have to edit a configuration file in order to indicate on which posts the plugin should add its domain name field. You can indicate Categorie identifiers or/and Post Types slugs. For instance, to make the plugin showing its domain field on any posts of the categories #4 and #8, then:
$dnas_categories_ID = array( 4, 8 );
The Advanced Custom Fields plugin is required.
This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See (http://www.wtfpl.net/) for more details.