23/06/2012, 19:59
|
| | Fecha de Ingreso: diciembre-2011
Mensajes: 12
Antigüedad: 12 años, 11 meses Puntos: 0 | |
Respuesta: Parse error: syntax error, unexpected '<' en mi Template De todas maneras les voy a dejar todo el functions php.
<?php
include_once 'dtw_cp/dtw_control_panel.php';
include_once 'functions/meta_boxes.php';
// Register Widgets to Sidebar
if (function_exists('register_sidebar')) {
register_sidebar(
array(
'name' => 'Sidebar Right',
'before_widget' => '<li id="%1$s" class="widget %2$s content-box widget_class">',
'after_widget' => '<div class="clear"></div></div></li>',
'before_title' => '<h3 class="headline">',
'after_title' => '</h3><div class="widget-wrapper">',
)
);
register_sidebar(
array(
'name' => 'Sidebar Left',
'before_widget' => '<li id="%1$s" class="widget %2$s content-box">',
'after_widget' => '<div class="clear"></div></div></li>',
'before_title' => '<h3 class="headline">',
'after_title' => '</h3><div class="widget-wrapper">',
)
);
register_sidebar(
array(
'name' => 'Footer',
'before_widget' => '<li id="%1$s" class="widget %2$s content-box">',
'after_widget' => '<div class="clear"></div></div></li>',
'before_title' => '<h3 class="headline">',
'after_title' => '</h3><div class="widget-wrapper">',
)
);
}
add_filter('dynamic_sidebar_params', 'widgets_classes');
function widgets_classes($params) {
global $widget_num;
if($params[0]['name'] == 'Sidebar Right') {
// Widget class
$class = array();
// Iterated class
$widget_num++;
if($widget_num == 4) {
$widget_num = 1;
}
$class[] = 'widget-' . $widget_num;
// Join the classes in the array
$class = join(' ', $class);
// Interpolate the 'my_widget_class' placeholder
$params[0]['before_widget'] = str_replace('widget_class', $class, $params[0]['before_widget']);
}
return $params;
}
function redirect_to_post(){
global $wp_query;
if( is_archive() && $wp_query->post_count == 1 ){
the_post();
$post_url = get_permalink();
wp_redirect( $post_url );
}
}
add_action('template_redirect', 'redirect_to_post');
function dtw_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
?>
<?php
if($comment->comment_author_email == get_the_author_email()) {
$post_author = ' (author comment)';
}
else {
$post_author = '';
$comment_class = 'normal';
}
?>
<li <?php comment_class($comment_class); ?> id="comment-<?php comment_ID() ?>">
<div id="comment-div-<?php comment_ID() ?>" class="comment-container-div">
<div class="author-info">
<?php echo get_avatar($comment, 38); ?>
<div class="text-info">
<p class="author_name"><?php comment_author_link(); ?><?php echo $post_author; ?></p>
<p class="comment_date">- <?php comment_date('jS M, y h:ma') ?> <?php edit_comment_link(); ?></p>
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
add_theme_support( ‘nav-menus’ );
<div class="comment-entry">
<?php if ($comment->comment_approved == '0') : ?>
<strong style="display: block; padding-bottom: 5px;">Your comment is awaiting moderation.</strong>
<?php endif; ?>
<div class="actual-comment">
<?php comment_text() ?>
<p><?php comment_reply_link(array_merge($args, array('reply_text' => 'Reply to this comment', 'add_below' => NULL, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?></p>
</div>
</div>
</div>
<?php
}
function dtw_pings($comment, $args, $depth) {
$GLOBALS['comment'] = $comment;
?>
<li <?php comment_class('pingback'); ?> id="comment-<?php comment_ID() ?>">
<div id="comment-div-<?php comment_ID() ?>" class="comment-container-div">
<p><?php comment_author_link(); ?> - <?php comment_date('jS M, y h:ma') ?></p>
</div>
<?php
}
function dtw_feed($url) {
if(dtw_check_option('feedburner_url')) {
$url = get_option('dtw_feedburner_url');
return $url;
}
add_filter('feed_link', 'dtw_feed');
function dtw_header() {
if(dtw_check_option('header_tracking')) {
echo get_option('dtw_header_tracking') . "\n";
}
if(dtw_check_option('meta_description')) {
echo '<meta name="description" content="' . get_option('dtw_meta_description') . '" />' . "\n";
}
if(is_archive() && dtw_check_option('index_archives')) {
echo '<meta name="robots" content="noindex, nofollow" />' . "\n";
}
}
add_action('wp_head', 'dtw_header');
} ?>
function dtw_footer() {
if(dtw_check_option('footer_tracking')) {
echo get_option('dtw_footer_tracking') . "\n";
}
}
add_action('wp_footer', 'dtw_footer');
include 'widgets/twitter.php';
include 'widgets/flickr.php';
include 'widgets/recent_blog_posts.php';
include 'widgets/popular_blog_posts.php';
include 'widgets/blog_navigator.php';
include 'widgets/sponsors.php';
include 'widgets/my_social_networks.php';
include 'widgets/about_me.php';
include 'widgets/subscribe.php';
include 'widgets/premium_sponsor.php';
Espero me pueda ayudar
Gracias |