WordPress.org

Ready to get started?Download WordPress

Forums

Showcase
I think that I may be doing something wrong. (12 posts)

  1. steveostudios
    Member
    Posted 3 years ago #

    I'm using the Showcase theme by MidPhase and I am getting the following error:

    Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /homepages/17/d168210526/htdocs/wordpress/wp-content/themes/showcase/homepage.php on line 7

    .

    First I added a new page (Title: "homepage", body: "test", clicked the "homepage" template in the Page Attributes.

    I added a portfolio category, then a few projects. Then I went to the Reading settings and changed it to Static page with the homepage as the first page.

    Now I just get the error listed above... Can anyone tell me what I am doing wrong?

    http://wordpress.org/extend/themes/showcase/

  2. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    What are lines 6 and 7 of homepage.php?

  3. steveostudios
    Member
    Posted 3 years ago #

    $default_portfolio = get_option('sc_default_portfolio');
    $default_portfolio_term = (!empty($default_portfolio) && is_object(get_term($default_portfolio, 'portfolio')) ? get_term($default_portfolio, 'portfolio')->slug : false);

  4. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    Can you post Line 7, by itself, wrapped in backticks?

  5. steveostudios
    Member
    Posted 3 years ago #

    $default_portfolio_term = (!empty($default_portfolio) && is_object(get_term($default_portfolio, 'portfolio')) ? get_term($default_portfolio, 'portfolio')->slug : false);

  6. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    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 );
  7. steveostudios
    Member
    Posted 3 years ago #

    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.

  8. Chip Bennett
    Theme Review Admin
    Posted 3 years ago #

    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.

  9. srjp
    Member
    Posted 3 years ago #

    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).

  10. steveostudios
    Member
    Posted 3 years ago #

    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.

  11. srjp
    Member
    Posted 3 years ago #

    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 600x340 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.

  12. lwzeadie
    Member
    Posted 3 years ago #

    Is there a way I can change the slug from /projects/ to /product/ ?

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags