Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #183798

    Hi guys,
    First of all many thanks for your great themes !

    I would like to define a specific slider size for the HomePage.
    I already edit / modify function.php but the change applies to all sliders…

    Otherwise i would like to add a border and arrows to the slideshow (the big one), coule you explain to me how to do so?
    Thx in advance for your support .
    Best Regards
    Franck

    #183844

    Hi Franck,

    If you already managed to change the size of the slider, you can wrap that inside a Conditional Tag, in this case is_home(), please take a look: http://codex.wordpress.org/Function_Reference/is_home.

    if(is_home()){
    ..
    }

    That way everything inside that block will only be executed if the actual page is Home.

    Best regards,
    Josue

    #183991

    Hi Josue,
    Thanks for your help !
    I tried to add the is_home() conditional tag but without success :-(

    My code :

    if ( is_home() ) {
    $avia_config['imgSize']['featured'] 	= array('width'=>930, 'height'=>400);		// big images for fullsize pages and fullsize 2D & 3D slider  
        
    } else {
    $avia_config['imgSize']['widget'] 		= array('width'=>36,  'height'=>36 );		// small preview pics eg sidebar news
    $avia_config['imgSize']['related'] 		= array('width'=>130, 'height'=>130);		// small images for related items (also for small blog overview images)
    $avia_config['imgSize']['portfolio4'] 	= array('width'=>210, 'height'=>160);		// small preview pic for default portfolio (4 columns )
    $avia_config['imgSize']['portfolio3'] 	= array('width'=>290, 'height'=>200);		// medium preview pic for 3 column portfolio
    $avia_config['imgSize']['portfolio3_sb']= array('width'=>183, 'height'=>160);		// medium preview pic for 3 column portfolio with sidebar
    $avia_config['imgSize']['portfolio2'] 	= array('width'=>450, 'height'=>300);		// medium preview pic for 2 column portfolio and small 3d slider
    $avia_config['imgSize']['page'] 		= array('width'=>610, 'height'=>255);		// image for pages and one column portfolio
    $avia_config['imgSize']['blog'] 		= array('width'=>450, 'height'=>255);		// image for blog posts (big)
    $avia_config['imgSize']['featured'] 	= array('width'=>930, 'height'=>370);		// big images for fullsize pages and fullsize 2D & 3D slider
    $avia_config['imgSize']['fullsize'] 	= array('width'=>930, 'height'=>523);		// big images for single portfolio pages
    $avia_config['imgSize']['aviacordion'] 	= array('width'=>610, 'height'=>370);		// big Image for aviacordion    
    }
    • This reply was modified 11 months, 3 weeks ago by  FranckK.
    #184962

    Hello,
    I really need some help to implement the conditional tag in order to setup a specific slider size for my homepage…
    Could you please provide me with the code and precise me where I have to put it ?
    Thx in advance

    #186074

    Hey!

    You can’t change the thumbnail sizes with conditional tags. However you can define a new thumbnail size with

    
    $avia_config['imgSize']['featured_custom'] 	= array('width'=>930, 'height'=>400);		// big images for fullsize pages and fullsize 2D & 3D slider  
    

    and then regenerate the thumbnails. Afterwards open up wp-content\themes\corona\includes\loop-page.php and replace

    
    	$image_size = "page";
    

    with

    
    	$image_size = "page";
    if ( is_home() || is_front_page() ) $image_size = "featured_custom";
    

    Regards,
    Peter

    #186316

    Hi Dude,
    Many thanks for taking the time to respond to my request…
    1) I add your 1st code in function.php :
    ($avia_config['imgSize']['featured_custom'] = array(‘width’=>930, ‘height’=>400); // big images for fullsize pages and fullsize 2D & 3D slider
    2) I regerate thumbnails
    3) I made the modification into loop-page.php with the following code : `// check if we got posts to display:
    if (have_posts()) :

    while (have_posts()) : the_post();
    $slider = new avia_slideshow(get_the_ID());
    $image_size = “page”;
    if ( is_home() || is_front_page() ) $image_size = “featured_custom”;
    ?>`

    Unfortunately it doesn’t work :-(
    I still have the same image size the the featured image of my ‘home page’ and for my ‘about page’

    Still need some help please
    Have a nice week-end !
    Franck

    • This reply was modified 11 months, 2 weeks ago by  FranckK.
    #186416

    Hi!

    Do you use a dynamic template on the front page?

    Best regards,
    Peter

    #186444

    Hi
    Yes I use a dynamic template for the frontpage…
    BR
    Franck

    #186751

    Hi!

    Ok, then open up /wp-content/themes/corona/includes/helper-templates.php and replace

    
    		$showcaption = true;
    		$slider = new avia_slideshow($id, $showcaption);
    

    with

    
    		if ( is_home() || is_front_page() ) $image_size = "featured_custom";
    
    		$showcaption = true;
    		$slider = new avia_slideshow($id, $showcaption);
    

    Cheers!
    Peter

    #187002

    Hi Peter !
    Thank you for helping me but it doesn’t work :-(
    I’ve did everything you mentioned previously without any effect on the slide size…
    Just to avoid any misunderstanding :
    - Home page : created with dyn template , slider : fade slider , 4 pictures added as featured images , auto rotation : yes , each image link to a page
    - About page : created with dyn template , slider : fade slider , 1 picture added as featured image , auto rotation : no , no link

    Same size for these 2 pages !

    #187197

    Hi!

    Please create me an admin account and post the login credentials as private reply. I’ll look into it and check why the code doesn’t work.

    Cheers!
    Peter

    #188041
    This reply has been marked as private.
    #188291
    This reply has been marked as private.
    #188569
    This reply has been marked as private.
    #189143
    This reply has been marked as private.
    #189852
    This reply has been marked as private.
    #190853

    Hey!

    It works now – I replaced

    
    		$this->img_size		= "featured";
    

    with

    
    		$this->img_size		= "featured";
    		if(is_home() || is_front_page()) $this->img_size = "featured_custom";
    

    in includes/helper-slideshow.php.
    Best regards,
    Peter

    #191168

    Hey Dude !
    Thank you so much ! You are awesome !
    Best Regards
    Franck

Viewing 18 posts - 1 through 18 (of 18 total)

The topic ‘Slider : Specific size for homepage’ is closed to new replies.