Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How Do I Do This?


chrishajer
Participant

@chrishajer

I’m not sure which version of front-page.php you’re using (couldn’t make my site look like yours using the last front-page.php code that was posted) but I THINK all you need to do is change the line that looks like this:

<table id="forumlist">

to this:

<table id="forumlist-<?php forum_id(); ?>">

That just adds a dash and the forum number to the table id. That should validate. But I think that will affect the CSS in a bad way. There will no longer be an id of “forumlist”, they’ll all be “forumlist-something” which the CSS will have trouble with.

Maybe it would be better to do something like this:

<table class="forumlist" id="forumlist-<?php forum_id(); ?>">

Then you would need to change your style.css to make any references to #forumlist look like .forumlist (change from applying the forumlist styling to ids and make it apply to classes.)

That’s a lot of work, but ids are supposed to be unique on a page, where classes are not. This is actually a better application of a class since all the tables should look the same and use the same styling. You’re not referencing them with javascript or something where the ids matter.

I just tried this and it worked on mine and validated properly. There were 6 instances of #forumlist that needed to be changed to .forumlist in my style.css

Hopefully that will work for you.

Skip to toolbar