Link to home
Start Free TrialLog in
Avatar of designrox
designrox

asked on

Need help with php (I think) in my wordpress custom themed site. Please help!

Ok so in a nutshell, we purchased this theme: http://www.templatemonster.com/demo/39178.html but the home page images were linking to posts and not pages like we wanted them to. And it was pulling the images from the portfolio posts through a customized post cycle widget. So every time a new portfolio page was added, the links would change.

So I posted on experts-exchange and one of the experts told me to make a custom post type and mentioned something about changing the loop for it to work. So I went into the theme-init.php and added a custom post type named homeposts. Then I made 8 posts and set the featured image and published them. Then I went into the style.css file and duplicated the portfolio styles that were called in the widget and created new identical styles but renamed them with homeposts instead of porfolio. Then lastly I went into the my-post-cycle-widget.php file and duplicated the porfolio section of the widget and named it homeposts and changed any corresponding portfolio css calls to homepost css stuff. My thinking was that if I just duplicate the settings in both the style.css and my-post-cyce-widget.php files for the portfolio then I can use the new homeposts in exactly the same way. So after I uploaded these new files to wordpress everything was working fine. My home images were now linking to pages like I wanted. Without the custom thumbs the images are exactly the same size and line up in a row. So I went in and added the custom thumbs so I could get the same look as the demo and it doesn't look the same as the demo. I must have missed something. Somewhere. I hope I explained this correctly. I have attached the my-post-cycle-wiget.php file and the style.css file and the theme-init.php file in case anyone needs to look at it. The top row of images is the same as the demo but the bottom row isn't.

Here is the link to the demo again:
http://www.templatemonster.com/demo/39178.html

And here is the site I am working on:
http://www.g3creative.com/g3wp55/
Avatar of designrox
designrox

ASKER

I tried attaching the files but kept receiving an error. I will try again. But hopefully someone can look at this and help me out? Please help!
Avatar of DrDamnit
Try attaching dropping the files in drop box if you can't attach using the file upload.
I was able to attach the files I edited below.
style.css
theme-init.php
my-post-cycle-widget.php
There is problems with your CSS.  Your homeposts_item DIV's need to have the correct inline style ("position: absolute; top: 240px; left: 0px;").  The 'top' and 'left' vary depending on the position of the thumbnail.
I see what you are saying but I duplicated the styles for the folio.cycle and just renamed it to homeposts so shouldn't it have worked the exact same way? I did that for all of the folio things on the style sheet and the widget php file and the init file. Also, when the featured image is not defined, the thumbnails all line up correctly so I am still confused as to why it doesn't work correctly.
Can you post the original my-post-cycle-widget.php?

The page on template monster has an inline style and another class (masonry-brick) for the thumbnail DIV's that are not on your page.

Template Monsters:
<div class="folio_item masonry-brick" style="position: absolute; top: 0px; left: 0px;">

Yours:
<div class="homeposts_item">
Sure! Good idea! I have attached all 3 original files here.
style.css
theme-init.php
my-post-cycle-widget.php
ASKER CERTIFIED SOLUTION
Avatar of CtrlAltDl
CtrlAltDl
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
THAT WAS THE LAST STEP!!!!!!!! THANK YOU SOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
MUCH! I WISH I COULD GIVE YOU A MILLION POINTS!
I really appreciate the time it took for you to look through my code and help me out. You are a lifesaver!