Slider en pagina principal estática del tema Schema

Mensajes
9
Puntuación de reacción
0
Hola gente linda.

A ver si alguien me da una manito.

Estoy armando una pagina con el tema Schema de MyThemeShop. No paso el link porque la estoy armando en el localhost.

El tema Schema cuenta con un slider, el cual se muestra en la página de los post, sea la pagina principal o una página especificada para los post.

Lo que yo quiero es que el slider se muestre en la página principal, la cual no es la pagina de los post sino una página estática.

Este es mi index.php

Código:
<?php $mts_options = get_option(MTS_THEME_NAME); ?>
<?php get_header(); ?>
<div id="page">
	<div class="article">
		<div id="content_box">
			<?php if (is_home() && !is_paged()) { ?>
				<?php if($mts_options['mts_featured_slider'] == '1') { ?>
					<div class="slider-container">
						<div class="flex-container loading">
							<div id="slider" class="flexslider">
								<ul class="slides">
                                    <?php if (empty($mts_options['mts_custom_slider'])) { ?>
    									<?php 
                                            // prevent implode error
                                            if (empty($mts_options['mts_featured_slider_cat']) || !is_array($mts_options['mts_featured_slider_cat'])) {
                                                $mts_options['mts_featured_slider_cat'] = array('0');
                                            }
                                            
                                            $slider_cat = implode(",", $mts_options['mts_featured_slider_cat']); $my_query = new WP_Query('cat='.$slider_cat.'&posts_per_page='.$mts_options['mts_featured_slider_num']);
    										while ($my_query->have_posts()) : $my_query->the_post();
                                        ?>
    									<li> 
    										<a href="<?php the_permalink() ?>">
    											<?php the_post_thumbnail('slider',array('title' => '')); ?>
    											<div class="flex-caption">
    												<h2 class="slidertitle"><?php the_title(); ?></h2>
    											</div>
    										</a> 
    									</li>
    									<?php endwhile; wp_reset_query(); ?>
                                    <?php } else { ?>
                                        <?php foreach($mts_options['mts_custom_slider'] as $slide) : ?>
                                            <li>
                                                <a href="<?php echo $slide['mts_custom_slider_link']; ?>">
    											<?php echo wp_get_attachment_image($slide['mts_custom_slider_image'], 'slider', false, array('title' => '')); ?>
    											<div class="flex-caption">
    												<h2 class="slidertitle"><?php echo $slide['mts_custom_slider_title']; ?></h2>
    											</div>
    										</a> 
    									</li>
                                        <?php endforeach; ?>
                                    <?php } ?>
								</ul>
							</div>
						</div>
					</div>
					<!-- slider-container -->
				<?php } ?>
			<?php } ?>
            
            <?php if (!is_paged()) { ?>
            <?php $featured_categories = array();
                if (!empty($mts_options['mts_featured_categories'])) {
                    foreach ($mts_options['mts_featured_categories'] as $section) {
                        $category_id = $section['mts_featured_category'];
                        $featured_categories[] = $category_id;
                        $posts_num = $section['mts_featured_category_postsnum'];
                        if ($category_id == 'latest') { ?>
            
            <?php $j = 0; if (have_posts()) : while (have_posts()) : the_post(); ?>
				<article class="latestPost excerpt  <?php echo (++$j % 3 == 0) ? 'last' : ''; ?>" itemscope itemtype="http://schema.org/BlogPosting">
					<header>
						<h2 class="title front-view-title" itemprop="headline"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
						<?php mts_the_postinfo(); ?>
					</header>
                    <?php if ( has_post_thumbnail() ) {
                        if($mts_options['mts_thumb_layout'] == 'large_home_thumb') {
                            $featured_thumb = 'featured';
                        } else {
                            $featured_thumb = 'widgetfull';
                        }
                    ?>
    					<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="nofollow" id="featured-thumbnail" class="<?php echo $featured_thumb; ?>">
    					    <?php echo '<div class="featured-thumbnail">'; the_post_thumbnail($featured_thumb, array('title' => '')); echo '</div>'; ?>
                            <?php if (function_exists('wp_review_show_total')) wp_review_show_total(true, 'latestPost-review-wrapper'); ?>                            
    					</a>
                    <?php } ?>
                    
                    <?php if (empty($mts_options['mts_full_posts'])) : ?>
    					<div class="front-view-content">
                            <?php echo mts_excerpt(40); ?>
    					</div>
					    <?php mts_readmore(); ?>
				    <?php else : ?>
                        <div class="front-view-content full-post">
                            <?php the_content(); ?>
                        </div>
                        <?php if (mts_post_has_moretag()) : ?>
                            <?php mts_readmore(); ?>
                        <?php endif; ?>
                    <?php endif; ?>
                </article><!--.post excerpt-->
			<?php endwhile; endif; ?>
			
            <!--Start Pagination-->
            <?php if (isset($mts_options['mts_pagenavigation_type']) && $mts_options['mts_pagenavigation_type'] == '1' ) { ?>
                <?php mts_pagination(); ?> 
			<?php } else { ?>
				<div class="pagination">
					<ul>
						<li class="nav-previous"><?php next_posts_link( __( '← '.'Older posts', 'mythemeshop' ) ); ?></li>
						<li class="nav-next"><?php previous_posts_link( __( 'Newer posts'.' →', 'mythemeshop' ) ); ?></li>
					</ul>
				</div>
			<?php } ?>
			<!--End Pagination-->
            
            <?php } else { // if $category_id != 'latest': ?>
            <h3 class="featured-category-title"><a href="<?php echo esc_url( get_category_link($category_id) ); ?>" title="<?php echo esc_attr( get_cat_name($category_id) ); ?>"><?php echo get_cat_name($category_id); ?></a></h3>
            <?php $j = 0; $cat_query = new WP_Query('cat='.$category_id.'&posts_per_page='.$posts_num); if ($cat_query->have_posts()) : while ($cat_query->have_posts()) : $cat_query->the_post(); ?>
				<article class="latestPost excerpt  <?php echo (++$j % 3 == 0) ? 'last' : ''; ?>" itemscope itemtype="http://schema.org/BlogPosting">
					<header>
						<h2 class="title front-view-title" itemprop="headline"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
						<?php mts_the_postinfo(); ?>
					</header>
					<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="nofollow" id="featured-thumbnail">
					    <?php echo '<div class="featured-thumbnail">'; the_post_thumbnail('featured',array('title' => '')); echo '</div>'; ?>
                        <?php if (function_exists('wp_review_show_total')) wp_review_show_total(true, 'latestPost-review-wrapper'); ?>
					</a>
                    
                    <?php if (empty($mts_options['mts_full_posts'])) : ?>
    					<div class="front-view-content">
                            <?php echo mts_excerpt(29); ?>
    					</div>
					    <?php mts_readmore(); ?>
				    <?php else : ?>
                        <div class="front-view-content full-post">
                            <?php the_content(); ?>
                        </div>
                        <?php if (mts_post_has_moretag()) : ?>
                            <?php mts_readmore(); ?>
                        <?php endif; ?>
                    <?php endif; ?>
                </article><!--.post excerpt-->
			<?php endwhile; endif; wp_reset_query(); ?>
            
            <?php } } } ?>
            <?php } else { ?>
                <!-- Paged -->
			<?php $j = 0; if (have_posts()) : while (have_posts()) : the_post(); ?>
				<article class="latestPost excerpt  <?php echo (++$j % 3 == 0) ? 'last' : ''; ?>" itemscope itemtype="http://schema.org/BlogPosting">
					<header>
						<h2 class="title front-view-title"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
						<?php mts_the_postinfo(); ?>
					</header>
					<?php if ( has_post_thumbnail() ) {
                        if($mts_options['mts_thumb_layout'] == 'large_home_thumb') {
                            $featured_thumb = 'featured';
                        } else {
                            $featured_thumb = 'widgetfull';
                        }
                    ?>
                        <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="nofollow" id="featured-thumbnail" class="<?php echo $featured_thumb; ?>">
                            <?php echo '<div class="featured-thumbnail">'; the_post_thumbnail($featured_thumb, array('title' => '')); echo '</div>'; ?>
                            <?php if (function_exists('wp_review_show_total')) wp_review_show_total(true, 'latestPost-review-wrapper'); ?>                            
                        </a>
                    <?php } ?>
                    <?php if (empty($mts_options['mts_full_posts'])) : ?>
    					<div class="front-view-content">
                            <?php echo mts_excerpt(29); ?>
    					</div>
					    <?php mts_readmore(); ?>
				    <?php else : ?>
                        <div class="front-view-content full-post">
                            <?php the_content(); ?>
                        </div>
                        <?php if (mts_post_has_moretag()) : ?>
                            <?php mts_readmore(); ?>
                        <?php endif; ?>
                    <?php endif; ?>
                </article><!--.post excerpt-->
			<?php endwhile; endif; ?>
			
            <!--Start Pagination-->
            <?php if (isset($mts_options['mts_pagenavigation_type']) && $mts_options['mts_pagenavigation_type'] == '1' ) { ?>
                <?php mts_pagination(); ?> 
			<?php } else { ?>
				<div class="pagination">
					<ul>
						<li class="nav-previous"><?php next_posts_link( __( '← '.'Older posts', 'mythemeshop' ) ); ?></li>
						<li class="nav-next"><?php previous_posts_link( __( 'Newer posts'.' →', 'mythemeshop' ) ); ?></li>
					</ul>
				</div>
			<?php } ?>
			<!--End Pagination-->
            <?php } ?>
		</div>
	</div>
	<?php get_sidebar(); ?>
