In C:\cmder\config\user-aliases.cmd (or wherever your cmder root is), add line:
projects=cd ""C:\Users\Username\Web Projects""
or in cmder type:
alias projects=cd ""C:\Users\Username\Web Projects""
| <?php | |
| // add editor the privilege to edit theme | |
| // comment out after reloading site | |
| // get the the role object | |
| $role_object = get_role( 'editor' ); | |
| // add $cap capability to this role object | |
| $role_object->add_cap( 'edit_theme_options' ); | |
| // comment out above after reloading site |
| <?php | |
| //setup your args with extra parameter fields => ids | |
| $cat_query_args = array( | |
| 'category__in' => 123, | |
| 'fields' => 'ids', | |
| ); | |
| $meta_query_args = array( | |
| 'meta_key' => 'featured_post', | |
| 'meta_value' => 'yes', |
| <?php | |
| function xxx_image_editor_default_to_gd( $editors ) { | |
| $gd_editor = 'WP_Image_Editor_GD'; | |
| $editors = array_diff( $editors, array( $gd_editor ) ); | |
| array_unshift( $editors, $gd_editor ); | |
| return $editors; | |
| } | |
| add_filter( 'wp_image_editors', 'xxx_image_editor_default_to_gd' ); |
| <?php | |
| // Admin Custom CSS (located in child theme) | |
| add_action( 'admin_enqueue_scripts', 'admin_custom_css' ); | |
| function admin_custom_css() { | |
| wp_enqueue_style( 'admin_custom_css', get_stylesheet_directory_uri() . '/admin.css', false, '1.0.0' ); | |
| } |
| <?php | |
| // Remove fields from job submission form - https://wpjobmanager.com/customization-snippets/#removeField | |
| add_filter( 'submit_job_form_fields', 'remove_job_form_fields' ); | |
| function remove_job_form_fields( $fields ) { | |
| // remove location | |
| unset($fields['job']['job_location']); |
In C:\cmder\config\user-aliases.cmd (or wherever your cmder root is), add line:
projects=cd ""C:\Users\Username\Web Projects""
or in cmder type:
alias projects=cd ""C:\Users\Username\Web Projects""
Rather than using default location and filenames like id_rsa and id_rsa.pub in .ssh:
Create a new file in .ssh directory (C:/Users/Username/.ssh) named "config", remove file extension if the editor adds one.
Inside "config" file add:
Host github github.com
HostName github.com
IdentityFile drive:/path/to/key/filename
User git
Q: Can I use Cmder's shell with the terminal on Windows?
A: Yes, to use the Cmder shell in VS Code, you need to create a vscode.bat file in your cmder path with the following contents:
@echo off
SET CurrentWorkingDirectory=%CD%
SET CMDER_ROOT=C:\cmder (your path to cmder)
CALL "%CMDER_ROOT%\vendor\init.bat"
CD /D %CurrentWorkingDirectory%| 1. Initialize your project using npm init and create a directory called src | |
| 2. Install babel dependencies by running | |
| npm install babel-cli -D | |
| npm install babel-preset-env -D | |
| 3. Create a .babelrc file inside your project and add the following code inside it: | |
| { | |
| "presets": ["env"] |
| <?php if(is_home() || is_page('home')) { ?> | |
| <div class="site-logo"> | |
| <a href="http://www.bizconvt.com/" title="BizCon VT" rel="home"> | |
| <img class="header-image" src="http://www.bizconvt.com/wp-content/uploads/2017/09/BizCon-logo-white_green-150x64.png" alt="BizCon VT" title="BizCon VT"> | |
| </a> | |
| </div> | |
| <?php } else { ?> | |
| <div class="site-logo"> | |
| <a href="http://www.bizconvt.com/" title="BizCon VT" rel="home"> | |
| <img class="header-image" src="http://www.bizconvt.com/wp-content/uploads/2017/09/BizCon-logo-150x64.png" alt="BizCon VT" title="BizCon VT"> |