How to load more content, while scrolling page down with jquery ?

HTML PART

<ul class="grid effect-2" id="grid">
<li style="width:100%;">
<div class="col-sm-3 col-md-3 col-xs-12 col-lg-3 pb-4">
<img src="http://www.tutorialshore.com/wp-content/uploads/2016/09/LG-G6-smartphone-150x150.jpg" alt="lg-g6-smartphone" width="150" height="150" class="alignnone size-thumbnail wp-image-128" />
</div ></li>
<li style="width:100%;">
<div class="col-sm-3 col-md-3 col-xs-12 col-lg-3 pb-4">
<img src="http://www.tutorialshore.com/wp-content/uploads/2016/09/LG-G6-smartphone-150x150.jpg" alt="lg-g6-smartphone" width="150" height="150" class="alignnone size-thumbnail wp-image-128" />
</div ></li>
</ul>

Jquery Script

jQuery(window).on('scroll', function(responseTxt, statusTxt, xhr) {
var total_li=jQuery('ul#grid li').length;
if((total_li>0)&&(k>0))
{
var wS = jQuery(this).scrollTop();
var l_total=jQuery('ul#grid li').length*50;
if (wS > l_total){
k=0;
let req_page = 'http://www.tutorialshore.com/api.php?name=newpicture';
let page_ct = counter += 1;
req_page = req_page+'&page_limit='+page_ct;
var content;
jQuery.get(req_page, function(data){
content= data;
k=1;
jQuery('#grid').append(content);

new AnimOnScroll( document.getElementById( 'grid' ), {
minDuration : 0.4,
maxDuration : 0.7,
transitionDuration : 0.2,
viewportFactor : 0.2
});
});
}
}
});

How to add a new menu item after user menu in the new menu area wordpress

To add a new menu item after user menu in the new menu area wordpress
  1.  Open function.php file from active theme folder
  2.  Add below code down of that page
  $args = array( 'id' => 'new menu item', 'title' => 'new menu item', 'href' => 'http://www.technomaniya.com/', 'parent' => 'new-content', ); $wp_admin_bar->add_node($args); } add_action('admin_bar_menu', 'custom_button_example2', 60);

how to install new font to a html website

To install new font to a html website you have to do below steps

1) Download font files from font site or you can search in google font https://fonts.google.com/

2) Upload the downloade .ttf to your server fonts directory

3) define as below with uploaded ttf file full path

Define like below on the top of the css file

@font-face {
font-family: ‘Din-light-font’;
src: local(‘Din-light’),
url(‘urdomain com/fonts/ufonts.com_din-light.ttf’);
}

Then you can use anywere like below

p
{
font-size:18px;
font-family: ‘Din-light’;
}

tmp_name is empty wordpress php image upload ?

If your getting tmp_name value empty in word press php image upload ,it is because of temp directory path issues you can solve by using following steps.

1) By using FTP or hosting create a php.ini file in root folder(don’t create if that file already their means.)

2) Add below line in that php.ini file

i) upload_tmp_dir= /home/username/public_html/temp/ ( /home/username/public_html= root path)

ii) Create a folder temp( in root ditectory and give full permission)

3) Now you can use same PHP upload script to upload your image

if (move_uploaded_file($_FILES[“fileToUpload”][“tmp_name”], $target_file)) {
echo “The file “. basename( $_FILES[“fileToUpload”][“name”]). ” has been uploaded.”;
} else {
echo “Sorry, there was an error uploading your file.”;
}

Cheers 🙂