What are lines 6 and 7 of homepage.php
?
Can you post Line 7, by itself, wrapped in backticks?
$default_portfolio_term = (!empty($default_portfolio) && is_object(get_term($default_portfolio, 'portfolio')) ? get_term($default_portfolio, 'portfolio')->slug : false);
I’m not sure this is valid syntax:
get_term($default_portfolio, 'portfolio')->slug
I think you need to put the object in a variable before trying to target slug, e.g.:
$term = get_term($default_portfolio, 'portfolio');
$default_portfolio_term = (!empty($default_portfolio) && is_object( $term ) ? $term->slug : false);
I would probably write it like such:
$default_portfolio = get_option( 'sc_default_portfolio' );
$term = false;
if ( ! empty( $default_portfolio ) ) {
$term = get_term( $default_portfolio, 'portfolio' );
}
$default_portfolio_term = ( is_object( $term ) ? $term->slug : false );
WOW! That definitely fix something. I don’t know how you did that without seeing the actual page. You’re amazing Chip.
Now I am not getting the error, but the formatting on the theme is all messed up. Could be that my images sizes are wrong… although I don’t see any documentation on what sizes to create.
Thank you so much Chip. God Bless.
Glad to help!
The first error was just a PHP syntax error. I’m hoping the Theme developer can help with the formatting issues; I’m probably no help on those, since I don’t know the Theme all that well.
Steve, which images are you talking about? I haven’t read all the code you posted to see if it makes reference, but you can get the image sizes for most of the included ones (eg the computer display and what goes in it) from the CSS file or using a browser such a Firefox and clicking View Page Info -> Media (sadly Safari seems not to offer this very useful facility).
I got it working… I loaded in some images and just expected them to scale automatically for the featured image. Because it didn’t work (see above), i uploaded HUGE images… When it got fixed I had huge feature images all trying to fit in the iMac slider screen thingy. Fixed it by resizing them.
Ok, sounds like you’re sorted but if you still want to have larger images displayed on the individual pages than the TV screen (but still fit perfectly), I found 600×340 somehow/somewhere (I forget!) works well.
If I’ve explained badly take a look at http://www.ents-unltd.com and click on a band name to see what I mean.
Is there a way I can change the slug from /projects/ to /product/ ?