title: How Can I check if Page is single page of Custom Post Type in Wordpress
body: <p>On the Homepage I have called the content of Custpm Post Type with Ajax with this code </p>
  
  <pre><code>jQuery(document).ready(function($){
     $.ajaxSetup({cache:false});
      $(".sector_item a").click(function(){
          var post_link = $(this).attr("href");
          $(".sector_item_content").html("&lt;div class='load' style='position:relative;margin-top:50px;padding-bottom:50px;'&gt;&lt;img src='&lt;?php bloginfo("template_url"); ?&gt;/images/ajax-loader.gif'&gt;&lt;/div&gt;");
          $(".sector_item_content").load(post_link);
          return false;
      }); 
  }); 
  </code></pre>
  
  <p>But In the single Page of this same Post Type I need to have another design with content so how I can detect the single page. I tried with Wordpess <strong>is_single()</strong> function but it doesnt work it displayed anyway in ajax.How Can I fix this?
  Here is my single template.php</p>
  
  <pre><code>&lt;?php if(is_singular('sector' )){
  echo 'Single page' ;  
  }else{
  while (have_posts() ) : the_post(); ?&gt;
          &lt;div class="container single_page_inner"&gt;
              &lt;div class="row clearfix"&gt;
                  &lt;div class="col-md-10 column" style="float:none;margin:auto;"&gt;
                       &lt;div class="sector_single_title"&gt;
                          &lt;?php the_title();?&gt;
                       &lt;/div&gt;
                       &lt;div class="single_sector_contentmain"&gt; &lt;?php the_content();?&gt;&lt;/div&gt;
                       &lt;div class="single_sector_more"&gt;
                          &lt;img src="&lt;?php bloginfo(template_url);?&gt;/images/single_secormoreline.png"/&gt;
                          &lt;div class="single_sector_button"&gt;
                              &lt;span class="single_sec_leftline"&gt;&lt;/span&gt;
                              &lt;span class="single_sec_rightline"&gt;&lt;/span&gt;
                              &lt;a href="&lt;?php the_permalink();?&gt;"&gt;Click Here To Read More&lt;/a&gt;
                              &lt;div class="more_line"&gt;&lt;/div&gt;
                          &lt;/div&gt;
                       &lt;/div&gt; 
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
           &lt;?php endwhile; ?&gt;
  </code></pre>