Osclass Support Forums - Rackons.in
Other Osclass Support => Other Questions Related to Osclass => Topic started by: Lucasdelton on September 19, 2018, 05:21:00 AM
-
how to add whatsapp share on the whole site?
My website: www.classmega.com
-
Hello @Lucasdelton
Please below steps then you can use whatsapp share option for whole site.
Step 1) Open oc-content/themes/CURRENT_THEME/footer.php
<?php
if(osc_is_ad_page()) {
$rac_url = osc_item_url();
$rac_title = osc_item_title();
} else {
$rac_url = osc_base_url();
$rac_title = meta_title();
}
?>
Step 2 : put this code with above code.
<a style="#25D366" href="whatsapp://send?text=<?php echo $rac_url; ?>" data-action="share/whatsapp/share"><i class="fa fa-whatsapp"></i></a>
Then check your website and above both code should put after <div id="footer">
.
-
whatsapp appears but a small icon in the corner.
it does not appear along with the other sharing networks
-
So you want your whatsapp icon fixed in sidebar ?
-
If you want fixed whatsapp icon in sidebar so use below code :
Step 1 : ut below code in footer.php
<div class="fsi">
<ul><li>
<?php
if(osc_is_ad_page()) {
$rac_url = osc_item_url();
$rac_title = osc_item_title();
} else {
$rac_url = osc_base_url();
$rac_title = meta_title();
}
?>
<a style="#25D366" href="whatsapp://send?text=<?php echo $rac_url; ?>" data-action="share/whatsapp/share"><i class="fa fa-whatsapp"></i></a>
</li>
</ul>
</div>
Step 2 : Open your style.css and put below code in style.css
.fsi ul {
font-family: "Quicksand", sans-serif;
font-size: 1em;
line-height: 1.6;
font-weight: 600;
margin-left: -30px;
list-style: none;
position: absolute;
top: 50%;
left: 0%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
}
.fsi ul li a {
display: block;
margin-left: -2px;
height: 60px;
width: 60px;
border-radius: 0 25px 25px 0;
border: 2px solid #000;
background: #FFF;
margin-bottom: 1em;
-webkit-transition: all .4s ease;
transition: all .4s ease;
color: #2980b9;
text-decoration: none;
line-height: 60px;
position: relative;
}
.fsi ul li a:hover {
cursor: pointer;
width: 180px;
color: #fff;
}
-
I want whatsapp to appear along with the other partner networks as it appears on the item page in the mobile version
-
I want whatsapp to appear along with the other partner networks as it appears on the item page in the mobile version
So your other social icons display in mobile only with whatsapp. and you tell us for desktop and mobile for both. so other social media is not display in desktop mode.
So where we will use your whatsapp with other social network. Please provide screenshot for that. then we will understand better.
-
I want it to appear this way only for mobile version
-
<?php if(osc_is_ad_page()) { ?>
<span class="whatsapp"><a href="whatsapp://send?text=<?php echo $share_url; ?>" data-action="share/whatsapp/share"><i class="fa fa-whatsapp"></i></a></span>
<?php } ?>
search above code in footer.php and replace with our below code.
<?php
if(osc_is_ad_page()) {
$rac_url = osc_item_url();
$rac_title = osc_item_title();
} else {
$rac_url = osc_base_url();
$rac_title = meta_title();
}
?>https://forums.rackons.in/Themes/default/images/bbc/code.gif
<span class="whatsapp"><a href="whatsapp://send?text=<?php echo $rac_url; ?>" data-action="share/whatsapp/share"><i class="fa fa-whatsapp"></i></a></span>
-
ALREADY, THANK YOU VERY MUCH