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
// XL screen | |
@screen-xl: 1600px; | |
@screen-xl-min: @screen-xl; | |
@screen-xl-hughdesktop: @screen-xl-min; | |
// So media queries don't overlap when required, provide a maximum | |
@screen-lg-max: (@screen-xl-min - 1); | |
//Container sizes | |
// Large screen / wide desktop |
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
http://wordpress.stackexchange.com/questions/139834/obliterate-the-main-query-and-replace-it | |
When 'pre_get_posts' is fired, there are a lot of things that WordPress has already done like setup all the query variables (also the query you don't send) and setup all the conditional properties (all the is_* properties). So, if you want completely replace the query you should reset all that things and set your own. | |
In fact, even if your code works, WordPress will use page.php as template. | |
However there's a simpler approach: act before WordPress do all the things. | |
A good place is the 'request' filter hook, at that time WordPress has created the query vars from url and is going to pass that vars to WP_Query, and you can intercept and change query arguments before are sent. |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> |
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
/** | |
* | |
* Returns a random element from an array | |
* | |
*/ | |
function random_item(items) { | |
return items[Math.floor(Math.random()*items.length)]; | |
} |
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
; Wordfence WAF | |
auto_prepend_file = '/srv/www/example.com/current/config/wordfence-waf.php' | |
; END Wordfence WAF |
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 to wp-config: | |
Config::define('WP_ALLOW_MULTISITE', true); | |
deploy site | |
go to tools > network setup, select subdomains | |
save , etc. | |
add to wp-config | |
Config::define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST']); | |
Config::define('MULTISITE', true); | |
Config::define('SUBDOMAIN_INSTALL', true); | |
Config::define('PATH_CURRENT_SITE', '/wp/'); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>PADDING!</title> | |
<link href="/margin.css" rel="stylesheet"> | |
</head> | |
<body> | |
<div class="example-1"> |
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
Aenean malesuada nunc magna, in luctus elit lobortis ut. Cras odio turpis, accumsan eu rutrum fermentum, commodo vitae nulla. Maecenas dui erat, ullamcorper in tortor at, sollicitudin cursus ante. Aliquam eu libero molestie, viverra risus vitae, fermentum nisi. Sed id neque eget dolor lobortis venenatis eget efficitur tellus. Nullam nisi eros, semper vel pharetra at, eleifend sagittis risus. Etiam porttitor auctor nisl id tempus. Duis fringilla diam arcu, eu faucibus lorem gravida eget. In hac habitasse platea dictumst. |
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
import Persister from './Persister'; | |
import { HttpClient } from '../HttpClient'; | |
export default class API extends Persister { | |
constructor(keyObject) { | |
super(keyObject); | |
this.LS_KEY = 'api'; | |
} | |
async get() { |
NewerOlder