Posts

wordpress

wp_nav_menu( array( 'theme_location' => 'menu-2', 'menu_id'        => 'small-header-menu', 'menu_class' => 'small-menu' ) ); .small-menu li:last-child a{ border-right: none; } ----------------------------------------------------------- add_action('wp_enqueue_scripts' , 'zm_add_fa_css'); function zm_add_fa_css(){ wp_enqueue_style('custom-fa' , 'https://use.fontawesome.com/releases/v5.0.9/css/all.css' ) ; } https://use.fontawesome.com/releases/v5.0.9/css/all.css .small-menu{ padding: 0px; height: 50px; color: #fff; } .small-menu li{ display: inline-block; } .small-menu li a{ padding: 0 20px; border-right: 1px solid #fff; height: 100%; line-height: 50px; display: inline-block; color: #fff; } .small-menu li:last-child a{ border-right: none; } wordpress loop custom post type $args = array( 'post_type' => 'services...

MySql Connection

<?php $servername =  "localhost" ; $username =  "root" ; $password =  "data base password" ; // Create database connection $con =  new  mysqli($servername, $username, $password); // Check database connection if  ($con->connect_error) {      die ( "Connection failed: "  . $con->connect_error); }   echo   "Connected successfully" ; ?> create a database db-restapi ---- And create a table CREATE TABLE IF NOT EXISTS `categories` (    `id` int (11) NOT NULL AUTO_INCREMENT,    ` name ` varchar (256) NOT NULL ,    `description` text NOT NULL ,    `created` datetime NOT NULL ,    `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,    PRIMARY KEY (`id`) ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ; Connect to database using PDO ----------------- <?php class Database{ ...