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 ūüôā

Dropdown menu in wordpress not working in mobile device

One of the main issue for integrating bootstrap js to WordPress is the conflicting of menu bar with bootstrap css.To avoid this you can do any of below steps .Actually .hide{display:none!important} in bootstrap css file automatically hiding menu in WordPress .But in mobile device WordPress nav css trying to display that menu ,but this css over hidding again .

To avoid this

  1.  Remove

 

.hide{display:none!important}  from bootstrap.min.css

0r

Add below style in the page (for mobile device only)

.nav-wrapper .hide {
 display: block !important;

mysql error Field doesn’t have a default values ?

Here is the steps to solve¬†¬†field doesn’t have a default values error

1) Go to phpMyadmin

2) Click on variables menu  as shown in figure

mysql error Field doesn't have a default values

 

3)¬†Scroll down to find sql mode and¬†click on edit button as shown in below ¬†image remove ‘STRICT_TRANS_TABLES’ Save it.

 

remove 'STRICT_TRANS_TABLES' Save it.