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; ?>

    'publish', 'category_name' => $category->slug, 'nopaging' => true, ); $custom_query = new WP_Query( $args ); if ( $custom_query->have_posts() ) { while ( $custom_query->have_posts() ) { $custom_query->the_post(); // begin your slider loops in here ?>
  • <a href="https://stackoverflow.com/questions/23093113/ajaxing-a-wordpress-custom-theme/">
random random

single.php中

  
<div id="post-">

'Pages: ', 'next_or_number' => 'number')); ?>

我尝试了关于ajax的一些在线教程,但我无法将其拉下来。 任何人都可以帮我解决这个问题吗?