Tagged Questions
0
votes
1answer
44 views
How to hide <pre> and <table> content from auto-generated excerpts?
Auto-generated excerpts just take the first x characters from the post content and cut that off at a certain point.
When there is a table or pre element in that part, the excerpt looks rather useless ...
0
votes
2answers
85 views
Replace full content with an excerpt
My theme shows full posts on the main page and I want it to show only the summary, I tried searching for the_content tag in my theme's index.php file but it is not even there!
I don't have a home.php ...
2
votes
2answers
997 views
limit the words in the post content and add read more link
As you can see into the code, the routine is to display the post which has an id of 266. Now all I want is to limit the words displayed in the post content of that post. Let's say, I want to limit the ...
0
votes
1answer
154 views
get_the_excerpt() not returning anything when post has no excerpt
When trying to call get_the_excerpt() the page does not return anything on posts that have no excerpt.
I thought WordPress usually 'fake' it and create one using the first x characters from ...
0
votes
3answers
737 views
Modify 'Read more' link adding a new class
I want to add a class to the 'Read more' link. Actually I have this:
<?php the_content( 'Read more...' ); ?>
Which outputs:
<a href="...?p=14#more-14" class="more-link">Read ...
1
vote
1answer
1k views
How to correctly limit the content and strip HTML?
I have been using this code for a long time :
$temp_arr_content = explode(
" ",
substr(
strip_tags(
get_the_content()
),
0,
720
)
);
...