<?php get_footer(); ?>

Estuve toqueteando un poco pero no le encontré la vuelta.
Sinceramente no entiendo mucho del tema, soy mas bien de googlear y probar.

Bueno, espero que me puedan orientar un poco.

Gracias!
 
Mensajes
9
Puntuación de reacción
0
Sigo sin poder, si alguien me puede ayudar mas que agradecido.
 
Mensajes
268
Puntuación de reacción
0
En las opciones del theme, en home page tienes la configuración del slider. Solo tienes que activarlo, seleccionar las categorias y el numero de posts a mostrar o añadir algun slide personalizado.

Una vez configurado, solo tienes que crear una pagina home o inicio, y seleccionarla como pagina fija en las opciones de wordpress.

Saludos
 
Mensajes
9
Puntuación de reacción
0
Gracias Soid por tu respuesta.

Mirá, asi tengo configurados los ajustes de lectura:

ajustes de lectura.jpg

Pero el tema es que el slider me lo pone siempre en la pagina de las entradas y no en el homepage.

Yo quiero que el post slider aparezca en dominio.com y no en domingo.com/noticias

Saludos!
 
Mensajes
268
Puntuación de reacción
0
Gracias Soid por tu respuesta.

Mirá, asi tengo configurados los ajustes de lectura:

