Title: Domain Name Autoswitch
Author: bmenant
Published: <strong>25 de febrero de 2014</strong>
Last modified: 14 de junio de 2014

---

Buscar plugins

Este plugin **no se ha probado con las últimas 3 versiones mayores de WordPress**.
Puede que ya no tenga soporte ni lo mantenga nadie, o puede que tenga problemas 
de compatibilidad cuando se usa con las versiones más recientes de WordPress.

![](https://s.w.org/plugins/geopattern-icon/domain-name-autoswitch.svg)

# Domain Name Autoswitch

 Por [bmenant](https://profiles.wordpress.org/bmenant/)

[Descargar](https://downloads.wordpress.org/plugin/domain-name-autoswitch.zip)

 * [Detalles](https://es.wordpress.org/plugins/domain-name-autoswitch/#description)
 * [Valoraciones](https://es.wordpress.org/plugins/domain-name-autoswitch/#reviews)
 *  [Instalación](https://es.wordpress.org/plugins/domain-name-autoswitch/#installation)
 * [Desarrollo](https://es.wordpress.org/plugins/domain-name-autoswitch/#developers)

 [Soporte](https://wordpress.org/support/plugin/domain-name-autoswitch/)

## Descripción

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:

You can check the plugin development on [github](https://github.com/bmenant/wordpress-domain-name-autoswitch).

**Pros:**

 * since the plugin does not modify nor use your `.htaccess` file,
    it works with
   every permalink formats.
 * allow you to manage your domain names directly through your
    post edit forms.

**Cons:**

 * since it hacks the query variables, some template tags like `is_home()`
    could
   not work as expected if a dedicated domain name is triggered.
 * be aware there is no conflict support: you can fill the same domain
    for several
   posts. Only a single one will win the game, without any control from your part(
   but it will be easy to see which one have to be checked… if you ever notice it).
   Be careful!

#### Configuration

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 );
    ```

#### Dependency

The [Advanced Custom Fields](https://wordpress.org/plugins/advanced-custom-fields)

plugin is required.

#### License

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.

## Instalación

 1. First, unzip or upload the plugin into `/wp-content/plugins/`.
 2. In the plugin directory, edit the following file:
     sample-domain-name-autoswitch-
    config.php.
 3. Then, rename the config file to: `domain-name-autoswitch-config.php`.
 4. Activate the plugin through the WordPress Plugins admin page.
 5. Set up your domain names like you want to, directly through the
     posts’ edit pages.
 6. Obviously, you will have to set up your virtual hosts (`ServerAlias`
     directives),
    so every domain names you want to use are pointing to your WordPress instance.

## Reseñas

No hay valoraciones para este plugin.

## Colaboradores y desarrolladores

«Domain Name Autoswitch» es un software de código abierto. Las siguientes personas
han colaborado con este plugin.

Colaboradores

 *   [ bmenant ](https://profiles.wordpress.org/bmenant/)

[Traduce «Domain Name Autoswitch» a tu idioma.](https://translate.wordpress.org/projects/wp-plugins/domain-name-autoswitch)

### ¿Interesado en el desarrollo?

[Revisa el código](https://plugins.trac.wordpress.org/browser/domain-name-autoswitch/),
echa un vistazo al [repositorio SVN](https://plugins.svn.wordpress.org/domain-name-autoswitch/)
o suscríbete al [registro de desarrollo](https://plugins.trac.wordpress.org/log/domain-name-autoswitch/)
por [RSS](https://plugins.trac.wordpress.org/log/domain-name-autoswitch/?limit=100&mode=stop_on_copy&format=rss).

## Registro de cambios

#### 1.2.4

 * Fix the way settings are saved: from now, settings are not erased after upgrading
   the plugin.

#### 1.2.3

 * Fix SQL syntax when using custom post type identifiers.
 * Add license details.

#### 1.2.2

 * Add the `dnas_get_post_ID()` global function.
 * Enhance the readme.txt.

#### 1.2.1

 * Add the get_post_ID() method to the class.
 * Fix an issue with permalink: now hooks the permalinks values.
    For instance, 
   the canonical meta link now displays the dedicated domain name.
 * Fix a singleton issue (public constructor).

#### 1.2

 * First stable release.
 * Handle posts by categories or by post types.

## Meta

 *  Versión **1.2.4**
 *  Última actualización **hace 12 años**
 *  Instalaciones activas **10+**
 *  Probado hasta **3.9.40**
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/domain-name-autoswitch/)
 * Etiqueta:
 * [front page](https://es.wordpress.org/plugins/tags/front-page/)
 *  [Vista avanzada](https://es.wordpress.org/plugins/domain-name-autoswitch/advanced/)

## Valoraciones

Aún no se han enviado valoraciones.

[Tu valoración](https://wordpress.org/support/plugin/domain-name-autoswitch/reviews/#new-post)

[Ver todas las reseñas](https://wordpress.org/support/plugin/domain-name-autoswitch/reviews/)

## Colaboradores

 *   [ bmenant ](https://profiles.wordpress.org/bmenant/)

## Soporte

¿Tienes algo que decir? ¿Necesitas ayuda?

 [Ver el foro de soporte](https://wordpress.org/support/plugin/domain-name-autoswitch/)