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 | |
/* | |
* Basic search form for WP Advanced Search | |
* See http://wpadvancedsearch.com to learn more | |
*/ | |
require_once('wp-advanced-search/wpas.php'); | |
function demo_ajax_search() { | |
$args = array(); | |
$args['wp_query'] = array( 'post_type' => array('page', 'post'), | |
'orderby' => 'title', |
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 | |
/* | |
* This template displays the Ajax Advanced Search Page. | |
* Template Name: Ajax Advanced Search Page | |
* See http://wpadvancedsearch.com to learn more | |
*/ | |
get_header(); | |
$search = new WP_Advanced_Search('myform'); |
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 | |
/* | |
* template-ajax-results.php | |
* This file should be created in the root of your theme directory | |
* See http://wpadvancedsearch.com to learn more | |
*/ | |
if ( have_posts() ) : | |
while ( have_posts() ) : the_post(); | |
$post_type = get_post_type_object($post->post_type); |
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
<!-- CMS usage data from w3techs.com / captured 7/6/16 --> | |
<table> | |
<caption>Most Popular Content Management Systems | July 2016</caption> | |
<thead> | |
<tr> | |
<th>CMS</th> | |
<th>Usage</th> | |
<th>Change Since 6/1/16</th> | |
<th>Market Share</th> | |
<th>Change Since 6/1/16</th> |
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
/* Credits: | |
This bit of code: Exis | exisweb.net/responsive-tables-in-wordpress | |
Original idea: Dudley Storey | codepen.io/dudleystorey/pen/Geprd */ | |
var headertext = []; | |
var headers = document.querySelectorAll("thead"); | |
var tablebody = document.querySelectorAll("tbody"); | |
for (var i = 0; i < headers.length; i++) { | |
headertext[i]=[]; |
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
/* Credits: | |
This bit of code: Exis | exisweb.net/responsive-tables-in-wordpress | |
Original idea: Dudley Storey | codepen.io/dudleystorey/pen/Geprd */ | |
@media screen and (max-width: 600px) { | |
table {width:100%;} | |
thead {display: none;} | |
tr:nth-of-type(2n) {background-color: inherit;} | |
tr td:first-child {background: #f0f0f0; font-weight:bold;font-size:1.3em;} | |
tbody td {display: block; text-align:center;} |
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 | |
function responsive_tables_enqueue_script() { | |
wp_enqueue_script( 'responsive-tables', get_stylesheet_directory_uri() . '/responsive-tables.js', $deps = array(), $ver = false, $in_footer = true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'responsive_tables_enqueue_script' ); |
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 | |
/* | |
Plugin Name: Custom CSS and JS Plugin | |
Plugin URI: https://github.com/jpen365/custom-css-and-js-plugin | |
Description: Add a custom CSS stylesheet and JavaScript file to WordPress | |
Version: 1.0 | |
Author: Jon Penland | |
Author URI: http://premium.wpmudev.org/blog/author/jonpenland | |
*/ |
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
function custom_css_js_enqueue_scripts() { | |
/* enqueue the custom-style.css file */ | |
wp_enqueue_style( 'custom-css', plugins_url( '/css/custom-style.css', __FILE__ ), $ver = false ); | |
/* enqueue the custom-scripts.js file */ | |
wp_enqueue_script( 'custom-js', plugins_url( '/js/custom-scripts.js', __FILE__ ), $deps = array( 'jquery' ), $ver = false, $in_footer = true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'custom_css_js_enqueue_scripts' ); |
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 | |
/* enqueue styles and scripts */ | |
function jpen_enqueue_assets() { | |
/* theme's primary style.css file */ | |
wp_enqueue_style( 'main-css' , get_stylesheet_uri() ); | |
/* template's primary css file */ | |
wp_enqueue_style( 'startup-boostrap-css' , get_template_directory_uri() . './css/blog-post.css' ); |
OlderNewer