-
Open Ampps Application -> MySQL Tab -> Configuration.
-
In [mysqld] section, add the following line:
innodb_force_recovery = 1
-
Save the file and try starting MySQL
-
Remove that line which you just added and Save.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly. | |
function stock_humayunbd_theme_shortcode_options($options){ | |
$options = array(); // remove shortcode old options | |
} | |
add_filter('cs_shortcode_options', 'stock_humayunbd_theme_shortcode_options'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## table of contents: | |
===================== | |
1. Basic Php | |
2. Install WordPress in live server | |
2.1. WordPress Dashboard Introduction | |
3. Introduce about IDE & WordPress template hierarchy | |
4. Introducing about Visual Composer | |
4.1. Visual Composer academy site | |
4.2. Use Visual Composer Element/Addons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
WordPress Template Hierarchy (as of WordPress 4.9) | |
is_404() -------------------------------------------------------------------------------------------------> 404.php | |
is_search() ----------------------------------------------------------------------------------------------> search.php | |
is_front_page() ------------------------------------------------------------------------------------------> front-page.php | |
is_home() ------------------------------------------------------------------------------------------------> home.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Register widget area. | |
* | |
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar | |
*/ | |
function stock_humayunbd_widgets_init() { | |
register_sidebar( array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
<div class="logo"> | |
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"> | |
<?php $logo_id = get_theme_mod('custom_logo'); ?> | |
<?php if(!empty($logo_id)) : the_custom_logo(); else : ?> | |
<h3><?php bloginfo( 'name' ); ?></h3> | |
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function post_list_shortcode($atts){ | |
extract( shortcode_atts( array( | |
'count' => '', | |
), $atts) ); | |
$q = new WP_Query( | |
array('posts_per_page' => $count, 'post_type' => 'posttype', 'orderby' => 'menu_order','order' => 'ASC') | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Short custom post type | |
*/ | |
function my_theme_custom_post() { | |
register_post_type( 'cpt', | |
array( | |
'labels' => array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Stock Toolkit | |
Plugin URI: http://humayunbd.com | |
Description: Theme shortcode and visual composer addons here. | |
Version: 1.2 | |
Author: Humayun Ahemed | |
Author URI: http://humayunbd.com | |
*/ |