所以我使用的是Foundation 4框架。我創建了一個測試着陸頁。然後我從這個着陸頁面創建了一個頁面模板(該頁面簡稱爲page.php)。如何在使用WordPress內容管理系統時正確使用Foundation4?
但是,由於某種原因,我的page.php通過WordPress不符合我想要的樣子(我提供了一個屏幕快照來顯示它出來的內容)。
我的所有css和js文件都通過正確的文件路徑正確引用(請參閱下面的代碼)。基礎css文件夾包含的所有內容,我已將它轉移到wp-content/css文件夾(以及js和images文件夾)。
所以我不確定我的網頁爲什麼會出現。難道我做錯了什麼?
這裏是我的代碼看起來像(忽略額外的/隨機的意見,畢竟這是一個測試):
<?php /* Template Name: VM
*/?>
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title> VenziMedia Foundation 4</title>
<!-- If you are using CSS version, only link these 2 files, you may add app.css to use for your overrides if you like. -->
<!--
<link rel="stylesheet" href="lol/wordpress/wp-content/foundation-5/css/normalize.css" />
<link rel="stylesheet" href="lol/wordpress/wp-content/foundation-5/css/foundation.css" />
<script src="lol/wordpress/wp-content/foundation-5/js/foundation.min.js"></script>
<script src="lol/wordpress/wp-content/foundation-5/js/jquery.txt"></script>
<script src="lol/wordpress/wp-content/foundation-5/js/vendor/custom.modernizr.js"></script>
-->
<?php
include('lol/wordpress/wp-includes/functions.wp-styles.php');
include('lol/wordpress/wp-includes/functions.wp-scripts.php');
wp_register_style('normalize-css', 'lol/wordpress/wp-content/foundation-5/css/normalize.css');
wp_enqueue_style('normalize-css', 'lol/wordpress/wp-content/foundation-5/css/normalize.css');
?>
<?php
include('lol/wordpress/wp-includes/functions.wp-styles.php');
include('lol/wordpress/wp-includes/functions.wp-scripts.php');
wp_register_style('foundation-css', 'lol/wordpress/wp-content/foundation-5/css/foundation.css');
wp_enqueue_style('foundation-css', 'lol/wordpress/wp-content/foundation-5/css/foundation.css');
?>
<?php
include('lol/wordpress/wp-includes/functions.wp-styles.php');
include('lol/wordpress/wp-includes/functions.wp-scripts.php');
wp_register_script('foundation-min', 'lol/wordpress/wp-content/foundation-5/js/foundation.min.js');
wp_enqueue_script('foundation-min', 'lol/wordpress/wp-content/foundation-5/js/foundation.min.js');
?>
<?php
include('lol/wordpress/wp-includes/functions.wp-styles.php');
include('lol/wordpress/wp-includes/functions.wp-scripts.php');
wp_register_script('jquery', 'lol/wordpress/wp-content/foundation-5/js/jquery.txt');
wp_enqueue_script('jquery', 'lol/wordpress/wp-content/foundation-5/js/jquery.txt');
?>
<?php
include('lol/wordpress/wp-includes/functions.wp-styles.php');
include('lol/wordpress/wp-includes/functions.wp-scripts.php');
wp_register_script('mod-js', 'lol/wordpress/wp-content/foundation-5/js/vendor/custom.modernizr.js');
wp_enqueue_script('mod-js', 'lol/wordpress/wp-content/foundation-5/js/vendor/custom.modernizr.js');
?>
</head>
<body>
<!-- body content here -->
<nav class="top-bar">
<ul class="title-area">
<li class="name">
<h1><a href="vm.php">VenziMedia</a></h1>
</li>
</ul>
<section class="top-bar-section">
<ul class="right">
<li class="divider"></li>
<li class="name">
<h1><a href="vm.php">Home</a></h1>
</li>
<li class="divider"></li>
<li class="name">
<h1><a href="vm.php">Services</a></h1>
</li>
<li class="divider"></li>
<li class="name">
<h1><a href="vm.php">Advertisers</a></h1>
</li>
<li class="divider"></li>
<li class="name">
<h1><a href="vm.php">Technology</a></h1>
</li>
<li class="divider"></li>
<li class="name">
<h1><a href="#" data-reveal-id="second-modal">Contact</a></h1>
</li>
<li class="divider"></li>
<li class="has-form">
<a href="#" data-reveal-id="myModal" class="tiny button">LOGIN/SIGN UP</a>
</li>
</section>
</ul>
</nav>
<br><br><br>
<!-- ======================== ORBIT===================== -->
<div style="width: 80%; margin:0 auto">
<ul data-orbit>
<li>
<img src="1.jpg" />
<div class="orbit-caption">you this is the first slideeee</div>
</li>
<li>
<img src="1.jpg" />
<div class="orbit-caption">why don't you just send us money?</div>
</li>
<li>
<img src="1.jpg" />
<div class="orbit-caption">how much wood could a wood chuck chuck, if a wood chuck could chuck wood?</div>
</li>
</ul>
</div>
<br><br><br>
<!-- =======ORBIT END======= -->
<!-- =======14 ======= -->
<div style="text-align:center">
<a href="#" class="large button expand">START YOUR FREE 14-DAY TRIAL! </a>
</div>
<!-- =======14 day END ======= -->
<!--===== 2 PANELLS ==== -->
<div class="row">
<div class="small-6 columns">
<div class="panel">
<h6>LOCAL/SMB</h6>
<p>Learn how VenziMedia can help your business advertise on a local and national level with strategic ad solutions.</p>
</div>
</div>
<div class="small-6 columns">
<div class="panel">
<h6>AGENCY/BRAND</h6>
<p>Contact VenziMedia today to see how we can add value to you or your clients Brand and get a better ROI.</p>
</div>
</div>
</div>
<!-- ====== 2 PANELLS END ==== -->
<!-- ===== WHY VENZI MEDIA ====== -->
<div style="text-align:center">
<a href="#" class="large button">WHY VENZIMEDIA?</a>
</div>
<!-- ===== WHY VENZI MEDIA END ====== -->
<div class="row">
<div class="small-4 columns">
<div class="panel">
<!-- Content here -->
<h6>You check this out man</h6>
<p>we got some cool stuff at venziMedia !</p>
</div>
</div>
<div class="small-4 columns">
<ul class="pricing-table">
<li class="title">Standard</li>
<li class="price">$99.99</li>
<li class="description">An awesome description</li>
<li class="bullet-item">1 Database</li>
<li class="bullet-item">5GB Storage</li>
<li class="bullet-item">20 Users</li>
<li class="cta-button"><a class="button" href="#">Buy Now</a></li>
</ul>
</div>
<div class="small-4 columns">
<div class="panel">
<!-- Content here -->
<h6>some more cool stuff</h6>
<p> you know like venzimedia !this is some random words</p>
</div>
</div>
</div>
<script>
document.write('<script src=lol/wordpress/wp-content/foundation-5/js/vendor/'
+ ('__proto__' in {} ? 'zepto' : 'jquery')
+ '.js><\/script>');
</script>
<script>
document.write('<script src=' +
('__proto__' in {} ? 'lol/wordpress/wp-content/foundation-5/js/vendor/zepto' : 'lol/wordpress/wp-content/foundation-5/js/vendor/jquery') +
'.js><\/script>')
</script>
<script>
$(document).foundation();
</script>
<!-- =========== FIRST REVEAL ======= -->
<div id="myModal" class="reveal-modal">
<form>
<fieldset>
<legend>Fieldset</legend>
<div class="row">
<div class="large-12 columns">
<label>Input Label</label>
<input type="text" placeholder="large-12.columns">
</div>
</div>
<div class="row">
<div class="large-4 columns">
<label>Input Label</label>
<input type="text" placeholder="large-4.columns">
</div>
<div class="large-4 columns">
<label>Input Label</label>
<input type="text" placeholder="large-4.columns">
</div>
<div class="large-4 columns">
<div class="row collapse">
<label>Input Label</label>
<div class="small-9 columns">
<input type="text" placeholder="small-9.columns">
</div>
<div class="small-3 columns">
<span class="postfix">.com</span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<label>Textarea Label</label>
<textarea placeholder="small-12.columns"></textarea>
</div>
</div>
</fieldset>
</form>
</div>
<!-- ========== FIRST REVEAL END ====== -->
<!-- ========= 2ND REVEAL ===== -->
<div id="second-modal" class="reveal-modal">
<div class="section-container tabs" data-section="tabs">
<section class="active">
<p class="title" data-section-title><a href="#">Phone/Email</a></p>
<div class="content" data-section-content>
<b>Sales #: </b>123-456-789<br>
<b>Tech #: </b>232-453-564<br>
<b>Email (tech): </b>[email protected]<br>
<b>Email (sales): </b>[email protected]<br>
</div>
</section>
<section>
<p class="title" data-section-title><a href="#">Adress</a></p>
<div class="content" data-section-content>
<b>123 Easy St.</b><br>
<b>Hayward, CA</b><br>
<b>94509</b><br>
<b>USA</b>
</div>
</section>
<section>
<p class="title" data-section-title><a href="#">Social</a></p>
<div class="content" data-section-content>
<a href="https://www.facebook.com/VenziMedia?ref=br_tf">Check our Facebook!</a><br>
<a href="https://twitter.com/venzimedia">Check our Twitter!</a>
</div>
</section>
</div>
</div>
<!-- ========== 2ND REVEAL END ==== -->
</body>
</html>
對不起,遲到的答覆,但事情是,我想從頭開始編碼一切。另外,什麼是正確的路徑?謝謝。 –
正確的方法是使用我上面編寫的函數。他們將提供正確的路徑(並且只有他們在wordpress中)閱讀codex(鏈接發佈)並隨意實現(如果您想從零開始編碼..) –
我有因爲我已經對文件進行了必要的更改,但仍然無法正常工作,所以我將在上面的文章中對其進行編輯,以便您查看更改。 –