Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   [SOLVED] How to control readmore link visibiltiy (http://forum.bytesforall.com/showthread.php?t=18897)

arteny Nov 13, 2012 05:24 AM

[SOLVED] How to control readmore link visibiltiy
 
Front page contains readmore link in footer for each post on front page.
But I don't want to see such link if post is fully displayed here already.
How can I hide readmore link in case when post doesn't contain <more> link?
Thanks for help!

juggledad Nov 13, 2012 06:08 AM

export your settings and attach them to a reply

arteny Nov 13, 2012 11:40 AM

1 Attachment(s)
Quote:

Originally Posted by juggledad (Post 92559)
export your settings and attach them to a reply

juggledad, they are here

juggledad Nov 13, 2012 02:18 PM

by default the theme displays the posts as excerpts. If you don't want this you have to modify the postformat.php virtual template to change the line
HTML Code:

                <?php bfa_excerpt( 55, ' ...' ); ?>
to use the_content() instead - you can check the php you can use by pressing the 'Limited PHP code' tab at teh top right of the screen

arteny Nov 14, 2012 05:24 AM

juggledad, i feel there is a some misunderstanding according my question.
as for bfa_excerpt - i am using it's own realization here (which uses get_the_content() in turn).
The question is about following part in post-footer (below bfa_excerpt):

<a class="post-readmore" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php _e( 'read more &rarr;', 'montezuma' ); ?></a>

I don't want to show this link at all (it is default link "read more ->" shown for each post) in case when whole post already included in shown post text - it happens when post is enough short in itself.
So, what I need here - is to add condition to check is post content in itself contains 'more' link or not. If not, don't show post-readmore link. The problem is that I don't know how to get post content here to add it into a condition (something like $post->post_content?).
Anybody help please?

juggledad Nov 14, 2012 11:13 AM

That code is in the postformat.php virtual template. Unfortunately there doesn't seem to currently be any way to have this show conditionally.

arteny Nov 14, 2012 03:24 PM

Is it not possible to set some global variable inside bfa_excerpt() and then read (check) it in postformat.php after bfa_excerpt call?

juggledad Nov 14, 2012 05:40 PM

Any thing is possible, give it a try and let us know how it works out

arteny Dec 27, 2012 01:39 PM

Quote:

Originally Posted by juggledad (Post 92595)
That code is in the postformat.php virtual template. Unfortunately there doesn't seem to currently be any way to have this show conditionally.

But how user can recognize is article cut or not really (when read more if always visible)?

arteny Jan 26, 2013 03:11 AM

Actually second parameter of bfa_excerpt says when there is a continuation. Just I used own realization of bfa_excerpt (don't like break formatting) and wanted to recognize it from virtual template (without success). But content() function which i am using in my realization also has a parameter "read more", I missed it before. I can live which such solution.
So, I'll solve the thread.


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

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