P2 title link doesn’t reflect permalink settings
-
Whilst the ‘permalink’ link in the homepage correct links to how I’ve set my WP permalink settings (/%category%/&postname%/), the actual title itself links to a “myblog.com/?p=xxx” type thing.
I believe the offending code is in the functions.php:
function prologue_the_title($before = '<h2>', $after = '</h2>') { global $post, $looping; $t = $post->post_title; if($looping == 0) return $t; $pos = 0; if(get_option('prologue_show_titles') != 1) return false; $post->post_content = trim($post->post_content); $post->post_title = trim($post->post_title); $post->post_title = preg_replace('/\.\.\.$/','',$post->post_title); $post->post_title = str_replace("\n", ' ', $post->post_title ); $post->post_title = str_replace(' ',' ', $post->post_title); $post->post_content = str_replace("\n", ' ', strip_tags($post->post_content) ); $post->post_content = str_replace(' ',' ', $post->post_content); $post->post_content = trim($post->post_content); $post->post_title = trim($post->post_title); if( is_int( strpos($post->post_title, 'http') ) ) { $split = str_split( $post->post_content, strpos($post->post_content, 'http')); $post->post_content = $split[0]; $split2 = str_split( $post->post_title, strpos($post->post_title, 'http')); $post->post_title = $split2[0]; } $pos = @strpos( $post->post_content, $post->post_title ); // these are for debugging /* error_log('content '.$post->post_content); error_log('title '.$post->post_title); error_log($pos);*/ if( (false === $pos or $pos > 0) && $post->post_title != '') echo (is_single()) ? $before.$t.$after : $before.'<a href="'.$post->guid.'">'.$t.'</a>'.$after; }
… which is what is called for writing the title in entry.php, but I don’t have the skills to correct it.
Any help? Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘P2 title link doesn’t reflect permalink settings’ is closed to new replies.