Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Old Version fixes and change logs (http://forum.bytesforall.com/forumdisplay.php?f=37)
-   -   BUGFIX 364-05: No link to the full post shown on excerpt when post has no title (http://forum.bytesforall.com/showthread.php?t=12921)

juggledad Feb 21, 2011 03:49 PM

BUGFIX 364-05: No link to the full post shown on excerpt when post has no title
 
2 Attachment(s)
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.

Attachment 1177
Attachment 1178


All times are GMT -6. The time now is 06:52 AM.

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