Home Support Advanced post slider Adding full align support – left, center, right

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #546
    elm
    Participant

    this is solution to let slideshow support horizontal align not just center as of version 2.3.0.
    you have to modify 4 files in plugin. first go to the template directory.
    in the all 3 temlate files in ‘template’ directory find this code:

    <th scope="row">Center whole slideshow</th>
                    <td><select name="advps_centering">
                    	<option value="no" <?php if(isset($container['advps_centering']) && $container['advps_centering'] == 'no'){echo 'selected="selected"';}?>>No</option>
                        <option value="yes" <?php if(isset($container['advps_centering']) && $container['advps_centering'] == 'yes'){echo 'selected="selected"';}?>>Yes</option>
                      </select></td>

    and replace with:

    <th scope="row">Align whole slideshow</th>
                    <td><select name="advps_centering">
                    	<option value="left" <?php if(isset($container['advps_centering']) && $container['advps_centering'] == 'left'){echo 'selected="selected"';}?>>Left</option>
                        <option value="center" <?php if(isset($container['advps_centering']) && $container['advps_centering'] == 'center'){echo 'selected="selected"';}?>>Center</option>
    					<option value="right" <?php if(isset($container['advps_centering']) && $container['advps_centering'] == 'right'){echo 'selected="selected"';}?>>Right</option>
                      </select></td>

    in all 3 templates.

    next in file ‘advanced-post-slider.php’ find this code:

    <div id="advps_container<?php echo $sldshowID;?>" class="advps-slide-container" style="overflow:hidden;max-width:<?php echo $container['advps_sld_width'];?>px;<?php if(isset($container['advps_centering']) && $container['advps_centering'] == 'yes'){echo 'margin:auto;';}?>">

    and replace with:

    <div id="advps_container<?php echo $sldshowID;?>" class="advps-slide-container" style="overflow:hidden;max-width:<?php echo $container['advps_sld_width'];?>px;<?php if(isset($container['advps_centering']) && $container['advps_centering'] == 'center'){echo 'margin:auto;';} else if (isset($container['advps_centering']) && $container['advps_centering'] == 'right') {echo 'margin:0 0 0 auto;';}?>">

    save modified files.
    go to the slider options and now you see align options: left, center and right available.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.