first commit

master
campi 2 years ago
commit 5f2b9137f0

@ -0,0 +1,57 @@
<?php
/**
* The default template for displaying content
*
* Used for both single and front-page/index/archive/search.
*
* @since 1.0.0
*/
//$bavotasan_theme_options = bavotasan_theme_options();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
if( has_post_thumbnail() )
the_post_thumbnail( 'featured-img', array( 'class' => 'image-full align' ) );
?>
<div class="row">
<div class="col-md-3 entry-meta">
<p><i class="fa fa-bookmark"></i> <?php _e( 'Posted in ', 'destin-basic' ); the_category( ', ' ); ?></p>
<?php if ( comments_open() ) { ?>
<p><i class="fa fa-comments"></i> <?php comments_popup_link( __( '0 Comments', 'destin-basic' ), __( '1 Comment', 'destin-basic' ), __( '% Comments', 'destin-basic' ), '', '' ); ?></p>
<?php } ?>
</div>
<div class="col-md-9">
<?php
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( sprintf( '<h2 class="entry-title taggedlink"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
endif;
?>
<div class="entry-meta">
<?php
printf( __( 'by %s on %s', 'destin-basic' ),
'<span class="vcard author"><span class="fn"><a href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '" title="' . esc_attr( sprintf( __( 'Posts by %s', 'destin-basic' ), get_the_author() ) ) . '" rel="author">' . get_the_author() . '</a></span></span>', '<a href="' . get_permalink() . '" class="time"><time class="date published updated" datetime="' . esc_attr( get_the_date( 'Y-m-d' ) ) . '">' . get_the_date() . '</time></a>'
);
?>
</div>
<div class="entry-content description clearfix">
<?php
if ( is_singular() )
the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'destin-basic') );
else
the_excerpt();
?>
</div><!-- .entry-content -->
<?php
if ( is_singular() )
get_template_part( 'content', 'footer' ); ?>
</div>
</div>
</article><!-- #post-<?php the_ID(); ?> -->

@ -0,0 +1,37 @@
<?php
/**
* The front page template.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @since 1.0.0
*/
get_header();
$bavotasan_theme_options = bavotasan_theme_options();
global $wp_query;
if ( have_posts() ) {
if ( 'page' == get_option( 'show_on_front' ) ) {
include( get_page_template() );
} else {
?>
<div id="primary" class="clearfix">
<div id="content" class="sticky-container">
<?php bavotasan_front_page_render(); ?>
<?php if ( is_active_sidebar( 'home-page-corner' ) ) { ?>
<div class="stamp">
<?php dynamic_sidebar( 'home-page-corner' ); ?>
</div>
<?php } ?>
</div>
<?php bavotasan_pagination(); ?>
</div>
<?php
}
}
?>
<?php get_footer(); ?>

@ -0,0 +1,11 @@
<?php
/* enqueue script for parent theme stylesheeet */
function childtheme_parent_styles() {
// enqueue style
wp_enqueue_style( 'parent', get_template_directory_uri().'/style.css' );
}
add_action( 'wp_enqueue_scripts', 'childtheme_parent_styles');
// questo serve per poter mettere gli shortcode dentro ai widget
add_filter( 'widget_text', 'do_shortcode' );

@ -0,0 +1,56 @@
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <main>
* and the left sidebar conditional
*
* @since 1.0.0
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="clearfix">
<header id="header">
<div class="container">
<?php $tag = ( is_front_page() && is_home() ) ? 'h1' : 'div'; ?>
<<?php echo $tag; ?> id="site-title"><a href="<?php echo esc_url( home_url() ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<?php bloginfo( 'name' ); ?>
</a></<?php echo $tag; ?>>
<div id="site-description"><?php bloginfo( 'description' ); ?></div>
</div>
<nav id="site-navigation" class="navbar navbar-inverse" role="navigation">
<div class="container">
<h3 class="sr-only"><?php _e( 'Main menu', 'destin-basic' ); ?></h3>
<a class="sr-only" href="#primary" title="<?php esc_attr_e( 'Skip to content', 'destin-basic' ); ?>"><?php _e( 'Skip to content', 'destin-basic' ); ?></a>
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse">
<?php
$menu_class = ( is_rtl() ) ? ' navbar-right' : '';
wp_nav_menu( array( 'theme_location' => 'primary', 'container' => '', 'menu_class' => 'nav navbar-nav' . $menu_class, 'fallback_cb' => 'bavotasan_default_menu' ) );
?>
</div>
</div>
</nav><!-- #site-navigation -->
</header>
<main>

@ -0,0 +1,102 @@
<?php
/*
Template Name: Trasmissione
Template Post Type: post, page, broadcast
*/
?>
<?php
$week = ["Luned&igrave","Marted&igrave","Mercoled&igrave","Gioved&igrave","Venerd&igrave","Sabato","Domenica"];
get_header();?>
<main>
<div class="container">
<div class="row">
<div id="primary" class="content-area col-md-9">
<?php
while (have_posts()) :
the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title('<h1 class="entry-title">', '</h1>'); ?>
</header><!-- .entry-header -->
<div class="entry-content">
<figure style="margin-bottom:2em; width:45%; padding:1em; float:right">
<?php echo get_the_post_thumbnail(get_the_ID(), 'full'); ?>
</figure>
<?php
the_content();
$on_air = get_post_meta(get_the_ID(), 'on_air_day_0', false);
$start_time = get_post_meta(get_the_ID(), 'on_air_start_0', false);
?>
<div class="on-air">
<?php /*Se $onair[0] non è valorizzato la trasmissione non ha diretta e quindi è conclusa */ ?>
<?php if (empty($on_air[0])) { ?>
<p style="color:#0bfafa">---> Trasmissione conclusa <---</p>
<?php } else { ?>
<p style="color:#0bfafa">---> In diretta ogni <?php echo $week[$on_air[0]-1]; ?> dalle ore <?php echo $start_time[0]; ?> <---</p>
<?php } ?>
</div>
<br>
<!-- Link all'archivio delle puntate -->
<?php
$category_id = get_post_meta(get_the_ID(), 'taxonomy_id', true);
$category_link = get_category_link( $category_id );
?>
<h6><a style="color:gold" href="<?php echo $category_link; ?>">[ Tutte le puntate ]</h6></a>
</div><!-- .entry-content -->
</article><!-- #post-<?php the_ID(); ?> -->
<div class="related-posts">
<h2>Ultime puntate e notizie</h2>
<?php
$cat_id = get_post_meta(get_the_ID(), 'taxonomy_id', true);
//$cat_id = get_the_category(get_the_ID());
/* echo '<pre>';
print_r($cat_id);
echo '</pre>';
*/
$last_posts = get_posts(
array(
'numberposts' => 3,
'category' => $cat_id
)
);
//echo '<pre>';
//print_r($last_posts);
//echo '</pre>';
foreach ($last_posts as $s_post) {
$american_data = explode(" ", $s_post->post_date);
$data_a = explode("-", $american_data[0]); ?>
<article>
<h3>
<a href="<?php echo get_permalink($s_post->ID); ?>" title="<?php echo $s_post->post_title; ?>"><?php echo $s_post->post_title; ?></a>
</h3>
<p class="data"><?php echo $data_a[2]."/".$data_a[1]."/".$data_a[0]; ?></p>
<?php echo get_the_post_thumbnail($s_post->ID, 'full'); ?>
<p class="content"><?php echo $s_post->post_content; ?></p>
</article>
<?php
}
// If comments are open or we have at least one comment, load up the comment template.
if (comments_open() || get_comments_number()) :
comments_template();
endif;
endwhile; // End of the loop.
?>
</div>
</div><!-- #primary -->
<!-- ho commentato questo perche' visualizzava male la sidebar <div id="secondary" class="col-md-3" role="complementary"> -->
<?php get_sidebar(); ?>
<!--</div><-->
</div><!-- .wrap -->
</div>
</main>
<?php
get_footer();

@ -0,0 +1,49 @@
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @since 1.0.0
*/
get_header();
?>
<div class="container">
<div class="row">
<div id="primary" <?php bavotasan_primary_attr(); ?>>
<?php
while ( have_posts() ) : the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
if ( is_search() ) :
the_title( sprintf( '<h2 class="entry-title page-header"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
elseif ( is_front_page() ) :
the_title( '<h2 class="entry-title page-header">', '</h2>' );
else :
the_title( '<h1 class="entry-title page-header">', '</h1>' );
endif;
?>
<div class="entry-content description clearfix">
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'destin-basic') ); ?>
</div><!-- .entry-content -->
<?php get_template_part( 'content', 'footer' ); ?>
</article><!-- #post-<?php the_ID(); ?> -->
<?php
comments_template( '', true );
endwhile;
?>
</div>
<?php get_sidebar(); ?>
</div>
</div>
<?php get_footer(); ?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 KiB

@ -0,0 +1,25 @@
<?php
/**
* The first/left sidebar widgetized area.
*
* If no active widgets in sidebar, default login widget will appear.
*
* @since 1.0.0
*/
?>
<div id="secondary" <?php bavotasan_sidebar_class(); ?> role="complementary">
<?php if ( ! dynamic_sidebar( 'sidebar' ) ) : ?>
<aside id="meta" class="widget">
<h3 class="widget-title"><?php _e( 'Default Widget', 'destin-basic' ); ?></h3>
<p><?php printf( __( 'This is just a default widget. It\'ll disappear as soon as you add your own widgets on the %sWidgets admin page%s.', 'destin-basic' ), '<a href="' . admin_url( 'widgets.php' ) . '">', '</a>' ); ?></p>
<p><?php _e( 'Below is an example of an unordered list.', 'destin-basic' ); ?></p>
<ul>
<li><?php _e( 'List item one', 'destin-basic' ); ?></li>
<li><?php _e( 'List item two', 'destin-basic' ); ?></li>
<li><?php _e( 'List item three', 'destin-basic' ); ?></li>
<li><?php _e( 'List item four', 'destin-basic' ); ?></li>
</ul>
</aside>
<?php endif; ?>
</div><!-- #secondary.widget-area -->

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save