Hyperlinking in PHP [Need Help]

0 replies
Hi. On my WordPress site I want to link the theme_excerpt text " more..." to my post by using the function name "the_permalink".

Here is the theme_excerpt code that's in my theme's functions.php

function theme_excerpt(=5) {
= get_permalink();
= ;
= explode(' ', strip_tags(get_the_excerpt()), );
if (count()>=) {
array_pop();
= implode(" ",).' more...';
} else {
= implode(" ",);
}
= apply_filters('the_content', );
= preg_replace('`[[^]]*]`','',);
echo '<p>'..'</p>';
}
How can I hyperlink " more..." to my post by using the function name "the_permalink"?

Here is an example of the function name used in the index.php:

<a href="<?php the_permalink();?>"><?php the_title();?></a>
Thanks,

Jimmy
#hyperlinking #php

Trending Topics