[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! |
export your settings and attach them to a reply
|
1 Attachment(s)
Quote:
|
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, ' ...' ); ?> |
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 →', '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? |
That code is in the postformat.php virtual template. Unfortunately there doesn't seem to currently be any way to have this show conditionally.
|
Is it not possible to set some global variable inside bfa_excerpt() and then read (check) it in postformat.php after bfa_excerpt call?
|
Any thing is possible, give it a try and let us know how it works out
|
Quote:
|
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.