dziękuje, po co pisałem że znam się cokolwiek 😛 nie rozumiem tego.
http://codex.wordpress.org/Page_Templates
http://codex.wordpress.org/images/thumb/a/a3/page-templates-pulldown-screenshot.png/180px-page-templates-pulldown-screenshot.png << chyba coś takiego jak tu mam przy jednym motywie na stronie tylko nie wiem jak to zrobić co jak i gdzie…
z angielskim u mnie średnio.
chce by po kliknięciu w link do konkurs wyświetliła się strona z innym motywem (nawet zupełnie innym) – dobrze gdyby od strony panelu wybierało się to właśnie z listy przy publikacji strony oraz wymagało możliwie jak najmniej grzebania w kodzie
Tworzenie własnego szablonu masz opisane tutaj: http://codex.wordpress.org/Page_Templates#Custom_Page_Template
Po naszemu – np. robisz kopię pliku page.php, zapisujesz pod nazwą szablon.php, edytujesz i na jego początku dajesz:
<?php
/*
Template Name: Szablon
*/
-i już masz własny szablon strony, który będzie dostępny w liście rozwijalnej w oknie edycyjnym strony.
Zostaje tylko kwestia jego ostylowania …ot modyfikujesz go sobie wedle własnych upodobań, zmieniasz/dodajesz własne klasy i uzupełniasz plik style.css.
ps. Jeżeli nie znasz angielskiego, jest coś takiego jak google translate.
A jeżeli chcesz zastosować kompletny, inny motyw, to możesz czymś w ten deseń
http://wordpress.org/extend/plugins/jonradio-multiple-themes/
Dziękuje. Trochę mi to zajęło ale stworzyłem motyw potomny. Poprzednio jak zmodyfikowałem szablon główny okazało się, że strona się zwiesza.
Możecie sprawdzić ten motyw?
<?php
/**
* Template Name: Squize Page
*
* Description: Twenty Twelve loves the no-sidebar look as much as
* you do. Use this page template to remove the sidebar from any page.
*
* Tip: to remove the sidebar from all posts and pages simply remove
* any active widgets from the Main Sidebar area, and the sidebar will
* disappear everywhere.
*
* The template for displaying the footer.
*
* Contains footer content and the closing of the
* #main and #page div elements.
*
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
*
* @package WordPress
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/
?><!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) | !(IE 8) ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="hfeed site">
<!-- treśc strony -->
<div id="primary" class="site-content">
<div id="content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', 'page' ); ?>
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #primary -->
<!-- stopka -->
<footer id="colophon" role="contentinfo">
<a style="font-size:8px;" href="http://marcinkorbiel.pl/polityka-prywatnosci/" title="Polityka Prywatności"> Polityka Prywatności </a>
</footer><!-- #colophon -->
</div>
</body>
</html>
Jak zrobić taki motyw potomny aby zastępował cały szablon dla podstrony?
Cel: gdy zmienię szablon wystarczy skopiować i drobna modyfikacja motywu potomnego by mieć znów ten sam wygląd.