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
<html> | |
<head> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" > | |
<link rel="stylesheet" href="mystyle.css" > | |
<style> | |
.circle{ | |
height:200px; | |
width:200px; | |
background-color: red; | |
border:1px solid green; |
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 | |
add_action( 'init', function() | |
{ | |
// Get all the posts which is assigned to the uncategorized category | |
$args = array( | |
'post_type' => 'cp_crq_news', | |
'posts_per_page' => -1, // Adjust as needed | |
'cat' => 84, // Category ID for uncategorized category | |
'fields' => 'ids', // Only get post ID's for performance | |
// Add any additional args here, see WP_Query |
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("strip_tags", post.content)|truncate(50) }} |
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
curl "http://loripsum.net/api/5/medium/decorate/link/ul/ol/dl/bq/code/headers/" | sed "s/<\/p>/<\/p>/" | wp post generate --post_content --count=10 |
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 _run_once(){ | |
$posts = get_posts(array( | |
'numberposts' => -1, | |
'post_type' => 'place' | |
) | |
); | |
foreach($posts as $p) : | |
// $meta = get_post_meta($p->ID, 'advertiser_type',true); |
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
{# beware of gallery shortcodes #} | |
{% set content = function('strip_shortcodes', item.get_preview(80,false,"",true)) %} | |
{# strip tags #} | |
{{ function("strip_tags", post.content)|truncate(50) }} | |
{{ content|striptags|truncate(50) }} | |
function custom_trim($value, $limit = 100, $end = '...'){ | |
$value = strip_tags($value); | |
if (mb_strwidth($value, 'UTF-8') <= $limit) { |
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
{% extends 'base.twig' %} | |
{% import 'macro/edit-link.twig' as editLink %} | |
{% block content %} | |
{% for view in post.get_field('flexible_content') %} | |
{# guides #} | |
{% if view.acf_fc_layout == "guides" %} | |
<div class="container {{ view.acf_fc_layout }}"> | |
<div class="row"> | |
{% for item in view.guide %} |
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_flag display_startup_errors on | |
php_flag display_errors on | |
php_flag html_errors on |
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
// erase post meta | |
for id in $(wp post list –post_type=’locations’ –format=ids); do wp post meta update $id print_textarea ''; done |
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
for POST in $(wp post list --post_type=locations --meta_key=page_subtype --meta_value=event --format=ids); do wp post delete $POST --force; done |