Monday, December 31, 2018
Sunday, December 30, 2018
Saturday, December 29, 2018
Facebook comment
In single.php
<div class="fb-comments" data-href="<?php the_permalink(); ?>" data-numposts="10" data-colorscheme="light" data-width="100%"></div>
IN header.php
javascript SDK
<body <?php body_class(); ?> >
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-comments" data-href="<?php the_permalink(); ?>" data-numposts="10" data-colorscheme="light" data-width="100%"></div>
IN header.php
javascript SDK
<body <?php body_class(); ?> >
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
How To Autoplay Youtube Videos On Wordpress Website 2016
https://www.youtube.com/watch?v=yYQ7fCaRqh8
Friday, December 28, 2018
Alignments+WPcf7+entry-title css
.page-title .entry-title .entry-header{
margin-top:20px;
}
.contact-information, .contact-form {
background: #fbf8f8cc !important;
padding: 20px !important;
}
.contact-information, .contact-form {
background: #fbf8f8cc !important;
padding: 20px !important;
}
.wpcf7-form input[type="text"] {
border: 1px solid #d7d7d7;
padding-left: 8px;
width: 100%;
}
.wpcf7-form input[type="email"] {
border: 1px solid #d7d7d7;
padding-left: 8px;
width: 100%;
}
.wpcf7-form input[type="tel"] {
border: 1px solid #d7d7d7;
padding-left: 8px;
width: 100%;
}
.wpcf7-form textarea {
border: 1px solid #d7d7d7;
padding-left: 8px;
width: 100%;
}
.wpcf7 label{
display:block;
}
.entry-title, .area-title {
position: relative;
border-bottom: 1px solid #ccc;
padding-bottom: 8px;
}
.entry-title::before, .area-title::before {
content: "";
position: absolute;
left: 0;
bottom: -1px;
height: 1px;
width: 160px;
background: #fb5e1c;
}
.page-title::before, .area-title::before {
content: "";
position: absolute;
left: 0;
bottom: -1px;
height: 1px;
width: 300px;
background: #fb5e1c;
}
/*--------------------------------------------------------------
# Alignments
--------------------------------------------------------------*/
.alignleft {
display: inline;
float: left;
margin-right: 1.5em;
}
.alignright {
display: inline;
float: right;
margin-left: 1.5em;
}
.aligncenter {
clear: both;
display: block;
margin-left: auto;
margin-right: auto;
}
margin-top:20px;
}
.contact-information, .contact-form {
background: #fbf8f8cc !important;
padding: 20px !important;
}
.contact-information, .contact-form {
background: #fbf8f8cc !important;
padding: 20px !important;
}
.wpcf7-form input[type="text"] {
border: 1px solid #d7d7d7;
padding-left: 8px;
width: 100%;
}
.wpcf7-form input[type="email"] {
border: 1px solid #d7d7d7;
padding-left: 8px;
width: 100%;
}
.wpcf7-form input[type="tel"] {
border: 1px solid #d7d7d7;
padding-left: 8px;
width: 100%;
}
.wpcf7-form textarea {
border: 1px solid #d7d7d7;
padding-left: 8px;
width: 100%;
}
.wpcf7 label{
display:block;
}
.entry-title, .area-title {
position: relative;
border-bottom: 1px solid #ccc;
padding-bottom: 8px;
}
.entry-title::before, .area-title::before {
content: "";
position: absolute;
left: 0;
bottom: -1px;
height: 1px;
width: 160px;
background: #fb5e1c;
}
.page-title::before, .area-title::before {
content: "";
position: absolute;
left: 0;
bottom: -1px;
height: 1px;
width: 300px;
background: #fb5e1c;
}
/*--------------------------------------------------------------
# Alignments
--------------------------------------------------------------*/
.alignleft {
display: inline;
float: left;
margin-right: 1.5em;
}
.alignright {
display: inline;
float: right;
margin-left: 1.5em;
}
.aligncenter {
clear: both;
display: block;
margin-left: auto;
margin-right: auto;
}
Thursday, December 27, 2018
// Make sure that all term links include their parents in the permalinks
add_filter( 'term_link', 'add_term_parents_to_permalinks', 10, 2 );
function add_term_parents_to_permalinks( $permalink, $term ) {
$term_parents = get_term_parents( $term );
foreach ( $term_parents as $term_parent )
$permlink = str_replace( $term->slug, $term_parent->slug . ',' . $term->slug, $permalink );
return $permlink;
}
Sunday, December 9, 2018
Saturday, December 8, 2018
wpautotop to show all editor function and excerpt function
In funcction.php
function news_excerpt($full_text, $letter_count = 50){
$full_text = trim($full_text);
$full_text = strip_tags($full_text);
$full_text = strip_shortcodes($full_text);
$full_text = mb_substr($full_text, 0, $letter_count);
$full_text = $full_text."...";
return $full_text;
}
function news_excerpt($full_text, $letter_count = 50){
$full_text = trim($full_text);
$full_text = strip_tags($full_text);
$full_text = strip_shortcodes($full_text);
$full_text = mb_substr($full_text, 0, $letter_count);
$full_text = $full_text."...";
return $full_text;
}
In html
<p><?php $content = news_excerpt(get_the_content(),800);
echo wpautop( $content );?></p>
<p><?php $content = news_excerpt(get_the_content(),800);
echo wpautop( $content );?></p>
Javascript to Add smooth scrolling to all links
<!--<script>-->
<!--$(document).ready(function(){-->
// Add smooth scrolling to all links
<!-- $(".nav-tabs a").on('click', function(event) {-->
// Make sure this.hash has a value before overriding default behavior
<!-- if (this.hash !== "") {-->
// Prevent default anchor click behavior
<!-- event.preventDefault();-->
// Store hash
<!-- var hash = this.hash;-->
// Using jQuery's animate() method to add smooth page scroll
// The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
<!-- $('html, body').animate({-->
<!-- scrollTop: $(hash).offset().top-->
<!-- }, 2000, function(){-->
// Add hash (#) to URL when done scrolling (default click behavior)
<!-- window.location.hash = hash;-->
<!-- });-->
} // End if
<!-- });-->
<!--});-->
<!--</script>-->
<!--$(document).ready(function(){-->
// Add smooth scrolling to all links
<!-- $(".nav-tabs a").on('click', function(event) {-->
// Make sure this.hash has a value before overriding default behavior
<!-- if (this.hash !== "") {-->
// Prevent default anchor click behavior
<!-- event.preventDefault();-->
// Store hash
<!-- var hash = this.hash;-->
// Using jQuery's animate() method to add smooth page scroll
// The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
<!-- $('html, body').animate({-->
<!-- scrollTop: $(hash).offset().top-->
<!-- }, 2000, function(){-->
// Add hash (#) to URL when done scrolling (default click behavior)
<!-- window.location.hash = hash;-->
<!-- });-->
} // End if
<!-- });-->
<!--});-->
<!--</script>-->
Wednesday, December 5, 2018
Facebook instant articles
https://blog.markgrowth.com/facebook-instant-articles-can-you-really-make-money-using-these-ee88518332ed
on click increment javascripot
<?php get_header(); ?>
<script type="text/javascript">
function burgersub(){
if(document.getElementById("burg").value - 1 < 0)
return;
else
document.getElementById("burg").value--;
}
function burgeradd(){
var quantity = document.getElementById("quantity").value++;
quantity++;
var price = document.getElementById("price").value;
alert(quantity);
if (price) {
document.getElementById("burg").value = price * quantity;
}
}
</script>
<p><button class="btn btn-default" onclick="burgeradd()">+</button><button class="btn btn-default" onclick="burgersub()">-</button></p>
<input readonly="yes" class="form-control" id="quantity" placeholder="Quantity">
<input readonly="yes" class="form-control" id="burg" placeholder="Amount">
<input class="form-control" id="price" placeholder="Price">
<?php get_footer(); ?>
Subscribe to:
Posts (Atom)
Featured Post
Make money online
https://www.wpbeginner.com/beginners-guide/make-money-online/?fbclid=IwAR0_9_5aHmbB4rDisaPevdnO4uAgo0N9heHgPu1TjerjurE5ilD2NyzeB2A
Popular Posts
-
DALCHOKI AS "BHEDETAAR" OF KATHMANDU Dalchoki is a village development committee in Lalitpur District in the Bagmati Zone of Ce...