Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Just been looking at this blog by Jeffrey Way - http://jeffrey-way.com/

I was wondering if I someone could please assist me with this particular WordPress site as I’m trying to setup my home page similar to this site, specifically, how do you create the five small square shape posts that when clicked, go to actual full post view?

What I am basically asking, is from a html/php/wordpress perspective, how do I setup one of these square cells to only display part of the whole post as I'm stumped on how to do this in WordPress 3.3.1?

If someone could please assist or perhaps point me to any tutorial sites or informational sites that demonstrate this, I would be really appreciative as I pretty much want to have say four square panels on my home page that always reference four specific pages always in my site.

As an example, one of my square panels might have two short paragraphs about a product and then have for the user a “Read More...” button, which would then take them to that product’s actual full length page. Obviously the two short paragraphs would be grabbed from the full length page’s content.

Hope this makes sense.

Any help would be much appreciated.

Thanks. T.

share|improve this question
That setup is more CSS that wordpress really...it's just content in <div>s. – m0r7if3r Mar 5 '12 at 13:31
Thanks but my query is how do I retrieve that portion of content from a page and place it in these divs together with a read more button to then view whole page content? – tonsils Mar 5 '12 at 13:49

closed as too localized by toscho Jan 2 at 22:56

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

2 Answers

In your theme, find the loop.php file, or your front-page.php or home.php files, whichever has the loop set up in it.

Where you see the_content(); you can replace it with the_excerpt();.

There are several filters that will allow you to edit the length of the excerpt, what html is filtered, and if and how a "read more" button is created, which are detailed on the_excerpt page of the Codex. That should be enough to get you started!

share|improve this answer
thanks for that. Will try it out. – tonsils Mar 5 '12 at 6:58

To display content, wordpress uses what it calls 'the loop'. There are a few ways to initiate the loop, and then a bunch of functions that you use within it, such as the_content(), the_title(), and the_excerpt() (just to name a few). The codex page on the loop does a much better job of succinctly explaining it than I could hope to with my limited writing ability, so make sure you check that out.

A good way to learn how to use the loop is to look at other loops, for example the one that you're trying to copy, the default loops in twentyten and twentyeleven, and even loops from themes which you can find in various repositories.

If you've got a solid HTML and CSS background, it should come pretty naturally to you, as the PHP used in the loop is incredibly basic and setup so that it is easy to tweak to some degree.

share|improve this answer
Thanks to you also m0r7if. Seems like the loop is the way to go. Will check it out. – tonsils Mar 6 '12 at 21:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.