This file contains hidden or 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 | |
/** | |
* default search form | |
*/ | |
?> | |
<form role="search" method="get" id="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>"> | |
<div class="search-wrap"> | |
<label class="screen-reader-text" for="s"><?php _e( 'Search for:', 'presentation' ); ?></label> | |
<input type="search" placeholder="<?php echo esc_attr( 'Search…', 'presentation' ); ?>" name="s" id="search-input" value="<?php echo esc_attr( get_search_query() ); ?>" /> | |
<input class="screen-reader-text" type="submit" id="search-submit" value="Search" /> |
This file contains hidden or 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
$ ruby -rubygems -e 'require "jekyll-import"; | |
JekyllImport::Importers::WordPress.run({ | |
"dbname" => "", | |
"user" => "", | |
"password" => "", | |
"host" => "localhost", | |
"port" => "3306", | |
"socket" => "", | |
"table_prefix" => "wp_", | |
"site_prefix" => "", |
This file contains hidden or 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
for this you basically need to setup a place to put it and a div statement works. | |
<div style="width:150px;height:2px;background-color:#000000;"> </div> | |
this could also be referenced: | |
.hr {width:150px;height:2px;background-color:#000000;} // in your css file/script | |
<div class="hr"> </div> <!-- IN HTML --> | |
You can change the position and have it going up/down or left/right with css placement and z-index |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | |
</head> | |
<body> |
This file contains hidden or 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
// Register Custom Post Type | |
function custom_post_type() { | |
$labels = array( | |
'name' => _x( 'Post Types', 'Post Type General Name', 'text_domain' ), | |
'singular_name' => _x( 'Post Type', 'Post Type Singular Name', 'text_domain' ), | |
'menu_name' => __( 'Post Types', 'text_domain' ), | |
'name_admin_bar' => __( 'Post Type', 'text_domain' ), | |
'archives' => __( 'Item Archives', 'text_domain' ), | |
'attributes' => __( 'Item Attributes', 'text_domain' ), |
This file contains hidden or 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
$args = array( 'post_type' => 'product', 'posts_per_page' => 10 ); | |
$loop = new WP_Query( $args ); | |
while ( $loop->have_posts() ) : $loop->the_post(); | |
the_title(); | |
echo '<div class="entry-content">'; | |
the_content(); | |
echo '</div>'; | |
endwhile; |
This file contains hidden or 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
//The call to wp_get_current_user() return WP_User object. | |
<?php | |
$current_user = wp_get_current_user(); | |
/** | |
* @example Safe usage: $current_user = wp_get_current_user(); | |
* if ( !($current_user instanceof WP_User) ) | |
* return; | |
*/ | |
echo 'Username: ' . $current_user->user_login . '<br />'; |