Andre M

Active Member
First you need to have a plugin for slider installed. I am using MetaSlider. You create a slider, take note of the short code, you will paste it later. Open in edit mode the theme file front-page.php (public_html/wp-content/themes/davinci/). Delete the code:

<a href="<?php echo cz('tp_img_product_cat_url'); ?>"
title=""> <img src="<?php echo cz('tp_img_product'); ?>?100"
class="img-responsive" alt="">
<div <?php if ( !cz('shop_now_text') && !cz('id_video_youtube_home') ) echo 'style="display: none;"'; ?> class="topImg__content--big">
<div class="topImg__content__text">
<h1><?php echo cz('tp_img_product_text'); ?></h1>
</div>
<div <?php if ( !cz('shop_now_text') ) echo 'style="display: none;"'; ?> class="topImg__content__btn"><?php echo cz('shop_now_text'); ?></div>
<div <?php if ( !cz('id_video_youtube_home') ) echo 'style="display: none;"'; ?>
class="btn b-topImg__btn--play_video" data-toggle="modal" data-target="#prHome_video" onclick="return false;">
<i class="ico_play"></i><?php _e( 'View Video', 'ami3' ) ?></div>
</div>

Replace it with the short code of the slider.
example: <?php echo do_shortcode('[metaslider id=12657]');?>

Take note of the size of the slides that will fit the screen. You can change the width of the frame with the width of your slider, you can even remove the two smaller images in the right or you can make it one. I use GIF images in place of this, put it in the Customization. In the small image, make sure the size is correct, or else it will not show.

In editing the front-page.php code, it is wise to have a back up in case something goes wrong, especially if you are new to it. My front page look like the screenshot below.
TKS, tell me when update , i have vto do again?
 

Shahin09

New Member
You get the total width of the main and small images, that will be the width of your slides, it will remove the small images.
Hi Mar,

I received an error "Unable to communicate back with site to check for fatal errors, so the PHP change was reverted." when i added the short meta slider code.

Can you take a look and see what I did wrong?

Much Appreciated,
Shahin
 

Attachments

  • error.JPG
    error.JPG
    149 KB · Views: 15

Mar

Moderator
Hi Mar,

I received an error "Unable to communicate back with site to check for fatal errors, so the PHP change was reverted." when i added the short meta slider code.

Can you take a look and see what I did wrong?

Much Appreciated,
Shahin
Please see attached and compare to yours. Look like you edited the file in your admin editor. I haven't tried it, I always edit in cPanel so I can revert back easily if something goes wrong. Also, especially if you are not very familiar, you should have a back up of the file you are editing or at least you copy the part of the file you remove so you can put it back easily when something goes wrong. Oa9xwi.png
 
Last edited:
Top