Sindbad~EG File Manager

Current Path : /var/www/vhosts/espacio-publico.com/.vscode-server/data/User/History/427bf2b5/
Upload File :
Current File : /var/www/vhosts/espacio-publico.com/.vscode-server/data/User/History/427bf2b5/DLgm.php

<?php
/**
 * The template for displaying all single posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
 *
 * @package WordPress
 * @subpackage Twenty_Seventeen
 * @since 1.0
 * @version 1.0
 */

get_header(); ?>

<!-- <?php echo basename(__FILE__) ?> -->
	<div id="primary" class="content-area">
		<main id="main" class="site-main" role="main">

			<?php
			/* Start the Loop */
			while ( have_posts() ) : the_post();

				get_template_part( 'template-parts/post/content', get_post_format() );

				?>
				<?php

				// Listado de intervenciones, solo se muestran en debates
                $categorias_post = wp_get_post_categories(get_the_ID());

			    $categories_ids_debate = get_option('espaciopublico-categoria-debates'); // es un array de ids
				$intersection = array_intersect($categories_ids_debate, $categorias_post);
				//echo "<pre>intersection";var_dump($intersection);echo "</pre>";
                $esDebate = count($intersection) > 0;
				if($esDebate){
					$intervenciones = get_intervenciones_debate(get_the_ID()); 
					get_template_part( 'template-parts/post/content', 'intervenciones' );
				}

				/*
				the_post_navigation( array(
					'prev_text' => '<span class="screen-reader-text">' . __( 'Previous Post', 'twentyseventeen' ) . '</span><span aria-hidden="true" class="nav-subtitle">' . __( 'Previous', 'twentyseventeen' ) . '</span> <span class="nav-title"><span class="nav-title-icon-wrapper">' . twentyseventeen_get_svg( array( 'icon' => 'arrow-left' ) ) . '</span>%title</span>',
					'next_text' => '<span class="screen-reader-text">' . __( 'Next Post', 'twentyseventeen' ) . '</span><span aria-hidden="true" class="nav-subtitle">' . __( 'Next', 'twentyseventeen' ) . '</span> <span class="nav-title">%title<span class="nav-title-icon-wrapper">' . twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ) . '</span></span>',
				) );
				*/
				?>
				<?php

			endwhile; // End of the loop.
			?>

			<div class="container">
			
        	</div>


			<?php

			$argsChildContent = array(
				'cat' => 4,
				'posts_per_page' => -1,
				'meta_query' => array(
					'relation' => 'AND',
					array(
						'key'     => 'show_on_home',
						'value'   => 1,
						'compare' => '=',
					),
					array(
						'key'     => 'parent_related',
						'value'   => get_the_ID(),
						'compare' => '=',
					),
				)
			);

			$childContent = new WP_Query( $argsChildContent );
			$template = 'single-simple';

			if ( $childContent->have_posts() ) {

			echo '<div class="container">';

				echo '<div class="row">';		

				while ( $childContent->have_posts() ) {

					$cont++;			
					$childContent->the_post();

					echo '<div class="item col-12">';
						get_template_part( 'template-parts/home/content', $template );
					echo '</div>';			

				}		
				echo '</div>';

			echo '</div>';

				/* Restore original Post Data */
				wp_reset_postdata();
			} else {
				// no posts found
			}	
			?>

		</main><!-- #main -->
	</div><!-- #primary -->
	<?php get_sidebar(); ?>


<?php get_footer();

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists