Jak dodać widget w drugim szablonie?
-
Witajcie!
Stworzyłem do mojej strony dodatkowy szablon, który otwiera się tylko z jednej podstrony. To jest jeden plik, który nazwałem index2.php i wrzuciłem go do folderu z głównym motywem. Jeśli o to chodzi, to działa pięknie.
Tu jest link do strony głównej
Tutaj link do mojego szablonuMój problem polega na tym, że nie wiem jak zrobić, aby na stronie z moim szablonem wyświetlały się widgety. Czytałem, że do functions.php trzeba dodać linijkę, ale do tego szablonu nie tworzyłem takiego pliku. Ten plik jedynie jest dla głównego motywu.
Tak wygląda kod mojego szablonu:
<?php /* Template Name: Start */ ?> <html lang="en"> <head> <meta charset="utf-8" /> <title>Modlitewnik - Katolicki Modlitewnik Wzajemnej Modlitwy</title> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no" /> <!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--> <link href='http://fonts.googleapis.com/css?family=Open+Sans:300,600' rel='stylesheet' type='text/css' /> <link rel="stylesheet" href="css/style.css" /> <!-- Scripts are at the bottom of the page --> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head> <body> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/pl_PL/sdk.js#xfbml=1&appId=1477630355818709&version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <!-- BACKGROUND --> <img src="img/tlo.PNG" class="background" alt="" /> <!-- /BACKGROUND --> <!-- ********************************************************* * You may use this code for free on any web page provided that * these comment lines and the following credit remain in the code. * Floating Div from http://www.javascript-fx.com ******************************************************** --> <div id="divTopLeft" style="position:relative"> <!-- Start - put your content here ---> <a href="http://modlitewnik.hol.es/"><font size="3" color="green">Przełącz na widok standardowy</font></a> <!-- End - put your content here ---> </div> <script type="text/javascript"> var ns = (navigator.appName.indexOf("Netscape") != -1); var d = document; function JSFX_FloatDiv(id, sx, sy) { var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id]; var px = document.layers ? "" : "px"; window[id + "_obj"] = el; if(d.layers)el.style=el; el.cx = el.sx = sx;el.cy = el.sy = sy; el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;}; el.floatIt=function() { var pX, pY; pX = (this.sx >= 0) ? 0 : ns ? innerWidth : document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth; pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop; if(this.sy<0) pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight; this.cx += (pX + this.sx - this.cx)/8;this.cy += (pY + this.sy - this.cy)/8; this.sP(this.cx, this.cy); setTimeout(this.id + "_obj.floatIt()", 0); } return el; } JSFX_FloatDiv("divTopLeft", 0,0).floatIt(); </script> <!-- ********************************************************* --> <!-- LOGO --> <div class="header"> <h1> <img src="img/LOGO-modlitewnika.png" height="90" width="100" class="header-logo" alt="" /> <b>Modlitewnik Katolicki</b> Wzajemnej Modlitwy <img src="img/beta.png" height="40" width="50" /><p> <p> </h1> </div> <!-- /LOGO --> <!-- MAIN CONTENT SECTION --> <section id="content"> <!-- SECTION --> <section class="clearfix section" id="start"> <!-- SECTION TITLE --> <h3 class="block-title">Start</h3> <!-- /SECTION TITLE --> <!-- SECTION TILES --> <div class="tile yellow w2 h1 title-horizontalcenter icon-scaleuprotate360cw"> <a class="link" href="http://modlitewnik.hol.es/1869-2" target="_self"> <center><img src="img/home73.png" height="90" width="100" /></center> <p class="title"><font size="4">Strona główna</font></p> </a> </div> <div class="tile turquoise w2 h1 title-horizontalcenter icon-scaleuprotate360cw"> <a class="link" href="http://modlitewnik.hol.es/" target="_self"> <center><img src="img/find3.png" height="80" width="90" /></center> <p class="title"><font size="4">Szukaj</font><br>Lista wszystkich modlitw</p> </a> </div> <div class="tile turquoise w2 h1 title-horizontalcenter icon-scaleuprotate360cw"> <a class="link" href="http://modlitewnik.hol.es/katalog" target="_self"> <center><img src="img/index3.png" height="90" width="100" /></center> <p class="title"><font size="4">Kategorie</font><br>i katalog modlitw</p> </a> </div> <div class="tile turquoise w2 h1 title-horizontalcenter icon-scaleuprotate360cw"> <a class="link" href="http://modlitewnik.hol.es/losuj" target="_self"> <center><img src="img/two99.png" height="120" width="130" /></center> <p class="title"><font size="4">Losowa</font><br>Wylosuj modlitwę</p> </a> </div> <!-- /SECTION TILES --> </section> <!-- /SECTION --> <!-- SECTION --> <section class="clearfix section" id="about"> <!-- SECTION TITLE --> <h3 class="block-title"></h3> <!-- /SECTION TITLE --> <!-- SECTION TILES --> <div class="tile blue w2 h1 title-horizontalcenter icon-scaleuprotate360cw"> <a class="link" href="http://modlitewnik.hol.es/dodaj" target="_self"> <center><img src="img/text89.png" height="90" width="100" /></center> <p class="title"><font size="4">Napisz swoją modlitwę</font></p> </a> </div> <div class="tile blue w2 h1 title-horizontalcenter icon-scaleuprotate360cw"> <a class="link" href="http://modlitewnik.hol.es/dodane" target="_self"> <center><img src="img/searching4.png" height="80" width="90" /></center> <p class="title"><font size="4">Dodane</font><br>Zobacz modlitwy Użytkowników</p> </a> </div> <div class="tile blue w2 h1 title-horizontalcenter icon-scaleuprotate360cw"> <a class="link" href="http://modlitewnik.hol.es/katolickie-tapety-modlitewnika-m" target="_self"> <center><img src="img/photos9.png" height="90" width="100" /></center> <p class="title"><font size="4">Tapety</font><br>Pobierz katolickie tapety</p> </a> </div> <div class="tile blue w2 h1 title-horizontalcenter icon-scaleuprotate360cw"> <a class="link" href="http://modlitewnik.hol.es/pobierz" target="_self"> <center><img src="img/pdf15.png" height="120" width="130" /></center> <p class="title"><font size="4">Modlitewniki PDF</font><br>Pobierz modlitewnik</p> </a> </div> <!-- /SECTION TILES --> </section> <!-- /SECTION --> <!-- SECTION --> <section class="clearfix section" id="articles"> <!-- SECTION TITLE --> <h3 class="block-title">Wzajemna Modlitwa na Facebooku</h3> <!-- /SECTION TITLE --> <!-- SECTION TILES --> <div class="tile white title-scaleup imagetile w3 h3"> <div class="fb-like-box" data-href="https://www.facebook.com/wzajmodlitwa" data-width="395" data-colorscheme="light" data-show-faces="false" data-header="true" data-stream="true" data-show-border="true"></div> </div> </a> </div> <!-- /SECTION TILES --> </section> <!-- /SECTION --> <!-- SECTION --> <section class="clearfix section" id="contactform"> <!-- SECTION TITLE --> <h3 class="block-title">Opcje dodatkowe</h3> <!-- /SECTION TITLE --> <!-- SECTION TILES --> <div class="tile green w2 h1 title-horizontalcenter icon-scaleuprotate360cw"> <a class="link" href="http://modlitewnik.hol.es/startuj-modlitewnikiem" target="_self"> <center><img src="img/chrome4.png" height="90" width="100" /></center> <p class="title"><font size="4">Ustaw stronę startową</font><br>Dowiedz się więcej</p> </a> </div> <div class="tile green w2 h1 title-horizontalcenter icon-scaleuprotate360cw"> <a class="link" href="http://modlitewnik.hol.es/opinie" target="_self"> <center><img src="img/men16.png" height="80" width="90" /></center> <p class="title"><font size="4">Opinie o Modlitewniku</font><br>Przeczytaj i napisz swoją!</p> </a> </div> <div class="tile green w2 h1 title-horizontalcenter icon-scaleuprotate360cw"> <a class="link" href="http://modlitewnik.hol.es/wesprzyj" target="_self"> <center><img src="img/small36.png" height="90" width="100" /></center> <p class="title"><font size="4">Reklama</font><br>Zobacz banery, plakaty, itp.</p> </a> </div> <div class="tile red w2 h1 title-horizontalcenter icon-scaleuprotate360cw"> <a class="link" href="http://modlitewnik.hol.es/zglos-blad-propozycje" target="_self"> <center><img src="img/error6.png" height="120" width="130" /></center> <p class="title"><font size="4">Zgłoś błąd</font></p> </a> </div> <!-- /SECTION TILES --> </section> <!-- /SECTION --> <!-- SECTION --> <section class="clearfix section" id="contact"> <!-- SECTION TITLE --> <h3 class="block-title">Polecam</h3> <!-- /SECTION TITLE --> <!-- SECTION TILES --> <div class="tile w1 h1 title-horizontalcenter icon-scaleuprotate360cw"> <a class="link" href="http://wzajemnamodlitwa.hol.es/" target="_self"> <center><img src="img/wzajemna-modlitwa2.png" height="120" width="130" /></center> <p class="title"><font size="4">Wzajemna Modlitwa</font></p> </a> </div> <div class="tile w1 h1 title-horizontalcenter icon-scaleuprotate360cw"> <a class="link" href="http://jatyion.blog.deon.pl/" target="_self"> <center><img src="img/2-300x300.png" height="120" width="130" /></center> <p class="title"><font size="4">Blog</font></p> </a> </div> <!-- /SECTION TILES --> </section> <!-- /SECTION --> </section> <!-- /MAIN CONTENT SECTION --> <!-- LOCKSCREEN --> <section class="mlightbox" id="lockscreen"><center><p> <p><h1>Modlitewnik Katolicki Wzajemnej Modlitwy</h1><p><h3>Ładowanie...</h3><p> <img src="img/preloader.gif" id="lockloader" alt="Ładowanie..." /></center> <div id="lockscreen-content"> <center><img src="img/LOGO-modlitewnika.png" height="150" width="170" id="locklogo" alt="Modlitewnik Katolicki" /></center> <br /><br /> </div> </section> <!-- /LOCKSCREEN --> <!-- SIDEBAR --> <div id="opensidebar"><i class="icon-3x">+</i></div> <section id="sidebar" class="htmltile"> <ul> <li></li> <li><a data-scroll="scrollto" href="#start"><img src="img/home73.png" height="50" width="60" /></a></li> <li><a data-scroll="scrollto" href="#about"><i class="icon-user icon-3x"></i></a></li> <li><a data-scroll="scrollto" href="#articles"><i class="icon-file-text icon-3x"></i></a></li> <li><a data-scroll="scrollto" href="#contactform"><i class="icon-envelope icon-3x"></i></a></li> </ul> </section> <!-- /SIDEBAR --> <!-- PRELOADER --> <section class="mlightbox" id="loader"> <a href="#"> <img src="img/preloader.gif" alt="Ładowanie..." /> </a> </section> <!-- /PRELOADER --> <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <!-- jQuery Library --> <script src="js/respond.min.js" type="text/javascript"></script> <!-- Responsive Library --> <script src="js/jquery.isotope.min.js" type="text/javascript"></script> <!-- Isotope Layout Plugin --> <script src="js/jquery.mousewheel.js" type="text/javascript"></script> <!-- jQuery Mousewheel --> <script src="js/jquery.mCustomScrollbar.js" type="text/javascript"></script> <!-- malihu Scrollbar --> <script src="js/tileshow.js" type="text/javascript"></script> <!-- Metromega Custom Tileshow Plugin --> <script src="js/mlightbox.js" type="text/javascript"></script> <!-- Metromega Custom Lightbox Plugin --> <script src="js/jquery.fitVids.js" type="text/javascript"></script> <!-- jQuery fitVids Plugin --> <script src="js/lockscreen.js" type="text/javascript"></script> <!-- Metromega Lockscreen --> <script src="js/bootstrap.min.js" type="text/javascript"></script> <!-- Bootstrap Library --> <script src="js/script.js" type="text/javascript"></script> <!-- Metromega Script --> </body> </html>Czy to jest w ogóle możliwe, jeśli jest, to jak? 🙂
Temat ‘Jak dodać widget w drugim szablonie?’ jest zamknięty na nowe odpowiedzi.