Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » New Versions, & Updating » Old Version fixes and change logs »

BUGFIX 364-05: No link to the full post shown on excerpt when post has no title


  #1  
Old Feb 21, 2011, 04:49 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
If you set the 'Custom read more' to have a link to the full post, but you are also using the 'Use Post / Page Option' and have a blank post title, then no permalink will show if you are displaying excerpts.

In addition, you will see the word 'Permalink' displayed in place of the blank title.

This fix corrects the code by removing the word 'permalink' from the post title. It also adds the word 'Permalink' to the 'custom read more' if you are using '%title%' in it's configuration.

edit functions.php and change line 285 (version 3.6.4) from
HTML Code:
		$custom_read_more = str_replace('%title%', the_title('','',FALSE), $custom_read_more);
to
HTML Code:
		if ( get_the_title() == '' ) { 
				$custom_read_more = str_replace('%title%', 'Permalink', $custom_read_more);
		} else {		
			$custom_read_more = str_replace('%title%', the_title('','',FALSE), $custom_read_more);
		}
edit bfa_post_parts.php and change lines 42-47 (version 3.6.4) from
HTML Code:
	// Since 3.6.1: Display a link to the full post if there is no post title and the post is too short
	// for a read more link.
	if ( get_the_title() == '' ) { ?>
		<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link">Permalink</a><?php 
		
	} else if ( (!is_single() AND !is_page()) OR $bfa_ata_display_body_title == '' ) {
to
HTML Code:
	if ( (!is_single() AND !is_page()) OR $bfa_ata_display_body_title == '' ) {
or you can download and unzip the attached files and upload them to your host.
Put 'functions.php' in the 'atahualpa' folder replacing the original.
Put 'bfa_post_parts.php' in the 'atahualpa/functions' folder replacing the original.

functions.php.zip
bfa_post_parts.php.zip
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
BUGFIX 364-04: Tagline will show when Overlay Blog TITLE over Header Image(s)? = yes juggledad Old Version fixes and change logs 0 Feb 19, 2011 06:09 PM
BUGFIX 364-01: “Title tags in Category Menu Bar” fails to remove muti-line title juggledad Old Version fixes and change logs 2 Feb 10, 2011 04:47 PM
post title without an excerpt street_spirit Page & Category Menu Bars 1 Dec 3, 2010 10:53 AM
Post Title is truncated and will not display full post title ruddcl Center area post/pages 1 Mar 9, 2010 05:54 AM
Full Post instead of Excerpt after posting a comment? adum Excerpts, Read more, Pagination 4 Jul 11, 2009 04:19 PM


All times are GMT -6. The time now is 11:34 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.