Ver Mensaje Individual
  #16 (permalink)  
Antiguo 13/06/2012, 08:27
Avatar de Marcos071
Marcos071
 
Fecha de Ingreso: enero-2006
Ubicación: Presidencia Roque Sáenz Peña - Chaco
Mensajes: 384
Antigüedad: 18 años, 3 meses
Puntos: 5
Respuesta: Seleccionar cuál entrada irá en página principal y cuál no. ¿Cómo?

Otro problema que me surge, es cómo agregar funciones a mi archivos functions.php, porque cada vez que agrego algo me sale error, lo he intentado agregando como plugin y tambien sale el mismo error
Cita:
<?
/*
Plugin Name: Mis Funciones
Plugin URI: --
Description: Plugin para liberar de funciones el fichero <code>functions.php</code> y activarlo a placer (o no) .
Version: 1.0
Author: --
Author URI: --
License: GPLv2 o posterior
*/

add_action( 'add_meta_boxes', 'home_agregar_metabox' );

function home_agregar_metabox() {
* * add_meta_box('home-metabox' , 'Mostrar en Home' , 'home_metabox', 'post' , 'side' , 'core');
}
*
function home_metabox() {
* * global $post;
*
* * $html ='
* * <select name="home_metabox_opciones" id="home_metabox_opciones">
* * * * <option value="1">Agregar</option>
* * * * <option value="0">Ocultar</option>
* * </select>';
*
* * $html = str_replace('option value="'. get_post_meta($post->ID , 'mostrar home' , true) .'"' , 'option value="'. get_post_meta($post->ID , 'mostrar home' , true) .'" selected="selected"' , $html);
*
* * echo $html;
}
*
add_action( 'save_post', 'guardar_home_metabox' );
*
function guardar_home_metabox( $post_ID, $post ) {
* * global $post;
* * update_post_meta( $post->ID, 'mostrar home', $_POST['home_metabox_opciones'] );
}

function hacer_encabezado()
{
$encabezado="<html><head>t<title>$titulo</title></head>";
echo $encabezado;
}
?>
El error
Cita:
Parse error: syntax error, unexpected T_FUNCTION in /home/prueba/public_html/sites1/wp-content/plugins/mis-funciones.php on line 14