내 여자 친구의 블로그에 대한 단일 페이지 사용자 지정 테마를 만들고 있습니다. 내가 home.php 내의 동일한 페이지에있는 div에 카테고리에서 블로그 게시물을로드하는 데 사용하는 고급 AJAX Page Loader 플러그인을 설치했습니다. 이것은 잘 작동합니다. 그러나 div에 블로그 게시물을로드하고 블로그의 URL을 주소 표시 줄에 전달한 다음 페이지를 새로 고치거나 링크를 복사하여 새 탭에 붙여 넣으면 사이트를 손상시키는 single.php가로드됩니다. 이 문제를 어떻게 해결합니까? 라이브 버전에서 누락 무슨 http://natalija.co.nf고급 AJAX 페이지 로더 딥 링크 문제
이 게시물은 다음과 같습니다 여기
문제의 사이트입니다. 카테고리에는 블로그 게시물에 대한 3 개의 미리보기 링크가 표시되어야하며 그 중 하나를 클릭하면 해당 게시물의 내용을 페이지 하단의 div에로드해야합니다. 여기 내 single.php 코드<div id="post" class="post-wrap <?php if($ajaxRequest){echo 'ajax';}?>">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<h1><?php the_title(); ?></h1>
<?php include (TEMPLATEPATH . '/inc/meta.php'); ?>
<div class="entry">
<?php the_content(); ?>
<?php wp_link_pages(array('before' => 'Pages: ', 'next_or_number' => 'number')); ?>
<?php the_tags('Tags: ', ', ', ''); ?>
</div>
<?php edit_post_link('Edit this entry','','.'); ?>
</div>
<?php comments_template(); ?>
<?php endwhile; endif; ?>
</div>
이며, 여기 내 home.php 코드 : 그래서
<?php get_header(); ?>
<?php
$args = array(
'orderby' => 'id',
'order' => 'ASC',
'hide_empty' => '0',
'exclude' => '1'
);
$categories = get_categories($args);
foreach($categories as $category) {
?>
<section id="<?php echo $category->slug; ?>" data-stellar-background-ratio="0.5">
<article class="<?php echo $category->slug; ?>" data-stellar-ratio="1.5">
<h1><?php echo $category->name; ?></h1>
<div class="wrapper">
<ul class="slider">
<?php
$args = array (
'post_status' => '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
?>
<li class="slide">
<a data-target="main-content" href="<?php echo get_permalink(); ?>">
<?php the_post_thumbnail(); ?>
<div class="bubble">
<h5><?php echo get_the_title(); ?></h5>
</div>
</a>
</li>
<?php } // end $custom_query loop
} else {
// no posts found
}
// reset the postdata
wp_reset_postdata();
?>
</ul>
<img class="previous" src="wp-content/themes/Natalija/images/arrow-transparent.png" alt="random" data-stellar-ratio="1.7">
<img class="next" src="wp-content/themes/Natalija/images/arrow-transparent.png" alt="random" data-stellar-ratio="1.7">
</div>
</article>
</section>
<?php
} // end $categories loop
?>
<section id="oblogu" data-stellar-background-ratio="0.5">
</section>
<section id="contact" data-stellar-background-ratio="0.5">
<article class="contact" data-stellar-ratio="1.5">
<h1 class="contact-h1">KONTAKT</h1>
<?php echo do_shortcode('[contact-form-7 id="73" title="Bez naslova"]'); ?>
</article>
</section>
<section id="ostalo" data-stellar-background-ratio="0.5">
<article class="ostalo" data-stellar-ratio="1.5">
<h1>Ostalo</h1>
</article>
</section>
<div id="main-content">
<div id="post">
</div>
</div>
<?php get_footer(); ?>
완벽하게 명확하기 : 새로 고침 또는 개별 블로그 게시물에 대한 외부 연결이로드 single.php에 의해 생성 된 unstyled 컨텐트, 페이지 하단에있는 div 안에로드 된 블로그 게시물의 내용으로 전체 사이트 (home.php)를로드하는 대신. 이 문제를 해결할 방법이 있으며 딥 링크를 사용하여이 문제를 해결하려면 어떻게해야합니까?