####PROJECT DIRECTORY
(dir) wp-content
- all your wordpress theme files and plugins
(dir) db-content
- your sql database file to import
docker-compose.yml (code example below)
<?php | |
// example 1 | |
$episodes = preg_grep('~^good-.*\.html$~', scandir(__DIR__)); | |
$d = new DOMDocument; | |
$mock = new DOMDocument; | |
$d->loadHTML(file_get_contents(__DIR__ . '/' . end($episodes))); | |
$body = $d->getElementsByTagName('body')->item(0); |
``` | |
<?php | |
function rmcomments($id) | |
{ | |
if (file_exists($id)) { | |
if (is_dir($id)) { | |
$handle = opendir($id); | |
while ($file = readdir($handle)) { | |
if (($file != ".") && ($file != "..")) { |
Original credit to renzramos/wordpress-bootstrap-4-pagination - however his only works with the main loop. Small modification. | |
Now you can use in main query or custom wp query. | |
```php | |
<?php | |
if (!function_exists('pagination_that_doesnt_suck')) { | |
function pagination_that_doesnt_suck($query = 0) | |
{ |