This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row latestposts"> | |
<?php | |
$args = array( | |
'posts_per_page' => 2 | |
); | |
$postlist =get_posts($args); | |
foreach($postlist as $post){ | |
setup_postdata( $post ); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Custom Post Types Mobiliario | |
* | |
*/ | |
add_action('init', 'my_custom_init_mob'); | |
function my_custom_init_mob() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Código en el post type: | |
//Variable Meta para Mobiliario | |
add_action('admin_init', 'admin_init_ptype'); | |
add_action('save_post', 'save_ptype'); | |
function admin_init_mobiliario(){ | |
add_meta_box("fichadele", "Variables Mobiliario", "meta_options_mobopt", "mobiliario-opticas", 'side', 'high'); | |
} | |
function meta_options_mobopt(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link type="image/x-icon" href="<?php bloginfo('stylesheet_directory'); ?>/images/favicon.png" rel="icon" /> | |
<link rel="apple-touch-icon" href="/apple-touch-icon.png"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($_SERVER['HTTP_HOST'] === "localhost") { | |
define('DB_NAME', ''); | |
define('DB_USER', 'root'); | |
define('DB_PASSWORD', 'root'); | |
define('WP_HOME', 'http://localhost/'); | |
define('WP_SITEURL', 'http://localhost/'); | |
define('WP_DEBUG', false); | |
} else { | |
define('DB_NAME', ''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript | |
</IfModule> | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType image/jpg "access 1 year" | |
ExpiresByType image/jpeg "access 1 year" | |
ExpiresByType image/gif "access 1 year" | |
ExpiresByType image/png "access 1 year" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Template Name: My Custom Page | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<FilesMatch "\.(php|php\.)(.+)(\w|\d)$"> | |
Order Allow,Deny | |
Deny from all | |
</FilesMatch> |
OlderNewer