• On my theme settings( Omega) I have an option to chose one of the defined featured images for my articles( thumbnail, medium …etc). So I chose thumbnail and in WordPress settings made it 150×150. Since I want to make use of all the screen width on 480px screens( I know they are loosing ground but I want it), 100% width in CSS just scales 150px to 480px and looks pixelated as hell.
    So my problem is as follows and I’m sorry if it sounds too noobish:

    Tried this instead( to have an If and an Else) to make use of jquery and modified my piece of code:

    if ( is_home() || is_archive() || is_search() ) {
    		if(omega_get_setting( 'content_archive_thumbnail' )) {
    			get_the_image( array( 'meta_key' => 'Thumbnail', 'default_size' => omega_get_setting( 'image_size' ) ) );
    		}
    ...etc}

    to look like this:

    if ( is_home() || is_archive() || is_search() ) {
      if ($(window).width() < 480){
    		if(omega_get_setting( 'content_archive_thumbnail' )) {
    			get_the_image( array( 'meta_key' => 'Thumbnail', 'default_size' => omega_get_setting( 'image_size' ) ) );
    		} else {
    			if(omega_get_setting( 'content_archive_thumbnail' )) {
    			get_the_image( array( 'meta_key' => 'Thumbnail', 'default_size' => omega_get_setting( 'image_size' ) ) );
    		}
    ...etc}

    but I don’t know If they are too many If’s or I’ve misssed something because I get:
    Parse error: syntax error, unexpected ‘(‘, expecting T_VARIABLE or ‘$’

    on this line: if ( $(window).width() < 480){

    It may be a bummer I don’t know to fix that kind of things but there is always time for learning.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Another featured image under 480px : Parse error: syntax error’ is closed to new replies.