Viewing File: /home/u103475381/domains/sinaprors.com.br/public_html/wp-content/themes/bones/single-default.php

<?php get_header(); ?>

<div id="content">

	<div id="inner-content" class="wrap cf">

		<main id="main" class="m-all t-all d-all cf" role="main">

			<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

				<?php

				$category = get_the_category();
				$category2 = $category[0]->slug;

				?>

				<header class="article-header">

					<?php

					$args = array('child_of'=>3,'hide_empty'=>0);
					$my_categories = get_categories($args);
					if($my_categories){
						?>
						<ul id="menu-category" class="category_list">   
							<?php foreach( $my_categories as $category ):?>
								<li><a href="<?php echo get_category_link($category->term_id);?>" class="category-<?php echo $counter; ?>">#<?php echo $category->name;?></a></li>						
							<?php endforeach; ?>
						</ul>
					<?php } ?>
				</header> 


				<article id="post-<?php the_ID(); ?>" <?php post_class('cf'); ?>>

					<div class="sidebar-left m-all t-1of3 d-1of3">

						<?php dynamic_sidebar('sidebar1');?>

						<p><?php echo '// '.get_the_date( 'd' ).' DE '.get_the_date( 'M' ).' DE '.get_the_date( 'Y' ).''; ?> </p>
						
					</div>

					<div class="content-single-post m-all t-2of3 d-2of3">


							<h1 class="single-title" itemprop="headline" rel="bookmark"><?php the_title(); ?></h1>


						<section class="entry-content cf">

							<?php the_content(); ?>

						</section> 

						<footer class="article-footer fx fx-center-top fx-space">

							<p><?php echo '// '.get_the_date( 'd' ).' DE '.get_the_date( 'M' ).' DE '.get_the_date( 'Y' ).''; ?> </p>

							<?php dynamic_sidebar('sidebar1');?>

						</footer>

					</div>

					</article> <?php // end article ?>

				<?php endwhile; ?>

				<?php else : ?>

					<article id="post-not-found" class="hentry cf">
						<header class="article-header">
							<h1><?php _e( 'Oops, post não encontrado!', 'bonestheme' ); ?></h1>
						</header>
					</article>

				<?php endif; ?>

			</main>

			<?php //get_sidebar(); ?>

		</div>

		<section id="noticias-related" class="animate start related ">
			<div class="wrap">
				<div class="entry-content">
					<h2 class="page-title">Confira </br>outras notícias</h2>
					<?php
					echo '<div class="boxes-noticias fx fx-rw fx-center-top">';
					$counter = 1;
					$args = array(
						'post_type' => 'post',
						'posts_per_page' => 3,
						'post__not_in' => array($post->ID),
						'category_name' => $category2,
						'orderby' => 'rand'
					);

					$query = new WP_Query( $args );
					while( $query->have_posts() ) :

						$query->the_post();

						$categoria = get_the_category();
						echo '<div class="box-noticia time-'.$counter.'">';
						echo '<div class="pd-box">';
						echo '<a href="'.get_permalink().'" class="just-link">';
						echo '<h3> // '.get_the_date( 'd' ).' DE '.get_the_date( 'M' ).' DE '.get_the_date( 'Y' ).'</h3>';
						echo '<h2>'.get_the_title().'</h2>';
						echo '</a>';
						echo '<a href="'.get_permalink().'" class="l_default outline">Ler mais</a>';
						echo '</div>';
						echo '</div>';

						$counter++;	

					endwhile;
					echo '</div>';
					?>
					<div class="center">
						<a href="<?php echo home_url(); ?>/noticias" class="l_default outline">Ver mais notícias</a>
					</div>
				</div>
			</div>
		</section>

	</div>

	<?php get_footer(); ?>
Back to Directory File Manager