0
我試圖在Wordpress網站上安裝「Advanced AJAX Page Loader」插件。主題安裝說:「確保你的主題的內容區域包含在標籤中,比如帶有一個名爲」content「的id屬性的DIV。」AJAX頁面加載Wordpress
我的主題有什麼樣子在我的page.php文件文件內容的變量DIV包裝:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="page-<?php the_ID(); ?>" class="type-page" itemscope itemtype="http://schema.org/Article">
<!-- page-title -->
<?php if($themify->page_title != "yes"): ?>
<h1 class="page-title" itemprop="name"><?php the_title(); ?></h1>
<?php endif; ?>
<!-- /page-title -->
<div class="page-content entry-content" itemprop="articleBody">
<?php the_content(); ?>
我的問題是,它看起來像我在看代碼的右側部分,即
如果是這樣,我將如何識別相應的div包裝,它看起來像基於頁面ID的變量:?
謝謝,但插件設置允許我輸入「內容元素ID」,這是我的主題內容的div ID。看來我的主題有div封裝的「div id =」page - <?php the_ID(); 「,它不會工作,因爲它是可變的。 – kyle 2015-03-19 12:53:16
你正在使用的腳本將尋找一個ID爲'content'的元素,我想它會插入數據的位置。 '>'部分你有我的答案標籤內的上面,看看它是否工作 – paddyfields 2015-03-19 12:57:55