Individual Post Not Working
-
Hi There,
This is my website : https://www.assureuk.co.uk/
In the blog page of this website : https://www.assureuk.co.uk/blog-2/
Every posts are displaying properly. But, When I click the individual posts, That is not working.I am getting the following ERROR :
Exception thrown
DateTime::__construct(): Failed to parse time string (26/05/2016) at position 0 (2): Unexpected character
Please check this URL: https://www.assureuk.co.uk/inheritance-tax-planning-using-new-lifetime-isa/
Could please any one help me to resolve this issue…
I searched this with some forums. This is some thing related to Timestamp..
Where I can see this settings ? in theme files or Word press core files or Database ?
Here is my single.php code ;
MILLIONS OF THANKS IN ADVANCE ??
<?php /** * The Template for displaying all single posts. * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ get_header(); $category_detail=get_the_category( $post->ID ); if($category_detail[0]->cat_ID==22){ ?> <script type="text/javascript"> function validation() { var a = document.frmcontact.elements['name'].value; var b = document.frmcontact.elements['cname'].value; var c = document.frmcontact.elements['email'].value; var d = document.frmcontact.elements['phoneno'].value; var flag = 0; var flag1 = 0; var flag2 = 0; var flag3 = 0; if(a=="" || a=="Your name" ) { alert("Please enter your name"); document.getElementById('name').focus(); return false; } else { var len = a.length; for(var i =0;i<len;i++) { if(a[i]!=" ") { flag=1; } } } if(flag==0) { alert("Please enter your valid name"); document.getElementById('name').value=""; document.getElementById('name').focus(); return false; } if(b=="" || b=="Your company") { alert("Please enter company name"); document.getElementById('cname').focus(); return false; } else { var len = b.length; for(var i =0;i<len;i++) { if(b[i]!=" ") { flag1=1; } } } if(flag1==0) { alert("Please enter valid company name"); document.getElementById('cname').value=""; document.getElementById('cname').focus(); return false; } if(c=="" || c=="Your email address") { alert("Please enter your email address"); document.getElementById('email').focus(); return false; } else { var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; var address = document.frmcontact.elements['email'].value; if(reg.test(address) == false) { alert("The email address you enter appears to be incorrect. Example ([email protected])"); document.getElementById('email').focus(); return false; } } if(d=="" || d=="Your telephone no") { alert("Please enter your telephone number"); document.getElementById('phoneno').focus(); return false; } else { if(isNaN(d) || d==" " || d==".") { alert('Please enter only alphanumeric value'); document.getElementById('phoneno').focus(); return false; } else { var len = d.length; for(var i =0;i<len;i++) { if(d[i]!=" ") { flag3=1; } } } if(flag3==0) { alert("Please enter only alphanumeric value"); document.getElementById('phoneno').focus(); return false; } } document.frmcontact.submit(); } </script> <div class="bnr_row" style="height: 180px;"> <?php if (have_posts()) : the_post(); $url = wp_get_attachment_url( get_post_thumbnail_id(197) ); $url=str_replace('176.32.230.19/','',$url);?> <div class="bnr"><img src="<?php //echo Site_url();?>https://assureuk.co.uk/timthumb.php?src=<?php echo $url; ?>&w=671&h=179&q=100" alt="" /></div> <?php endif;?> <div class="bnr_rightform" style="height: 169px;"> <p>For more information on our Audit Service or a call back please send us:</p> <form name="frmcontact" action="<?php echo get_template_directory_uri(); ?>/contactmail.php" method="post"> <span class="inputbg"><input name="name" maxlength="60" id="name" type="text" value="Your name" onblur="if (this.value == '') { this.value='Your name'; }" onfocus="if (this.value == 'Your name') { this.value='';} " /></span><span class="em1" >*</span> <span class="inputbg"><input name="cname" maxlength="60" id="cname" type="text" value="Your company" onblur="if (this.value == '') { this.value='Your company'; }" onfocus="if (this.value == 'Your company') { this.value='';} "/></span><span class="em1" >*</span> <span class="inputbg"><input name="email" maxlength="90" id="email" type="text" value="Your email address" onblur="if (this.value == '') { this.value='Your email address'; }" onfocus="if (this.value == 'Your email address') { this.value='';} "/></span><em class="em1" >*</em> <span class="inputbg"><input name="phoneno" maxlength="14" id="phoneno" type="text" value="Your telephone no" onblur="if (this.value == '') { this.value='Your telephone no'; }" onfocus="if (this.value == 'Your telephone no') { this.value='';} " maxlength="15"/></span><em class="em1" >*</em> <a href="#" class="submitbtn" onclick="return validation();">SUBMIT</a> </form> </div> </div> <div class="contentpart"> <div class="nestedlinks"> <?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } ?> </div> <div class="pension_scheme"> <div class="l_colum1"> <h1>Our services</h1> <ul> <?php wp_nav_menu(array('menu' => 'services menu', 'container' => 'div', 'container_id' => '', 'container_class' => '' ) );?> </ul> </div> <div class="m_colum"> <h2><?php echo get_the_title();?></h2><br/> <ul class="listing2"> <?php echo get_the_content();?> </ul> </div> <div class="r_colum1"> <div class="box11"> <img src="<?php //echo Site_url();?>https://assureuk.co.uk/timthumb.php?src=<?php echo str_replace('176.32.230.19/','',get_field('image',197)); ?>&w=214&h=118&q=100" alt="" /> <div class="bpxpatch1"> <h1><?php echo get_field('client_tilte',197);?></h1> </div> </div> <div class="quotdiv"> <img src="<?php echo get_template_directory_uri(); ?>/images/quote1.png" alt="" /> <p> <?php echo get_field('client_review',197);?> </p> <br/> <?php if($post->ID!=389 && $post->ID!=387 && $post->ID!=375 && $post->ID!=381 && $post->ID!=203 && $post->ID!=1566) { ?> <div class='l_colum3'> <h1><?php echo get_cat_name(22);?></h1> <ul> <?php query_posts("cat=22&post_type='post'&posts_per_page=4&paged=$paged&order=ASC"); if (have_posts()) : while (have_posts()) : the_post(); $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); /* $style=""; if($_REQUEST['ID1']==$post->ID) { $style="style='color:#FCBA0E'"; } */ ?> <li> <a <?php echo $style;?> href="<?php echo get_permalink($post->ID); ?>"><?php echo get_the_title(); ?></a> </li><br/> <?php endwhile; endif; wp_reset_query();?> </ul> </div> <?php } ?> </div> </div> </div> </div> <?php } else { ?> <div class="contentpart"> <div class="nestedlinks"> <?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } ?> </div> <div class="blog"> <div class="l_clm"> <?php if (have_posts()) : the_post(); $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?> <div class="blog_row"> <h1><?php the_title();?></h1> <div class="postedttl"> <div class="backbtn" style="margin-top: 9px;font-weight:bold;"><a href="<?php echo get_category_link(20); ?>" style="margin-left: 622px;">Back</a></div> <div class="poster" style="float: left; margin-top: -19px;">Posted by <?php the_author_posts_link(); ?> </div> <ul> <!--<li><a href="#">Values</a>/</li> <li><a href="#">Blog</a>/</li> <li><a href="#">General</a>/</li> <li><a href="#">Latest News</a></li>--> </ul> </div> <?php if($url != ""){ $url=str_replace('176.32.230.19/','',$url); ?> <a hre="<?php echo get_permalink($post->ID);?>" class="blogimg"><img src="<?php //echo Site_url();?>https://assureuk.co.uk/timthumb.php?src=<?php echo $url; ?>&w=645&h=160&q=100" alt="" /> <?php } else {?> <a hre="<?php echo get_permalink($post->ID);?>" class="blogimg"><img src="<?php //echo site_url(); ?>https://assureuk.co.uk/timthumb.php?src=<?php echo get_template_directory_uri(); ?>/images/noimg1.gif&w=150&h=168&q=90" alt="" style="margin-left: 223px;"/> <?php } ?> <div class="dater"> <?php $fulldate=get_the_date( ); $date=new DateTime($fulldate); $a=$date->format('jS F Y'); $str=explode(' ',$a); ?> <?php echo $str[0];?><br /> <?php echo $str[1];?><br /> <?php echo $str[2];?></div> </a> <div class="listing21" style="font-size: 13px;"> <p ><?php echo the_content();?></p> <div style="margin-top: 15px;" class="addthis_toolbox addthis_pill_combo_style"> <a style="float:left" class="addthis_counter addthis_pill_style"></a> <a style="float:left" class="addthis_button_tweetmeme" tm:style="compact"> </a></div> </div> </div> <?php endif;?> <?php if(function_exists('wp_paginate')) { wp_paginate(); } ?> </div> <div class="r_clm"> <div class="ttl_1"> <h1>Search</h1> </div> <div class="srchsec"> <?php get_search_form(); ?> </div> <div class="ttl_1"> <h1>Recent Posts</h1> </div> <div class="postdiv"> <ul> <?php wp_reset_query() ; query_posts("cat=20&post_type='post'&showposts=4&order=desc"); while(have_posts()):the_post(); $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); $btmbdr=""; $url=str_replace('176.32.230.19/','',$url); ?> <li> <a href="<?php echo get_permalink($post->ID);?>"> <h3><?php $a=substr($post->post_title,0,25); if(strlen($a)>20) { echo $a."...";} else { echo $a;}?></h3> <div class="imgdiv"> <?php if($url != ""){?> <a href="<?php echo get_permalink($post->ID);?>" class="blogimg"><img src="<?php //echo Site_url();?>https://assureuk.co.uk/timthumb.php?src=<?php echo $url; ?>&w=51&h=52&q=100" alt="" /> <?php } else {?> <a href="<?php echo get_permalink($post->ID);?>" class="blogimg"><img src="https://assureuk.co.uk/timthumb.php?src=<?php echo get_template_directory_uri(); ?>/images/noimg1.gif&w=51&h=52&q=90" alt="" /></a> <?php } ?> </div> </a> <div> <p style="font-style:12px;"><?php $a=substr(strip_tags($post->post_content),0,50); if(strlen($a)>10) { echo $a."...";} else { echo $a;}?></p> </div> </li> <?php endwhile;?> </ul> </div> <div class="ttl_1"> <h1>Categories</h1> </div> <div class="catdiv"> <ul> <?php $category_ids = get_all_category_ids(); foreach($category_ids as $cat_id) { $featured_query = new WP_Query('cat='.$cat_id.'&showposts=100'); if($cat_id==19) { } else if($cat_id==20) { } else if($cat_id==22) { } else { $cat_name = get_cat_name($cat_id); $postcount=0; while( $featured_query->have_posts() ) { $featured_query->the_post(); //print_r($featured_query);exit; $postcount++;} if($postcount>0) { ?> <?php if($cat_id=="1"){}else{ ?> <li><a href="<?php echo get_category_link( $cat_id ); ?>"><?php echo $cat_name." (".$postcount.")<br />"; ?></a><?php } ?></li> <?php } } } wp_reset_query(); ?> </ul> </div> </div> </div> </div> <?php } get_footer(); ?>
- The topic ‘Individual Post Not Working’ is closed to new replies.