|
18-05-2008, 16:32 | #1 | |
Moonshine
Join Date: Sep 2007
Location: Southampton
Posts: 3,201
|
Wordpress/PHP Help - Grid/Catalogue/Sitemap
What I basically want to achieve is a page that shows all the posts on the site, in a grid preferably, with just a title and maybe a picture.
So far, this seems like the best sounding solution but I can't for the life of me make it work, probably because I don't understand PHP in the slightest. I get as far as; Quote:
So, thinking logically I made a page called category.php and pasted that code into it but that doesn't really work. It just shows a grid on it's own, away from the actual site. So i'm guessing I either need other code in that category.php page or I need to put that code elsewhere... Anyone reckon they might be able to help or know of an easier way to achieve what I want?
__________________
|
|
18-05-2008, 17:09 | #2 |
Screaming Orgasm
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
|
Given the age of that post I'd guess those instructions are for a specific version of Wordpress - one that is old, and that you don't have.
Do you have a page that is equivalent to the one they're suggesting modifying? If so, it shouldn't be too hard to work out which .php file that page is produced by and modify it (backup first - if one detail is wrong for your version then chances are other details are wrong too). |
18-05-2008, 17:44 | #3 |
Moonshine
Join Date: Sep 2007
Location: Southampton
Posts: 3,201
|
I currently have:
archive.php comments.php footer.php functions.php header.php index.php searchform.php sidebar.php single.php
__________________
|
18-05-2008, 19:49 | #4 |
Screaming Orgasm
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
|
Looks like a pretty basic style - no candidates there I'd expect. Best I can suggest as a non-Wordpress user is to copy one of the existing pages and replace it's content with what you want. Not ideal. I'm sure someone with Wordpress experience could do better.
|
18-05-2008, 23:35 | #5 |
Moonshine
Join Date: Sep 2007
Location: Southampton
Posts: 3,201
|
Right, sorted the grid bit now.
Next issue. How can I limit the length of a string PHP is calling? Code:
<?php the_content('Read the rest of this entry »'); ?> I found some stuff about $limit but I can't get my head round the examples on sites as they seem to be using it differently.
__________________
|
19-05-2008, 00:20 | #6 |
Screaming Orgasm
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
|
Since I can't see the code, I can't answer that, but here's somewhere to start...
http://uk.php.net/substr |
19-05-2008, 00:34 | #7 |
Moonshine
Join Date: Sep 2007
Location: Southampton
Posts: 3,201
|
Code:
<!--content text --> <div class="content_text"> <?php the_content('Read the rest of this entry »'); ?> <br /> <br /> <div class="clear"></div> </div> <!--content text end-->
__________________
|
19-05-2008, 00:47 | #8 |
Screaming Orgasm
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
|
Nope - the relevant bit seems to be in a function hidden away somewhere else in Wordpress. See if you can find out what 'the_content' does (it looks like a function).
|
19-05-2008, 01:52 | #9 |
Moonshine
Join Date: Sep 2007
Location: Southampton
Posts: 3,201
|
__________________
|
Thread Tools | |
Display Modes | |
|
|