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
function limit_posts_per_archive_page() { | |
if ( is_category() ) | |
$limit = 2; | |
elseif ( is_search() ) | |
$limit = 1; | |
else | |
$limit = get_option('posts_per_page'); | |
set_query_var('posts_per_archive_page', $limit); | |
} |
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
/** Add columns **/ | |
// Add to admin_init function | |
add_filter('manage_edit-productos_columns', 'add_new_productos_columns'); | |
function add_new_productos_columns($columns) { | |
$columns['cb'] = '<input type="checkbox" />'; | |
$columns['title'] = 'Producto'; | |
$columns['prod_ref'] = 'Referencia'; | |
$columns['prod_precio'] = 'Precio'; | |
$columns['image'] = 'Miniatura'; |
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
function language_selector_flags(){ | |
$languages = icl_get_languages('skip_missing=0&orderby=code'); | |
if(!empty($languages)){ | |
foreach($languages as $l){ | |
if(!$l['active']) echo '<a href="'.$l['url'].'">'; | |
echo '<img src="'.get_bloginfo('stylesheet_directory').'/img/'.$l['code'].'.jpg" height="28" alt="'.$l['language_code'].'" width="28" />'; | |
if(!$l['active']) echo '</a>'; | |
} | |
} |
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
section.post_content section { | |
width: 500%; | |
margin-left: -200%; | |
} |
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 wp_editor($proycom_deco,"proycom_deco",array('textarea_name' => 'proycom_deco','tinymce'=>true)); ?> |
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 | |
/** | |
* Product quantity inputs | |
* | |
* @author WooThemes | |
* @package WooCommerce/Templates | |
* @version 2.5.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
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
$before_widget = str_replace('" id=', ' widget_fullwidth" id=', $before_widget); |
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 | |
/* | |
Widget Name: | |
Description: | |
Author: davidperez | |
Author URI: https://www.closemarketing.es | |
*/ | |
function widget_name() { | |
register_widget( 'widget_name' ); | |
} |