Wsparcie » Motywy » Usunięcie strony ze strony głównej – Ascent theme

  • fuhi

    (@fuhi)


    Witam,

    mam ustawioną główną stronę jako statyczną i chciałbym usunąć na niej wyświetlanie strony 🙂 tak żeby został tylko slider. Niestety nie mogę znaleźć w kodzie s zablonu strony gł. miejsca, które odnosiłoby się tylko do tej strony. Co kasuję jakiś kod to znika mi wyświetlanie stron na każdej stronie 🙂 Trochę to zakręcone, ale mam nadzieję że ktoś zrozumie.

    Poniżej szablon strony gł. :

    <?php
    /**
    * The main template file.
    *
    * This is the most generic template file in a WordPress theme
    * and one of the two required files for a theme (the other being style.css).
    * It is used to display a page when nothing more specific matches a query.
    * E.g., it puts together the home page when no home.php file exists.
    * Learn more: http://codex.wordpress.org/Template_Hierarchy
    *
    * @package ascent
    */

    get_header(); ?>

    <div class=”row”>
    <div class=”col-sm-12 col-md-9″>
    <?php if ( have_posts() ) : ?>
    <?php /* Start the Loop */ ?>
    <?php while ( have_posts() ) : the_post(); ?>

    <?php
    /* Include the Post-Format-specific template for the content.
    * If you want to overload this in a child theme then include a file
    * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    */
    get_template_part( 'content’, get_post_format() );
    ?>
    <?php endwhile; ?>
    <?php ascent_content_nav( 'nav-below’ ); ?>

    <?php else : ?>

    <?php get_template_part( 'no-results’, 'index’ ); ?>

    <?php endif; ?>
    </div>

    <div class=”col-sm-12 col-md-3″>
    <?php get_sidebar(); ?>
    </div>
    </div>
    <?php get_footer(); ?>

    a tutaj content-page. :

    <?php
    /**
    * @package ascent
    */
    ?>

    <?php // Styling Tip!

    // Want to wrap for example the post content in blog listings with a thin outline in Bootstrap style?
    // Just add the class „panel” to the article tag here that starts below.
    // Simply replace post_class() with post_class(’panel’) and check your site!
    // Remember to do this for all content templates you want to have this,
    // for example content-single.php for the post single view. ?>

    <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>

    <div class=”row”>
    <div class=”post-meta-info col-sm-12 col-md-2″>
    <?php if ( 'post’ == get_post_type() ) : ?>
    <div class=”entry-meta”>
    <time class=”entry-time updated” itemprop=”datePublished” datetime=”<?php the_time(’c’); ?>”><?php the_time(’M’); ?><?php the_time(’d’); ?></time>
    <span class=”comments_count clearfix entry-comments-link”><?php comments_popup_link(__(’0′, 'ascent’), __(’1′, 'ascent’), __(’%’, 'ascent’)); ?></span>
    </div><!– .entry-meta –>
    <?php endif; ?>
    </div><!–.post-meta-info–>

    <div class=”post-content-wrap col-sm-12 col-md-10″>
    <header class=”page-header”>
    <h1 class=”entry-title”>” rel=”bookmark”><?php the_title(); ?></h1>
    <span class=”entry-author”>
    <?php _e(’Posted by’, 'ascent’) ?>
    <span class=”author vcard entry-author-link”>
    <?php the_author_posts_link(); ?>
    </span>
    </span>
    </header><!– .entry-header –>

    <?php if ( is_search() || is_archive() ) : // Only display Excerpts for Search and Archive Pages ?>
    <div class=”entry-summary”>
    <?php the_excerpt(); ?>
    „><?php _e(’Read More →’, 'ascent’); ?>
    </div><!– .entry-summary –>

    <?php else : ?>

    <div class=”entry-content”>
    <?php $format = get_post_format($post->ID); ?>
    <?php if (has_post_thumbnail($post->ID)): ?>
    <?php
    $image_id = get_post_thumbnail_id();
    $full_image_url = wp_get_attachment_url($image_id);
    ?>
    <?php if ( ” != get_the_post_thumbnail() ): ?>
    <figure>
    ” title=”<?php the_title(); ?>”>
    <?php the_post_thumbnail(’blog-page’); ?>

    </figure>
    <?php endif; ?>
    <?php endif; ?>

    <?php the_excerpt(); ?>

    <?php
    wp_link_pages( array(
    'before’ => '<div class=”page-links”>’ . __( 'Pages:’, 'ascent’ ),
    'after’ => '</div>’,
    ) );
    ?>
    „><?php _e(’Read More →’, 'ascent’); ?>

    </div><!– .entry-content –>
    <?php endif; ?>

    <footer class=”footer-meta”>
    <?php if ( 'post’ == get_post_type() ) : // Hide category and tag text for pages on Search ?>

    <?php
    /* translators: used between list items, there is a space after the comma */
    $categories_list = get_the_category_list( __( ’, ’, 'ascent’ ) );
    ?>
    <?php
    /* translators: used between list items, there is a space after the comma */
    $tags_list = get_the_tag_list( ”, __( ’, ’, 'ascent’ ) );
    ?>

    <?php if ( ($categories_list && ascent_categorized_blog()) || ($tags_list) ): ?>
    <div class=”cat-tag-meta-wrap”>
    <?php if ( $categories_list && ascent_categorized_blog() ) : ?>
    <span class=”cats-meta”><?php printf( __( '<i class=”fa fa-folder”></i> %1$s’, 'ascent’ ), $categories_list ); ?></span>
    <?php endif; ?>
    <?php if ( $tags_list ) : ?>
    <span class=”tags-meta”><?php printf( __( '<i class=”fa fa-tags”></i> %1$s’, 'ascent’ ), $tags_list ); ?></span>
    <?php endif; ?>
    </div>
    <?php endif; ?>
    <?php endif; ?>
    </footer><!– .entry-meta –>
    </div><!–.post-content-wrap–>

    </div><!–.row–>
    </article><!– #post-## –>

    jakieś pomysły czy to nie te pliki do szukania ?

Viewing 1 replies (of 1 total)
  • wpnet.pl

    (@wpnetpl)

    Skopiuj plik page.php i zmień nazwę na front-page.php
    W nowym pliku usuń niepotrzebny kod.

Viewing 1 replies (of 1 total)
  • Temat ‘Usunięcie strony ze strony głównej – Ascent theme’ jest zamknięty na nowe odpowiedzi.