Title: Zmiana koloru tła w konkretnej podstronie
Last modified: 2016-08-05

---

# Zmiana koloru tła w konkretnej podstronie

 *  [oczymufasy](https://pl.wordpress.org/support/users/oczymufasy/)
 * (@oczymufasy)
 * [10 lat, 8 miesięcy temu](https://pl.wordpress.org/support/topic/zmiana-koloru-tla-w-konkretnej-podstronie/)
 * Witam Was, mam takie pytanie, ponieważ męcze się z tym w sumie już drugi dzień.
   Próbowałem wiele rzeczy ale nie mogę zmienić koloru tła na konkretnej postronie.
   Macie jakieś pomysły? Z góry dziękuję za pomoc ! 🙂
 * <?php
    /* Template Name: Portfolio .single { background-color: black } .page-
   template-template-layout-portfolio-php .site { */ ?> <?php get_header(); ?> <?
   php $settings = thegravity_metabox_values(’metabox_portfolio’); ?> <?php if (
   $settings[’fullwidth’]): ?> </div> <?php endif; ?> <?php if ($settings[’categoriesbox’]):?
   > <!– Indent –> <div class=”gap60″></div> <!– Filters –> <nav class=”filters”
   > <div class=”<?php echo $settings[’fullwidth’] ? 'row-fluid’ : 'row’ ; ?>”> 
   <div class=”span12 text-center”> [ <i class=”icon-cog”></i> <?php _e(’Categories’,'
   Supernova’); ?>  </div> </div> <div class=”filters-set”> <?php // Get All Items
   category $cats = array( array( 'class’ => 'current’, 'filter’ => '*’, 'icon’ 
   => 'icon-cloud-download’, 'text’ => __(’All Items’, 'Supernova’), ), ); // Get
   list of user categories $cat_icons = get_option(’category_icons’); $terms = get_terms(’
   taxonomy_portfolio_category’); if ($terms && count($terms)) { foreach ($terms
   as $cat) { $cats[] = array( 'class’ => ”, 'filter’ => ’.’.$cat->slug, 'icon’ 
   => ($cat_icons && is_array($cat_icons) && isset($cat_icons[$cat->term_id])) ?
   $cat_icons[$cat->term_id] : ”, 'text’ => $cat->name, ); } } reset($cats); ?> 
   <?php for ($i = 0; $i <= count($cats) / 4; $i++) : ?> <div class=”row-fluid”>
   <?php for ($j = 0; $j < 4; $j++) : ?> <?php if (list($key, $value) = each($cats)):?
   > <div class=”span3″> ” href=”#” data-filter=”<?php echo $value[’filter’]; ?>”
   ><i class=”<?php echo $value[’icon’]; ?>”></i> <?php echo $value[’text’]; ?> 
   </div> <?php endif; ?> <?php endfor; ?> </div> <?php endfor; ?> </div> </nav>
   <?php endif; ?> <!– Indent –> <div class=”gap60″></div> <?php $args = array( '
   post_type’ => 'portfolio’, 'posts_per_page’ => $settings[’postcount’], 'order’
   => $settings[’postorder’], 'offset’ => (max(1, get_query_var(’paged’)) – 1) *
   $settings[’postcount’], ); if (is_array($settings[’categories’]) && count($settings[’
   categories’]) && !in_array(’-1′, $settings[’categories’])) { $args[’tax_query’]
   = array( 'relation’ => 'OR’, array( 'taxonomy’ => 'taxonomy_portfolio_category’,'
   field’ => 'slug’, 'terms’ => $settings[’categories’], ), ); }
 *  $query = new WP_Query($args);
    ?> <?php if ($query->have_posts()): ?> <!– Works–
   > <div class=”filterable-items”> <?php $html = ”; // Set image class $imageclass
   = 'full’; if (!$themeoptions[’retina’]) { if ($settings[’columns’] == 2) { $imageclass
   = 'portfolio_two_columns’; } else if ($settings[’columns’] == 3) { $imageclass
   = 'portfolio_three_columns’; } else if ($settings[’columns’] == 4) { $imageclass
   = 'portfolio_four_columns’; } } while ($query->have_posts()) { $query->the_post();//
   Get the list of categories for isotope $categories = array(); if (has_term(”,'
   taxonomy_portfolio_category’)) { foreach (get_the_terms(get_the_ID(), 'taxonomy_portfolio_category’)
   as $cat) { $categories[] = $cat->slug; } } $html .= thegravity_shortcodes_column(
   array( 'type’ => '1/’.$settings[’columns’], 'class’ => join(’ ’, $categories),),
   thegravity_shortcodes_project($imageclass, $settings[’fullwidth’]) ); } wp_reset_postdata();//
   Set necessary attributes for fullwidth portfolio $attributes = array(); if ($
   settings[’fullwidth’]) { $attributes = array( 'class’ => 'row-fluid’, ); } echo
   thegravity_shortcodes_columns($attributes, $html); ?> </div> <!– Indent –> <?
   php if ($query->max_num_pages > 1): ?> <div class=”gap20″></div> <!– Selector
   for the paged navigation –> <nav id=”page-nav”> „> </nav> <!– Load more items–
   > <?php _e(’Load more items’, 'Supernova’); ?> <?php if (!$settings[’fullwidth’]):?
   > <div class=”gap40″></div> <?php endif; ?> <?php endif; ?> <!– Indent –> <?php
   if (!$settings[’fullwidth’]): ?> <div class=”gap10″></div> <?php endif; ?> <?
   php endif; ?> <?php if ($settings[’fullwidth’]): ?> <div> <?php endif; ?> <?php
   get_footer(); ?>

Zobacz 3 odpowiedzi - od 1 do 3 (z 3 łącznie)

 *  [Nikodemsky](https://pl.wordpress.org/support/users/nikodemsky/)
 * (@nikodemsky)
 * [10 lat, 8 miesięcy temu](https://pl.wordpress.org/support/topic/zmiana-koloru-tla-w-konkretnej-podstronie/#post-56861)
 * używasz do tego klasy css **.page-id-0**, gdzie numer zmieniasz na id strony,
   a następnie dodajesz resztę.
 * Np.
    `.page-id-21 { background: #ff0000 !important; }`
 *  Twórca wątku [oczymufasy](https://pl.wordpress.org/support/users/oczymufasy/)
 * (@oczymufasy)
 * [10 lat, 8 miesięcy temu](https://pl.wordpress.org/support/topic/zmiana-koloru-tla-w-konkretnej-podstronie/#post-56873)
 * Gdzie znajdę numer ID podstrony?
    Bo to chyba nie przyklad.com/przyklad
 * .page-id-przyklad ?
 * I gdzie wstawiamy owy kod?
 * Z góry dzięki za odpowiedź 🙂
 *  [Nikodemsky](https://pl.wordpress.org/support/users/nikodemsky/)
 * (@nikodemsky)
 * [10 lat, 8 miesięcy temu](https://pl.wordpress.org/support/topic/zmiana-koloru-tla-w-konkretnej-podstronie/#post-56874)
 * Dwa sposoby.
 * 1. Podczas edycji strony:
    [http://s21.postimg.org/6f17sq4rb/image.png](http://s21.postimg.org/6f17sq4rb/image.png)
 * 2. W konsoli developera:
    [http://s21.postimg.org/ntlg101w7/image.png](http://s21.postimg.org/ntlg101w7/image.png)

Zobacz 3 odpowiedzi - od 1 do 3 (z 3 łącznie)

 Temat ‘Zmiana koloru tła w konkretnej podstronie’ jest zamknięty na nowe odpowiedzi.

 * W: [Używanie i konfiguracja WordPressa](https://pl.wordpress.org/support/forum/zrob-to-sam-i-konfiguracja-wordpressa/)
 * 3 odpowiedzi
 * 2 uczestnik
 * Ostatnia odpowiedź od: [Nikodemsky](https://pl.wordpress.org/support/users/nikodemsky/)
 * Ostatnia aktywność: [10 lat, 8 miesięcy temu](https://pl.wordpress.org/support/topic/zmiana-koloru-tla-w-konkretnej-podstronie/#post-56874)
 * Status: nierzwiązane

## Tematy

### Najbardziej popularne tematy

### Tematy bez odpowiedzi

### Wątki niezwiązane ze wsparciem

### Rozwiązane wątki

### Nierozwiązane tematy

### Wszystkie tematy
