<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4632680840528126568</id><updated>2024-08-29T04:22:19.521-07:00</updated><category term="Jquery"/><category term="Wordpress"/><category term="php"/><category term="Cpanel"/><category term="Crean menu wordpress"/><category term="Custom Post Types"/><category term="Custom post type"/><category term="Fantástico Deluxe"/><category term="Formulario Joomla"/><category term="Formulario contacto Joomla"/><category term="Google"/><category term="Instalar formulario"/><category term="Joomla"/><category term="Netenberg"/><category term="Nginx"/><category term="Quitar tamaño fijo"/><category term="Remover tamaño fijo"/><category term="Tipos de Post custom"/><category term="comparar fechas php"/><category term="configuración"/><category term="crear custom post types"/><category term="desarrollo web"/><category term="efectos javascript"/><category term="efectos jquery"/><category term="funcion aleatoria php"/><category term="htaccess"/><category term="imagenes sin tamaño fijo"/><category term="librería jquery"/><category term="lista de autores en wordpress"/><category term="loop custom post types"/><category term="menu custom post type"/><category term="modificar menu administrador wordpress"/><category term="modificar wordpress"/><category term="número aleatorio"/><category term="restar dias fecha"/><category term="sumar fechas"/><category term="template custom post type"/><category term="wordpress custom post"/><category term="wordpress mostrar lista"/><category term="wordpress querys"/><title type='text'>Desarrollo Web</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://web-codes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://web-codes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00516290551456711376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4632680840528126568.post-1172102392338349682</id><published>2013-09-16T08:00:00.001-07:00</published><updated>2013-09-16T08:14:19.057-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="imagenes sin tamaño fijo"/><category scheme="http://www.blogger.com/atom/ns#" term="Quitar tamaño fijo"/><category scheme="http://www.blogger.com/atom/ns#" term="Remover tamaño fijo"/><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>Wordpress quitar tamaño fijo a las imagenes</title><content type='html'>Las imágenes de Wordpress se muestran con un tamaño fijo si no incluímos una función que lo evite.&lt;br /&gt;
&lt;br /&gt;
En este ejemplo puede ver como Wordpress muestra las imágenes con tamaño fijo:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;img class=&quot;attachment-post-thumbnail wp-post-image nailthumb-image&quot; alt=&quot;&quot; src=&quot;&quot; &lt;b&gt;width=&quot;200&quot; height=&quot;200&lt;/b&gt;&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
El width y height fijo de las imágenes hace que un diseño responsive no funcione correctamente debido a que éstas permanecen con el mismo tamaño a pesar del tamaño de la pantalla.&lt;br /&gt;
&lt;br /&gt;
Para evitar esto, debemos incluir la siguiente función en el archivo functions.php de nuestro theme:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;//remove images size&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;function remove_dimensions( $html, $post_id, $post_image_id ) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; $html = preg_replace( &#39;/(width|height)=\&quot;\d*\&quot;\s/&#39;, &quot;&quot;, $html );&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; return $html;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;add_filter( &#39;post_thumbnail_html&#39;, &#39;remove_dimensions&#39;, 10, 3 );&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
Es muy sencillo, al incluirla verás que las imágenes ya no tendran un ancho y altura fijo, permitiendo que el css defina su tamaño.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-codes.blogspot.com/feeds/1172102392338349682/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://web-codes.blogspot.com/2013/09/wordpress-quitar-tamano-fijo-las.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/1172102392338349682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/1172102392338349682'/><link rel='alternate' type='text/html' href='http://web-codes.blogspot.com/2013/09/wordpress-quitar-tamano-fijo-las.html' title='Wordpress quitar tamaño fijo a las imagenes'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00516290551456711376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4632680840528126568.post-2149752188459068259</id><published>2013-09-15T09:26:00.001-07:00</published><updated>2013-09-15T09:27:59.042-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="loop custom post types"/><category scheme="http://www.blogger.com/atom/ns#" term="template custom post type"/><category scheme="http://www.blogger.com/atom/ns#" term="wordpress custom post"/><category scheme="http://www.blogger.com/atom/ns#" term="wordpress querys"/><title type='text'>Wordpress mostrar custom post types usando querys</title><content type='html'>Si hemos creado tipos de post, seguramente necesitemos mostrar en una página solo esos post. Primero que nada debemos crear un archivo en la raíz de nuestro theme que se llame &quot;singe-(nombre del custom type).php&quot;. Ejemplo: Si nuestro custom post type se llama &quot;noticias&quot; el archivo en donde se verá el post de la noticias se llamará &quot;single-noticias.php&quot;.&lt;br /&gt;
&lt;br /&gt;
El siguiente paso es dentro de la página poner el código necesario para mostrar el post, aquí un ejemplo básico:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;/*&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;b&gt;Template Name: Single Noticia&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;*/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;?php get_header(); ?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;content&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;if ( have_posts() ) : while ( have_posts() ) : the_post();&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $type = get_post_type( get_the_ID() );&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if($type == &quot;noticia&quot;){&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;?php the_title(); //show post title?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; the_content(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;? &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; endwhile;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; endif; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;?php get_footer(); ?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Como pueden ver de ésta manera cuando vemos un custom post type &quot;noticia&quot; nos llevará a este template que hemos creado. Pero ésta página solo muestra el single. Para mostrar todas las &quot;noticias&quot; debemos crear una pagina dentro del admin de wordpress, crear un archivo que se llame por ejemplo &quot;noticias.php&quot; y añadirle el template a la página.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/-bn1Hf12rdfU/UjXdTY1TZxI/AAAAAAAAANo/bTB0NAs3BXY/s1600/custom+page+template.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-bn1Hf12rdfU/UjXdTY1TZxI/AAAAAAAAANo/bTB0NAs3BXY/s1600/custom+page+template.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Aquí pueden observar que seleccionamos el template que deseamos para una página en particular.&lt;br /&gt;
&lt;br /&gt;
Nota: &quot;La página que desplegará nuestros custom post types se crea en la opción &#39;Pages&#39; del administrador de Wordpress&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ahora que ya sabemos el procedimiento en el administrador, veamos el código necesario que vamos a colocar en noticias.php para poder desplegar todos los post que estén bajo el tipo de post &quot;noticia&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;/*&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;Template Name: Noticias&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;*/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;?php get_header(); ?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;?php&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; global $wp_query;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $temp = $wp_query;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $wp_query = null;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $wp_query = new WP_Query();&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;b&gt;$wp_query-&amp;gt;query(&#39;showposts=10&amp;amp;post_type=noticia&#39;.&#39;&amp;amp;paged=&#39;.$paged); &lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ( $wp_query-&amp;gt;have_posts() ) : while ($wp_query-&amp;gt;have_posts()) : $wp_query-&amp;gt;the_post();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ?&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;? the_title();?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;?php the_content();?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; endwhile;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; endif;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ?&amp;gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;?php get_footer(); ?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
Como podemos ver la única diferencia con el loop anterior es que vamos a desplegar 10 post del tipo noticia y paginado. Esto lo hacemos con las wp_querys que nos permiten hacer las consultas que nosotros queremos fuera del clásico loop que nos trae todos los post.&lt;br /&gt;
&lt;br /&gt;
Aquí es donde se cocina esto:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;$wp_query = new WP_Query();&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;$wp_query-&amp;gt;query(&#39;showposts=10&amp;amp;post_type=noticia&#39;.&#39;&amp;amp;paged=&#39;.$paged);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-codes.blogspot.com/feeds/2149752188459068259/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://web-codes.blogspot.com/2013/09/wordpress-mostrar-custom-post-types.html#comment-form' title='1 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/2149752188459068259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/2149752188459068259'/><link rel='alternate' type='text/html' href='http://web-codes.blogspot.com/2013/09/wordpress-mostrar-custom-post-types.html' title='Wordpress mostrar custom post types usando querys'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00516290551456711376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-bn1Hf12rdfU/UjXdTY1TZxI/AAAAAAAAANo/bTB0NAs3BXY/s72-c/custom+page+template.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4632680840528126568.post-5641295408758309323</id><published>2013-09-14T18:58:00.002-07:00</published><updated>2013-09-14T18:58:30.122-07:00</updated><title type='text'>Eliminar una opción del menu administrador de wordpress</title><content type='html'>Si necesitamos borrar una de las opciones del menu administrador de wordpress, Debemos incluir en el archivo &lt;b&gt;functions.php &lt;/b&gt;de nuestro theme la siguiente función.&lt;br /&gt;
&lt;br /&gt;
Código:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;function remove_admin_menu_items() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;b&gt;$remove_menu_items = array(__(&#39;Posts&#39;));&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;global $menu;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;end ($menu);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;while (prev($menu)){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;$item = explode(&#39; &#39;,$menu[key($menu)][0]);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if(in_array($item[0] != NULL?$item[0]:&quot;&quot; , $remove_menu_items)){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;unset($menu[key($menu)]);}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;//removemos la opción del front-end menu&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;add_action(&#39;admin_menu&#39;, &#39;remove_admin_menu_items&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;En éste ejemplo estamos borrando del menú la opción &#39;Posts&#39; que sirve para publicar los post comunes y corrientes de Wordpress. Si nosotros publicamos post utilizando solo custom post types, remover esta opción es una buena idea para no marear al administrador.&lt;br /&gt;&lt;br /&gt;Para borrar otras opciones simplemente modifica ésta línea &lt;b&gt;$remove_menu_items = array(__(&#39;Posts&#39;)); &lt;/b&gt;donde &#39;Posts&#39; será modificado por la opción que tu desees, por ejemplo &#39;Media&#39; o &#39;Comments&#39;.</content><link rel='replies' type='application/atom+xml' href='http://web-codes.blogspot.com/feeds/5641295408758309323/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://web-codes.blogspot.com/2013/09/eliminar-una-opcion-del-menu.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/5641295408758309323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/5641295408758309323'/><link rel='alternate' type='text/html' href='http://web-codes.blogspot.com/2013/09/eliminar-una-opcion-del-menu.html' title='Eliminar una opción del menu administrador de wordpress'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00516290551456711376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4632680840528126568.post-7784928377487562698</id><published>2013-09-14T18:52:00.000-07:00</published><updated>2013-09-14T19:03:05.987-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Crean menu wordpress"/><category scheme="http://www.blogger.com/atom/ns#" term="Custom post type"/><category scheme="http://www.blogger.com/atom/ns#" term="menu custom post type"/><category scheme="http://www.blogger.com/atom/ns#" term="modificar menu administrador wordpress"/><title type='text'>Crear Menu para Custom Post Types en Wordpress</title><content type='html'>Para darles un ejemplo podemos crear esto:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-mc0ZGzk_3uQ/UjUQDeoI4dI/AAAAAAAAANE/Jkv55sJE3iw/s1600/tipos+de+post.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-mc0ZGzk_3uQ/UjUQDeoI4dI/AAAAAAAAANE/Jkv55sJE3iw/s1600/tipos+de+post.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
Como pueden observar, es el menú del administrador de Wordpress, pero en el figuran los tipos de post en diferentes opciones &quot;Artists, Exhibitions, News&quot;. Son los tipos de post que necesita nuestro sitio de ejemplo.&lt;br /&gt;
&lt;br /&gt;
Vayamos al código, para crear las opciones del menú haremos lo siguiente:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Nota &quot;Debes insertar éste código en el archivo functions.php de tu theme, de lo contrario no funcionará&quot;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;// Registramos Custom Post Type&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;function news_post_type() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$labels = array(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;name&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; _x( &#39;News&#39;, &#39;Post Type General Name&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;singular_name&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; _x( &#39;News&#39;, &#39;Post Type Singular Name&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;b&gt;&#39;menu_name&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;News&#39;, &#39;text_domain&#39; ),&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;parent_item_colon&#39; &amp;nbsp; =&amp;gt; __( &#39;Parent News:&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;all_items&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;All News&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;view_item&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;View News&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;add_new_item&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; __( &#39;Add New News&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;add_new&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;New News&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;edit_item&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;Edit News&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;update_item&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;Update News&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;search_items&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; __( &#39;Search News&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;not_found&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;No News found&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;not_found_in_trash&#39; &amp;nbsp;=&amp;gt; __( &#39;No News found in Trash&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; $rewrite = array(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;slug&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &#39;new&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;with_front&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;pages&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;feeds&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;); &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$args = array(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;label&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;News&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;description&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;News information pages&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;labels&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; $labels,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;b&gt;&#39;supports&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; array( &#39;title&#39;, &#39;editor&#39;, &#39;thumbnail&#39;),&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;taxonomies&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; array(&#39;category&#39;),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;hierarchical&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; false,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;public&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;show_ui&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;show_in_menu&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;show_in_nav_menus&#39; &amp;nbsp; =&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;show_in_admin_bar&#39; &amp;nbsp; =&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;menu_position&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; 5,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;menu_icon&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &#39;/wp-content/themes/Solomon/img/icon.png&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;can_export&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;has_archive&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;exclude_from_search&#39; =&amp;gt; false,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;publicly_queryable&#39; &amp;nbsp;=&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;query_var&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &#39;News&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;rewrite&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; $rewrite,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;capability_type&#39; &amp;nbsp; &amp;nbsp; =&amp;gt; &#39;post&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;register_post_type( &#39;news&#39;, $args );&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;add_action( &#39;init&#39;, &#39;exhibition_post_type&#39;, 0 );&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Como pueden observar he resaltado en negrita la parte del código de registro de custom post types, que está encargada de definir la opción que figura en nuestro menú.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;menu_name: &lt;/b&gt;para darle un nombre a nuestro menu&lt;br /&gt;
&lt;b&gt;&#39;supports&#39;: &lt;/b&gt;para definir las opciones que tendrá el editor de nuestro custom post type. En se le pasa un array que contiene&amp;nbsp;&lt;b&gt;array( &#39;title&#39;, &#39;editor&#39;, &#39;thumbnail&#39;), &lt;/b&gt;eso quiere decir que el editor permitirá al usuario ingresar el título del post, el contenido y la imagen destacada o featured image.&lt;br /&gt;
&lt;br /&gt;
Por último llamamos a &lt;b&gt;add_action( &#39;init&#39;, &#39;exhibition_post_type&#39;, 0 );&lt;/b&gt; para ejecutar la función.&lt;br /&gt;
&lt;br /&gt;
Podemos utilizar una herramienta online y gratuita que genera el código que necesitamos llenando algunos campos de formulario. Aquí el enlace:&amp;nbsp;&lt;a href=&quot;http://generatewp.com/post-type/&quot; style=&quot;background-color: white; color: #253fff; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;http://generatewp.com/post-type/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-codes.blogspot.com/feeds/7784928377487562698/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://web-codes.blogspot.com/2013/09/crear-menu-para-custom-post-types-en.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/7784928377487562698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/7784928377487562698'/><link rel='alternate' type='text/html' href='http://web-codes.blogspot.com/2013/09/crear-menu-para-custom-post-types-en.html' title='Crear Menu para Custom Post Types en Wordpress'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00516290551456711376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-mc0ZGzk_3uQ/UjUQDeoI4dI/AAAAAAAAANE/Jkv55sJE3iw/s72-c/tipos+de+post.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4632680840528126568.post-957684286963385372</id><published>2013-09-14T18:34:00.000-07:00</published><updated>2013-09-14T19:00:03.578-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="crear custom post types"/><category scheme="http://www.blogger.com/atom/ns#" term="Custom Post Types"/><category scheme="http://www.blogger.com/atom/ns#" term="desarrollo web"/><category scheme="http://www.blogger.com/atom/ns#" term="Tipos de Post custom"/><category scheme="http://www.blogger.com/atom/ns#" term="Wordpress"/><title type='text'>Crear Custom Post Types en Wordpress</title><content type='html'>Los desarrolladores de Wordpress necesitan crear en multitples ocasiones diferentes tipos de post, para que el administrador pueda manipular las entradas de diferentes secciones del sitio de una forma ordenada.&lt;br /&gt;
&lt;br /&gt;
Para ellos en el archivo &lt;b&gt;functions.php &lt;/b&gt;de nuestro theme debemos ubicar funciones que le digan al core de Wordpress que necesitamos &lt;b&gt;Custom Post Types&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Para ello simplemente debemos colocar una función de este estilo.&lt;br /&gt;
&lt;br /&gt;
Código:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;// Registramos el Custom Post Type&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;function artists_post_type() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$labels = array(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;name&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; _x( &#39;Artists&#39;, &#39;Post Type General Name&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;singular_name&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; _x( &#39;Artist&#39;, &#39;Post Type Singular Name&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;menu_name&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;Artists&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;parent_item_colon&#39; &amp;nbsp; =&amp;gt; __( &#39;Parent Product:&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;all_items&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;All Artists&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;view_item&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;View Artists&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;add_new_item&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; __( &#39;Add New Artist&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;add_new&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;New Artist&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;edit_item&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;Edit Artist&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;update_item&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;Update Artist&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;search_items&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; __( &#39;Search artist&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;not_found&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;No artists found&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;not_found_in_trash&#39; &amp;nbsp;=&amp;gt; __( &#39;No artists found in Trash&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; $rewrite = array(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;slug&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; &#39;artist&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;with_front&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;pages&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;feeds&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;); &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;$args = array(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;label&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;Artists&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;description&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; __( &#39;Artists list&#39;, &#39;text_domain&#39; ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;labels&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; $labels,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;supports&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; array( &#39;title&#39;, &#39;editor&#39;, &#39;thumbnail&#39;, ),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;hierarchical&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; false,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;public&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;show_ui&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;show_in_menu&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;show_in_nav_menus&#39; &amp;nbsp; =&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;show_in_admin_bar&#39; &amp;nbsp; =&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;menu_position&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; 5,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;menu_icon&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &#39;icon url&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;can_export&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;=&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;has_archive&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;exclude_from_search&#39; =&amp;gt; false,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;publicly_queryable&#39; &amp;nbsp;=&amp;gt; true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;query_var&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; &#39;artist&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;rewrite&#39; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; =&amp;gt; $rewrite,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&#39;capability_type&#39; &amp;nbsp; &amp;nbsp; =&amp;gt; &#39;post&#39;,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;register_post_type( &#39;Artists&#39;, $args );&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;// Llamador de la función&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;add_action( &#39;init&#39;, &#39;artists_post_type&#39;, 0 );&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Como se puede ver en el código es una función para una supuesta sección de &quot;Artistas&quot;, éste código permite crear el tipo de post &quot;Artists&quot;. Y de esa manera organizar mejor tu sitio Wordpress.&lt;br /&gt;
&lt;br /&gt;
Como ven se le envían parámetros a la función &amp;nbsp;register_post_type();&lt;br /&gt;
&lt;br /&gt;
Recomiendo utilizar esta herramienta online y gratuita para generar el código solo llenando campos en un formulario. Aquí el link:&amp;nbsp;&lt;a href=&quot;http://generatewp.com/post-type/&quot;&gt;http://generatewp.com/post-type/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Cualquier duda a consulta no dudes en dejar tu comentario en el post con gusto te ayudaré.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-codes.blogspot.com/feeds/957684286963385372/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://web-codes.blogspot.com/2013/09/crear-custom-post-types-en-wordpress.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/957684286963385372'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/957684286963385372'/><link rel='alternate' type='text/html' href='http://web-codes.blogspot.com/2013/09/crear-custom-post-types-en-wordpress.html' title='Crear Custom Post Types en Wordpress'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00516290551456711376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4632680840528126568.post-6322766371093809110</id><published>2012-08-14T18:54:00.000-07:00</published><updated>2013-09-14T19:00:27.381-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="efectos javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="efectos jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="Jquery"/><title type='text'>Efectos con Javascript Jquery</title><content type='html'>Veamos algunos efectos con Jquery en esta entrada. Para comenzar y no perder tiempo veamos como hacer que un elemento html aparesca y desaparezca en un efecto de Slide.&lt;br /&gt;
&lt;br /&gt;
Código:&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: #9fc5e8;&quot;&gt;$(&#39;#identificador&#39;).slideUp(); //desaparece el objeto&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;$(&#39;#identificador&#39;).slideDown(); // aparece le objeto&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
En el código se puede observar que primero con el signo de $ colocamos la &quot;id&quot; del elemento html y luego le asignamos la función slideUp para que desaparezca y slideDown para que aparezca.&lt;br /&gt;
&lt;br /&gt;
Veamos otro ejemplo:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;b&gt;$(&#39;#identificador&#39;).show(); //&lt;/b&gt;&lt;b&gt;&amp;nbsp;aparece le objeto&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;$(&#39;#identificador&#39;).hide(); //&lt;/b&gt;&lt;b&gt;&amp;nbsp;desaparece le objeto&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
En el código lo mismo, se hace referencia al identificador y luego el elemento aparece ocn un efecto de agrandamiento.&lt;br /&gt;
&lt;br /&gt;
Para más efectos, dirijanse a la documentación de &lt;b&gt;Jquery &lt;/b&gt;&lt;a href=&quot;http://docs.jquery.com/Main_Page&quot;&gt;aqui&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-codes.blogspot.com/feeds/6322766371093809110/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://web-codes.blogspot.com/2012/08/efectos-con-javascript-jquery.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/6322766371093809110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/6322766371093809110'/><link rel='alternate' type='text/html' href='http://web-codes.blogspot.com/2012/08/efectos-con-javascript-jquery.html' title='Efectos con Javascript Jquery'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00516290551456711376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4632680840528126568.post-927130906337065754</id><published>2012-08-13T13:14:00.004-07:00</published><updated>2013-09-14T19:00:36.148-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="comparar fechas php"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><category scheme="http://www.blogger.com/atom/ns#" term="restar dias fecha"/><category scheme="http://www.blogger.com/atom/ns#" term="sumar fechas"/><title type='text'>Sumar y Restar fechas en PHP</title><content type='html'>En muchas ocasiones necesitamos sumar o restar días, meses,años u horas a una fecha. La función que mejor se adapta a este tipo de requerimiento es mktime y&amp;nbsp;strtotime.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;mktime()&lt;/b&gt;: Funciona con el mismo algoritmo que utiliza Linux, es decir, genera horas Unix que son sinónimo de un número entero, esto permite poder comparar fechas.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;strtotime()&lt;/b&gt;: Nos permite manipular fechas, restar y sumar días, meses o años.&lt;br /&gt;
&lt;br /&gt;
Para restarle un día a una fecha, ver código de ejemplo:&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;?php&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b style=&quot;background-color: #9fc5e8;&quot;&gt;$fecha_cambiada = mktime(0,0,0,date(&quot;m&quot;),date(&quot;d&quot;)-1,date(&quot;Y&quot;));&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: #9fc5e8;&quot;&gt;$fecha = date(&quot;d/m/Y&quot;, $fecha_cambiada);&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: #9fc5e8;&quot;&gt;echo $fecha; //devuelve fecha menos un día&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b style=&quot;background-color: #9fc5e8;&quot;&gt;?&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-gtElT0yllw0/UClY1LkzuBI/AAAAAAAAAKY/2uYfwL1ZSh8/s1600/php_logo.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;168&quot; src=&quot;http://2.bp.blogspot.com/-gtElT0yllw0/UClY1LkzuBI/AAAAAAAAAKY/2uYfwL1ZSh8/s320/php_logo.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Como podemos ver con la función &lt;b&gt;mktime &lt;/b&gt;podemos crear una fecha actual y restarle un día &quot;&lt;b&gt;date(&quot;d&quot;)-1&lt;/b&gt;&quot;;&lt;br /&gt;
&lt;br /&gt;
Pero solo con eso obtendremos un número de varias cifras, para transformar eso en una fecha, con la función &lt;b&gt;date &lt;/b&gt;creamos la fecha con formato &lt;b&gt;d/m/Y&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-codes.blogspot.com/feeds/927130906337065754/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://web-codes.blogspot.com/2012/08/sumar-y-restar-fechas-en-php.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/927130906337065754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/927130906337065754'/><link rel='alternate' type='text/html' href='http://web-codes.blogspot.com/2012/08/sumar-y-restar-fechas-en-php.html' title='Sumar y Restar fechas en PHP'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00516290551456711376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-gtElT0yllw0/UClY1LkzuBI/AAAAAAAAAKY/2uYfwL1ZSh8/s72-c/php_logo.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4632680840528126568.post-2050080821368795427</id><published>2012-08-13T12:43:00.001-07:00</published><updated>2013-09-14T19:03:54.610-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="funcion aleatoria php"/><category scheme="http://www.blogger.com/atom/ns#" term="número aleatorio"/><category scheme="http://www.blogger.com/atom/ns#" term="php"/><title type='text'>Número aleatorio en PHP</title><content type='html'>Para conseguir un número aleatorio en PHP lo único que tenemos que hacer es utilizar la función &lt;b&gt;rand();&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
El siguiente código explica claramente cómo se utiliza:&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;?php&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: #9fc5e8;&quot;&gt;$numero_aleatorio = rand(1,100);&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: #9fc5e8;&quot;&gt;?&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
La función &lt;b&gt;rand &lt;/b&gt;asigna a la variable &lt;b&gt;$numero_aleatorio&lt;/b&gt; un número entre 1 y 100&amp;nbsp;&lt;b&gt;rand(1,100).&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Luego podemos utilizar esta variable en lo que queramos, generalmente se utiliza un número random cuando queremos generar un código aleatorio, o mostrar imágenes de forma aleatoria.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-gtElT0yllw0/UClY1LkzuBI/AAAAAAAAAKY/2uYfwL1ZSh8/s1600/php_logo.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;168&quot; src=&quot;http://2.bp.blogspot.com/-gtElT0yllw0/UClY1LkzuBI/AAAAAAAAAKY/2uYfwL1ZSh8/s320/php_logo.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Por ejemplo, para mostrar una&amp;nbsp;imagen&amp;nbsp;de forma aleatoria podemos hacer lo siguiente:&lt;br /&gt;
&lt;br /&gt;
Si disponemos de 5 imágenes:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;?php&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: #9fc5e8;&quot;&gt;$numero_aleatorio&amp;nbsp;= rand(1,5);&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;&lt;b&gt;?&amp;gt;&lt;/b&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;img src=&quot;&amp;lt;? echo &#39;img&#39; . $numero_aleatorio . &#39;.jpg&#39;; ?&amp;gt;&quot;&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
En este caso se asigna un número entre el 1 y el 5 aleatoriamente a la variable $numero_aleatorio y luego en la propiedad &quot;&lt;b&gt;src&lt;/b&gt;&quot; del elemento &lt;b&gt;img&lt;/b&gt;, se designa que el nombre del archivo a mostrar sea &quot;&lt;b&gt;img1.jpg&lt;/b&gt;&quot; o &quot;&lt;b&gt;img2.jpg&lt;/b&gt;&quot; y así hasta la imágen número 5.&lt;br /&gt;
&lt;br /&gt;
Espero que les sirva, cualquier consulta, la contestaré a la brevedad.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-codes.blogspot.com/feeds/2050080821368795427/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://web-codes.blogspot.com/2012/08/numero-aleatorio-en-php.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/2050080821368795427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/2050080821368795427'/><link rel='alternate' type='text/html' href='http://web-codes.blogspot.com/2012/08/numero-aleatorio-en-php.html' title='Número aleatorio en PHP'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00516290551456711376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-gtElT0yllw0/UClY1LkzuBI/AAAAAAAAAKY/2uYfwL1ZSh8/s72-c/php_logo.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4632680840528126568.post-5205722314576370796</id><published>2012-08-13T12:29:00.001-07:00</published><updated>2012-08-13T12:29:42.732-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Formulario contacto Joomla"/><category scheme="http://www.blogger.com/atom/ns#" term="Formulario Joomla"/><category scheme="http://www.blogger.com/atom/ns#" term="Instalar formulario"/><category scheme="http://www.blogger.com/atom/ns#" term="Joomla"/><title type='text'>Formulario de contacto Joomla</title><content type='html'>Para los que trabajan en &lt;b&gt;Joomla&lt;/b&gt;, le comento que un buen complemento para implementar formularios de contacto en esta plataforma es &lt;b&gt;Breezing Forms&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Se trata de un complemento muy completo, ya que permite en pocos pasos confeccionar un formulario prolijo y además muy customizable.&lt;br /&gt;
&lt;br /&gt;
Pueden conseguir este complemento en la siguiente página &lt;a href=&quot;http://extensions.joomla.org/extensions/contacts-and-feedback/forms/4709&quot;&gt;aquí&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/-JiOd8M6BM0E/UClVNgI8NJI/AAAAAAAAAKI/1mLDHt8Du6o/s1600/joomla-logo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;136&quot; src=&quot;http://3.bp.blogspot.com/-JiOd8M6BM0E/UClVNgI8NJI/AAAAAAAAAKI/1mLDHt8Du6o/s200/joomla-logo.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Luego de instalado el complemento, en &lt;b&gt;Extensiones/Gestor de Extensiones&lt;/b&gt;, pueden acceder al mismo desde el menú &lt;b&gt;Componentes/BreezingForms&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Luego de crear un nuevo formulario, pueden asignarlo a una opción del menú, en &lt;b&gt;Gestor de Menú&lt;/b&gt;, allí cuando crean la nueva opción de menú seleccionan &lt;b&gt;Add Form&lt;/b&gt;, y en nombre de formulario colocan el mismo nombre que asignaron en la creación del formulario.&lt;br /&gt;
&lt;br /&gt;
Si tienen alguna duda o pregunta no duden en dejar un comentario, lo contestaré rápidamente.</content><link rel='replies' type='application/atom+xml' href='http://web-codes.blogspot.com/feeds/5205722314576370796/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://web-codes.blogspot.com/2012/08/formulario-de-contacto-joomla.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/5205722314576370796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/5205722314576370796'/><link rel='alternate' type='text/html' href='http://web-codes.blogspot.com/2012/08/formulario-de-contacto-joomla.html' title='Formulario de contacto Joomla'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00516290551456711376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-JiOd8M6BM0E/UClVNgI8NJI/AAAAAAAAAKI/1mLDHt8Du6o/s72-c/joomla-logo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4632680840528126568.post-7974613043465816731</id><published>2012-08-10T09:03:00.000-07:00</published><updated>2013-09-14T19:00:59.643-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="lista de autores en wordpress"/><category scheme="http://www.blogger.com/atom/ns#" term="modificar wordpress"/><category scheme="http://www.blogger.com/atom/ns#" term="wordpress mostrar lista"/><title type='text'>Mostrar lista de autores en Wordpress</title><content type='html'>Es sabido por todos los desarrolladores que la plataforma para la creación de blogs más famosa es &lt;a href=&quot;http://wordpress.org/&quot;&gt;Wordpress&lt;/a&gt;. Siendo open source y fácil de modificar, es una potente herramienta para la creación de blog y por que no, sitios web auto administrables.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-BNDfYEuG18k/UCUwI0bJTyI/AAAAAAAAAJ4/DT1QXa-DseY/s1600/logo_wordpress.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;http://4.bp.blogspot.com/-BNDfYEuG18k/UCUwI0bJTyI/AAAAAAAAAJ4/DT1QXa-DseY/s200/logo_wordpress.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
En este caso les muestro cómo mostrar la lista de autores del blog en donde nos plasca, puede ser en el sidebar, footer o debajo de cada post. Para ello debemos insertar las siguientes líneas de código:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;?php&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;background-color: #9fc5e8;&quot;&gt;list_authors( true, true, true,true, $feed, $feed_image );&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;background-color: #9fc5e8;&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
De esta manera se despliega una lista con los nombres de los autores y la cantidad de post que tienen en el blog. Puedes cambiar las variables a false para ver las opciones que ofrece, esta configuración es la que a mi me agrada.&lt;br /&gt;
&lt;br /&gt;
Este es el primer post de varios en los que hablaré sobre Wordpress. Por si acaso dejo el link al codex de Wordpress en donde puedes encontrar muchas más funciones &lt;a href=&quot;http://codex.wordpress.org/&quot;&gt;aquí&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-codes.blogspot.com/feeds/7974613043465816731/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://web-codes.blogspot.com/2012/08/mostrar-lista-de-autores-en-wordpress.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/7974613043465816731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/7974613043465816731'/><link rel='alternate' type='text/html' href='http://web-codes.blogspot.com/2012/08/mostrar-lista-de-autores-en-wordpress.html' title='Mostrar lista de autores en Wordpress'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00516290551456711376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-BNDfYEuG18k/UCUwI0bJTyI/AAAAAAAAAJ4/DT1QXa-DseY/s72-c/logo_wordpress.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4632680840528126568.post-4655388506721361699</id><published>2012-08-08T08:29:00.001-07:00</published><updated>2013-09-14T19:01:09.617-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google"/><category scheme="http://www.blogger.com/atom/ns#" term="Jquery"/><category scheme="http://www.blogger.com/atom/ns#" term="librería jquery"/><title type='text'>Librería Jquery de Google</title><content type='html'>El archiconocido framework de javascript &lt;b&gt;Jquery&lt;/b&gt;, ya es practicamente un estándar en lo que tiene que ver con el frontend development. Es por esto que &lt;b&gt;Google &lt;/b&gt;desde hace un buen tiempo ofrece a los desarrolladores la posibilidad de acceder a esta librería mediante un link externo.&lt;br /&gt;
&lt;br /&gt;
Existe la posibilidad de guardar el jquery.js en nuestro servidor pero la carga será 2 veces más lenta. Lo digo por experiencia, si llamamos al script de Google el tiempo de carga baja considerablemente.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-T3TUMSkqUGg/UCKFa_zIm0I/AAAAAAAAAJE/ae9EFmIgBws/s1600/jquery.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;http://2.bp.blogspot.com/-T3TUMSkqUGg/UCKFa_zIm0I/AAAAAAAAAJE/ae9EFmIgBws/s200/jquery.png&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
El enlace que deberíamos colocar en la web sería algo así:&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;background-color: #9fc5e8;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Dejo entonces el link a la web de Google &lt;a href=&quot;https://developers.google.com/speed/libraries/devguide&quot;&gt;aquí &lt;/a&gt;donde encontraremos el enlace a la ultima versión de Jquery y otro monton de framework y herramientas, entre las cuales se encuentra Mootools,&amp;nbsp;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 13px; font-weight: bold; line-height: 21px;&quot;&gt;Prototype, Sciptacolous, etc.&amp;nbsp;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-codes.blogspot.com/feeds/4655388506721361699/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://web-codes.blogspot.com/2012/08/libreria-jquery-de-google.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/4655388506721361699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/4655388506721361699'/><link rel='alternate' type='text/html' href='http://web-codes.blogspot.com/2012/08/libreria-jquery-de-google.html' title='Librería Jquery de Google'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00516290551456711376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-T3TUMSkqUGg/UCKFa_zIm0I/AAAAAAAAAJE/ae9EFmIgBws/s72-c/jquery.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4632680840528126568.post-2524353135218192562</id><published>2012-08-08T08:14:00.000-07:00</published><updated>2012-08-08T09:26:39.207-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cpanel"/><category scheme="http://www.blogger.com/atom/ns#" term="Fantástico Deluxe"/><category scheme="http://www.blogger.com/atom/ns#" term="Netenberg"/><title type='text'>Cpanel Fantástico Deluxe</title><content type='html'>Fantástico Deluxe es una herramienta desarrollada por la empresa alemana &lt;a href=&quot;http://www.netenberg.com/fantastico.php&quot;&gt;Netenberg&lt;/a&gt;&amp;nbsp;que trabaja en la plataforma Cpanel (Conocido sistema de gestión remota de servidores web).&lt;br /&gt;
&lt;br /&gt;
Fantástico Deluxe permite al usuario instalar automáticamente diferentes scripts muy conocidos como Wordpress, Joomla, Drupal sin tener que descargarlos e instalarlos vía FTP.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/-xt2BninIn_0/UCKCUuDljRI/AAAAAAAAAI0/I0gqpsTHUIc/s1600/fantasticodelux.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-xt2BninIn_0/UCKCUuDljRI/AAAAAAAAAI0/I0gqpsTHUIc/s1600/fantasticodelux.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Lamentablemente este sistema no está actualizado y por ejemplo, instala la versión 1.5 de Joomla que es bastante antigua (actualmente se utiliza la versión 2.5). Sin embargo en poco tiempo saldrá a la luz Fantástico Deluxe 3.0 con la última versión de todos los scripts que ofrece.&lt;br /&gt;
&lt;br /&gt;
Si desean mas información visiten la web oficial&amp;nbsp;&lt;a href=&quot;http://netenberg.com/fantastico.php&quot;&gt;http://netenberg.com/fantastico.php&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-codes.blogspot.com/feeds/2524353135218192562/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://web-codes.blogspot.com/2012/08/cpanel-fantastico-deluxe.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/2524353135218192562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/2524353135218192562'/><link rel='alternate' type='text/html' href='http://web-codes.blogspot.com/2012/08/cpanel-fantastico-deluxe.html' title='Cpanel Fantástico Deluxe'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00516290551456711376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-xt2BninIn_0/UCKCUuDljRI/AAAAAAAAAI0/I0gqpsTHUIc/s72-c/fantasticodelux.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4632680840528126568.post-3814077611846708919</id><published>2012-08-08T07:53:00.001-07:00</published><updated>2012-08-08T11:01:44.089-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="configuración"/><category scheme="http://www.blogger.com/atom/ns#" term="htaccess"/><category scheme="http://www.blogger.com/atom/ns#" term="Nginx"/><title type='text'>Nginx soporte .htaccess</title><content type='html'>&lt;a href=&quot;http://nginx.org/&quot;&gt;Nginx&lt;/a&gt; es un servidor web que viene tomando popularidad cada vez más. Se utiliza en servidores en los que la trasferencia de datos es muy alta. El problema surge cuando queremos instalar una aplicación que utiliza .htaccess en este tipo de servidor.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-C9LJolVOXWg/UCJ-svys_XI/AAAAAAAAAIk/fG4ydDBng04/s1600/nginx.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;137&quot; src=&quot;http://4.bp.blogspot.com/-C9LJolVOXWg/UCJ-svys_XI/AAAAAAAAAIk/fG4ydDBng04/s200/nginx.gif&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Para lograr que la aplicación funcione debemos traducir el contenido del archivo .htaccess al archivo default que se encuentra en la carpeta /etc/nginx/sites-available.&lt;br /&gt;
&lt;br /&gt;
Las redirecciones del archivo .htaccess que usualmente se hacen mediante los famosos rewrites en este caso deben hacerse mediante el uso de librerias fastcgi que en otra oportunidad explicaremos mejor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-codes.blogspot.com/feeds/3814077611846708919/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://web-codes.blogspot.com/2012/08/nginx-soporte-haccess.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/3814077611846708919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4632680840528126568/posts/default/3814077611846708919'/><link rel='alternate' type='text/html' href='http://web-codes.blogspot.com/2012/08/nginx-soporte-haccess.html' title='Nginx soporte .htaccess'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/00516290551456711376</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-C9LJolVOXWg/UCJ-svys_XI/AAAAAAAAAIk/fG4ydDBng04/s72-c/nginx.gif" height="72" width="72"/><thr:total>0</thr:total></entry></feed>