Paul,
First, I apologize for the delay in getting to this ticket. I am right in the middle of midterms and EVERYTHING has been crazy.
Here's what I've done to try and fix this issue:
1.) functions.php
- I cleaned up some of the code formatting to make it more readable and to bring it inline with WP coding standards. I also consolidated and renamed some of the functions to decrease the chances of naming conflicts.
2.) profile-content.php
- I cleaned up and reorganized the html tags and structure. There were a few unclosed and unused tags.
3.) single-profile.php
- Pretty much the same thing as number 2
4.) style.css
- I added some custom styles to improve the layout of both student and alumni pages.
In addition to the cleanup and refactoring of the HTML and PHP, I've also beefed up the displaying of profile images. The code now checks to see if there is a Featured Image (what you call a Profile Picture) and displays that by default. If there is no profile picture it attempts to retrieve a Gravatar using the "Email" value from the "Basic Profile" metabox. The benefit of this is that if there is no profile picture or email address then a default Gravatar will be displayed. This way there is always some form of image to keep styling and layout consistent.
Furthermore, I've added a new Page Template named profile-page.php
. This template is almost exactly the same as the parent's page.php
except it removes all the commenting and author info boxes. It can be enabled on the live site by going to Pages->All Pages in the admin and editing both the Alumni Profiles and Student Profiles pages. On the edit screen for each page is the Page Attributes metabox, just choose "Profiles" from the Template dropdown list and you'll be good to go. Let me know if you have trouble with this.
I believe the 404 issue we're experiencing stems from the HTML and PHP errors I've tried to correct in single-profile.php
and profile-content.php
. I think WP tried to render those templates and when it couldn't, it fell back to the 404 error template in the parent. Hopefully my edits will correct this problem, but we won't know until it's up on production. Boone will be releasing 1.4.8 later tonight so you'll be able to test very soon.
Boone, Matt,
I tried to separate my commits a little so there isn't a single blob of a commit full of red and green lines:
added specific styles for alumni and student profile pages.
single-profile.php html structure cleanup and reorganization.
profile-content.php html structure cleanup and reorganization.
functions.php code cleanup and restructuring.
added profile page template.
I'm moving this issue to 1.4.9 just incase there are any more conflicts or tweaks that need to be addressed. This gives us (and Paul) all the way until Nov 1st (1.4.9 release) to make sure everything is good to go.
Paul, as always, just let me know if you run into problems and we'll get them all worked out. I've also attached 2 screenshots showing what my local env looks like with the new page template and custom styles.