Ver el archivo adjunto 5329

Pero el tema es que el slider me lo pone siempre en la pagina de las entradas y no en el homepage.

Yo quiero que el post slider aparezca en dominio.com y no en domingo.com/noticias

Saludos!

Pasame la web por mp si quieres y le echo un vistazo a ver si puedo ayudarte.
 
Mensajes
9
Puntuación de reacción
0
Hola Soid.

El tema es que la tengo en el localhost con el WampServer.

El theme está aca: https://foro20.com/plantillas-premium/19207-schema-v1-0-4-mythemeshop.html?highlight=schema

Yo supuse que era algo de acá:
Código:
<?php get_header(); ?>
<div id="page">
	<div class="article">
		<div id="content_box">
			<?php if (is_home() && !is_paged()) { ?>
				<?php if($mts_options['mts_featured_slider'] == '1') { ?>
					<div class="slider-container">

Mas precisamente de la linea 5 que dice:
Código:
<?php if (is_home() && !is_paged()) { ?>


Pero probé todas estas variantes y lo unico que logré fué quitar el slider
Código:
<?php if (is_home() ) { ?>
Código:
<?php if (is_front_page() ) { ?>
Código:
<?php if (is_front_page() && is_home() ) { ?>
Código:
<?php if (is_page( inicio ) ) { ?>


Sino, si queres lo subó al host.

De nuevo gracias!
 
Mensajes
268
Puntuación de reacción
0
No tiene nada que ver. Tiene que ser alguna tonteria. Este theme viene preparado para poner el slider en el home desde el mismo panel de control. Fijate por eso, que en la configuración de la home en el panel de control, debajo del slider aparece la seccion "Featured Categories" porque el theme viene preparado solo para tener una home tipo blog con slider arriba. Si lo que quieres es tener una home estatica con el slider y otra información que no sean artículos, entonces si deberias meterte a tocar codigo o buscar otro theme.
 
Mensajes
9
Puntuación de reacción
0
Claro, eso eso último es lo que quiero hacer.
Si lo que quieres es tener una home estatica con el slider y otra información que no sean artículos, entonces si deberias meterte a tocar codigo o buscar otro theme.
 
Arriba