Skip to content

Instantly share code, notes, and snippets.

@bryanwillis
bryanwillis / load any page
Created October 19, 2013 01:01
wordpress load any php page
// The next line is commented out to tell WP to not load theme
//define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');
// Fake a 200 OK status header
status_header(200);
// Get first post's title from database using $wpdb object
$title = $wpdb->get_var('SELECT post_title FROM ' . $wpdb->posts . ' WHERE ID = 1');
// Print output, no theme.
echo sprintf('This is a non-WordPress page, but we can use all functionality provided by WordPress. For example, this is the title of the first post: <strong>%s</strong>', esc_html($title));
#rev_slider_2_2_wrapper div.tp-bullets.tp-thumbs.navbar div.tp-mask div.tp-thumbcontainer div.bullet.thumb:nth-child(1) {
display: inline;
position: relative;
}
#rev_slider_2_2_wrapper div.tp-bullets.tp-thumbs.navbar div.tp-mask div.tp-thumbcontainer div.bullet.thumb:nth-child(1):hover {
color: #c00;
text-decoration: none;
}
/* Wordpress core classes */
:-moz-placeholder {
font-style:normal;
color: #45484a;
}
:-ms-input-placeholder {
font-style:normal;
color: #45484a;
}
::-webkit-input-placeholder {
@bryanwillis
bryanwillis / sliding-panel.css
Last active December 26, 2015 04:39
extracted from hybrid wp plugin... add php to theme template above header, css and js to theme scripts
/* ====== Wrapper for entire sliding panel ====== */
#sidebar-sliding-panel {
position: absolute;
top: 0;
display: none;
width: 100%;
z-index: 9999;
}
jQuery("select").minimalect();
/*********** search form ***********/
/* search form main background */
.sf_search .sf_input {
background-color: rgb(179, 179, 179);
}
/* search form border and inset */
@bryanwillis
bryanwillis / admin.css
Last active December 27, 2015 03:49 — forked from anonymous/admin.css
#adminmenu div.wp-menu-image:before {
color: #999;
}
#adminmenu div.wp-menu-image:before:hover {
color: #FFF !important;
}
#adminmenu div.wp-menu-image:hover:before {
color: #FFF !important;
/* Dashicons mixin use: @include dashicons( '\f140' ); */
/* Button mixin- creates 3d-ish button effect with correct  highlights/shadows, based on a base color. */
html { background: #eeeeee; }
/* Links */
a { color: #0074a2; }
a:hover, a:active, a:focus { color: #0099d5; }
@bryanwillis
bryanwillis / admin.css
Created November 2, 2013 19:43
november 2
/* Dashicons mixin use: @include dashicons( '\f140' ); */
/* Button mixin- creates 3d-ish button effect with correct  highlights/shadows, based on a base color. */
#adminmenuwrap{
background-image: url('http://www.candidbusiness.us/wp-content/uploads/2013/09/ios-linen-1024x1024.jpg') !important;}
.hotspots-user-tracker_page_hut_user_tracking_page DIV[id="wpbody"]:nth-child(2)>DIV[id="wpbody-content"]:nth-child(1)>DIV[class="wrap"]:nth-child(3)>P:nth-child(10) {display:none;}
.hotspots-user-tracker_page_hut_user_tracking_page DIV[id="wpbody-content"]:nth-child(1)>DIV[class="wrap"]:nth-child(3)>H2:nth-child(2), .hotspots-user-tracker_page_hut_user_tracking_page DIV[id="wpbody"]:nth-child(2)>DIV[id="wpbody-content"]:nth-child(1)>DIV[class="wrap"]:nth-child(3)>P:nth-child(5), .hotspots-user-tracker_page_hut_user_tracking_page DIV[id="wpbody"]:nth-child(2)>DIV[id="wpbody-content"]:nth-child(1)>DIV[class="wrap"]:nth-child(3)>H2:nth-child(2) {display:none;}
#wpadminbar {
{"tree": {"index.php": {"page_title": null, "menu_title": null, "access_level": null, "extra_capability": null, "file": null, "position": 0, "parent": null, "css_class": null, "hookname": null, "icon_url": null, "separator": false, "open_in": null, "template_id": ">index.php", "is_plugin_page": null, "custom": false, "url": null, "items": [{"page_title": null, "menu_title": "Dashboard Main", "access_level": null, "extra_capability": null, "file": null, "position": 0, "parent": null, "css_class": null, "hookname": null, "icon_url": null, "separator": false, "open_in": null, "template_id": "index.php>index.php", "is_plugin_page": null, "custom": false, "url": null, "items": [], "grant_access": [], "role_access": [], "missing": false, "unused": false, "hidden": false, "defaults": {"page_title": "", "menu_title": "Home", "access_level": "read", "extra_capability": "", "file": "index.php", "position": 0, "parent": "index.php", "css_class": "menu-top", "hookname": "", "icon_url": "images/generic.png", "separator":