Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if (has_post_format('link')): ?>
- <?php
- $content = get_the_content();
- $linktoend = stristr($content, "http" );
- $afterlink = stristr($linktoend, ">");
- if ( ! strlen( $afterlink ) == 0 ):
- $linkurl = substr($linktoend, 0, -(strlen($afterlink) + 1));
- else:
- $linkurl = $linktoend;
- endif;
- ?>
- <a href="<?php echo $linkurl; ?>"><?php the_title(); ?></a>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement