AJAXing一个WordPress自定义主题
我正在尝试为我女朋友的烹饪和烘焙博客制作一个自定义主题。 我想这样做,以便在点击博客post缩略图链接时没有页面刷新。 相反,我希望将博客文章内容动态加载ajax到home.php中id =“main-content”的文章中,我还想为各个post启用深层链接。 这是网站将有点像(还没有完成): http : //natalija.co.nf/每个类别都有一个滑块,其中将显示3个缩略图链接到post和章节与文章里面的post应该加载将显示在页面底部,就在页脚之前。 这是我的home.php和single.php页面的代码:
home.php
'id', 'order' => 'ASC', 'hide_empty' => '0', 'exclude' => '1' ); $categories = get_categories($args); foreach($categories as $category) { ?> <section id="slug; ?>" data-stellar-background-ratio="0.5"> <article class="slug; ?>" data-stellar-ratio="1.5"> name; ?>
single.php中
<div id="post-"> 'Pages: ', 'next_or_number' => 'number')); ?>