Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6191141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:42:45+00:00 2026-05-24T02:42:45+00:00

currently my wordpress theme shows all the words in a post on the homepage,

  • 0

currently my wordpress theme shows all the words in a post on the homepage, even of very long posts. I would like to limit that to a reasonable number lets say 1500 words max to be shown on the home page, then there should be a “read more” link underneath.
Im using the toolbox theme heres the 1. content.php and 2 index.php.

1. https://i.stack.imgur.com/rUWZv.png 
2. https://i.stack.imgur.com/YrZGS.png 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:42:45+00:00Added an answer on May 24, 2026 at 2:42 am

    You could use the ‘insert more tag’ in the wordpress WYSIWYG.

    Otherwise you could use something like this to limit the word count:

    //define the number of words
    $length = 1500;
    $text = "Lorem Ipsum dolar sit amet etc etc"; //this would contain the article you are pulling from the database and syntax will depend largely on your theme.
    
    $shortened = implode(' ',array_slice(str_word_count($text,1),0,$length));
    
    echo $shortened . ' ...';
    

    (Take this as pseudocode for now as I dont have time to test it.)

    Then link to the article:

    <a href="<?php the_permalink(); ?>">read more</a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently developing a site using the WordPress Twenty Eleven theme and I would
What are the best resources for Wordpress theme-development? I am currently in the phase
I am currently editing a WordPress plugin, which allows you to filter posts by
I've currently set Wordpress to only show the latest 5 posts in the blog
I'm currently studying WordPress and want to create a custom Post Type and have
I just got this wordpress theme: http://meezio.pixelworkshop.fr/ Very nice, the problem is that since
I bought a non-wordpress theme that I'm currently adapting to wordpress. The only problem
I am currently working on a wordpress theme and I have a little problem
I loaded wordpress page titles in top of my theme using get_pages() function like
I'm currently using JCarousel to highlight featured posts in Wordpress. The carousel displays above

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.