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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PlayerMove : MonoBehaviour | |
{ | |
private Rigidbody2D rb; | |
private float moveInput; | |
public float speed; |
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
<div class="blog-main"> | |
{% comment %} Get all the articles for the blog {% endcomment %} | |
{% assign all_articles = blog.articles %} | |
{% assign posts_per_page = section.settings.posts_per_page %} | |
{% assign feature_article_1 = articles[section.settings.feature_article_1] %} | |
{% comment %} | |
Start pagination as you normally would. This is to be sure the correct | |
page nav links show up without having to modify anything about them. | |
{% endcomment %} |
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
<ul class="product-grid"> | |
{% for product in collections.frontpage.products %} | |
<li class="product"> | |
<a class="product-image" href="{{ product.url }}" title="{{ product.title }}"> | |
<img src="{{ product.featured_image | product_img_url: "medium" }}" alt="{{ product.title }}" /> | |
</a> | |
<div class="product-content"> | |
<span class="product-price">{{ product.price | money }}</span> | |
<a class="product-title" href="{{ product.url }}" title="{{ product.title }}">{{ product.title }}</a> | |
<p> |
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
function getQueryObj() { | |
var queryObj = {}; | |
if (window.location.search.indexOf('?') > -1) { | |
var query = window.location.search.split(/\?/), | |
params = query[1].split("&"), | |
for (var i = 0; i < params.length; i++) { | |
var keyVal = params[i].split("="); |
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 (!function_exists('write_log')) { | |
function write_log ( $log ) { | |
if ( true === WP_DEBUG ) { | |
if ( is_array( $log ) || is_object( $log ) ) { | |
error_log( print_r( $log, true ) ); | |
} else { | |
error_log( $log ); | |
} |
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
// ADD NEW COLUMNS | |
function custom_columns_head($columns) { | |
$columns = array( | |
'cb' => '<input type="checkbox" />', | |
'title' => 'Title', | |
'custom_field_1' => 'Column Name', | |
'custom_field_2' => 'Column Name', | |
'date' => 'Date' | |
); | |
return $columns; |
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 | |
//http://stackoverflow.com/questions/20879401/how-to-add-custom-post-type-archive-to-menu | |
add_action('admin_head-nav-menus.php', 'wpclean_add_metabox_menu_posttype_archive'); | |
function wpclean_add_metabox_menu_posttype_archive() { | |
add_meta_box('wpclean-metabox-nav-menu-posttype', 'Custom Post Type Archives', 'wpclean_metabox_menu_posttype_archive', 'nav-menus', 'side', 'default'); | |
} |
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 page_navi_in_query($query) { | |
$bignum = 999999999; | |
if ( $query->max_num_pages <= 1 ) | |
return; | |
echo '<nav class="pagination">'; | |
echo paginate_links( array( | |
'base' => str_replace( $bignum, '%#%', esc_url( get_pagenum_link($bignum) ) ), | |
'format' => '', |
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 | |
add_filter('the_content', 'specific_no_wpautop', 9); | |
function specific_no_wpautop($content) { | |
global $post; | |
if (is_page()) { // or whatever other condition you like | |
remove_filter( 'the_content', 'wpautop' ); | |
return $content; | |
} else { | |
return $content; |
NewerOlder