# Pull from WP Engine project - including Uploads | |
wordmove pull --all --no-mu-plugins | |
# Pull from WP Engine project - excluding Uploads | |
wordmove pull --all --no-mu-plugins --no-uploads | |
# Pull from server when you will use Rsync for DB | |
wordmove pull --all --no-db | |
#more to come |
=============================FONTEND FORM=============================== | |
<form class="form-horizontal" action="" method="post" enctype="multipart/form-data"> | |
<input type="file" name="image" accept="image/*" multiple /> | |
===========================BACKEND================================ | |
if(isset($_POST['save'])){ | |
$message = $blog->save_image_info($_POST); | |
} | |
$query_result = $blog->selectAllimageinfo(); | |
============================FUNCTION====================================== | |
public function save_image_info() { |
<?php wp_head(); ?> //Add end of header section. | |
<?php wp_footer(); ?> //Add end of footer section. | |
// Include style and escript in wordpress | |
<?php | |
if(! function_exists('hasan_theme_scripts')){ | |
add_action('wp_enqueue_scripts','hasan_theme_scripts'); | |
function hasan_theme_scripts(){ | |
wp_enqueue_style('bootstrap', get_template_directory_uri().'/css/bootstrap.min.css', array(),'1.0.0','all'); | |
This cheat sheet explores a fundamental concept in WordPress development: filters.
In WordPress, filters enable developers to intercept and modify data as a WordPress page is loading, before sending it to the browser or saving it to the database.
Understanding how filters work isn’t all that easy, partly because the concept is difficult to visualize, and also because filters are often confused with WordPress actions. Yet, it’s an important concept to master because filters are one of the most common ways developers interact with WordPress.
For these reasons, this filter cheat sheet is ideal for those new to working with filters. This cheat sheet provides an in-depth understanding of what filters do and how they work, and provides a quick reference guide for using filters in WordPress development.
<?php // Load in WP functions outside of wordpress | |
define('WP_USE_THEMES', false); | |
require('/home/kindyhub/public_html/wp-blog-header.php'); ?> | |
add_action('wp_enqueue_scripts', 'no_more_jquery'); | |
function no_more_jquery(){ | |
//if(!is_bbpress()) { //sample condition inside function | |
wp_deregister_script('jquery'); | |
//} | |
} |
###Custom Post Types
function codex_custom_init() {
$labels = array(
'name' => 'Books',
'singular_name' => 'Book',
'add_new' => 'Add New',
<?php | |
function create_post_your_post() { | |
register_post_type( 'your_post', | |
array( | |
'labels' => array( | |
'name' => __( 'Your Post' ), | |
), | |
'public' => true, | |
'hierarchical' => true, |