Skip to content

Instantly share code, notes, and snippets.

<figure class=“aligncenter”>
<style>img#mv-trellis-img-1::before {padding: 100%; }img#mv-trellis-img-1 {display: block;}</style>
<noscript><img src=“http://mediavine.local/wp-content/uploads/2013/03/image-alignment-580x300-1.jpg” alt=“Image Alignment 580x300” class=“wp-image-906" data-pin-media=“http://mediavine.local/wp-content/uploads/2013/03/image-alignment-580x300-1.jpg” loading=“lazy”></noscript>
<img alt=“Image Alignment 580x300” class=“wp-image-906 lazyload” data-pin-media=“http://mediavine.local/wp-content/uploads/2013/03/image-alignment-580x300-1.jpg” loading=“lazy” data-src=“http://mediavine.local/wp-content/uploads/2013/03/image-alignment-580x300-1.jpg” id=“mv-trellis-img-1" src=“data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20300'%3E%3Crect%20width='300'%20height='300'%20style='fill:%23e3e3e3'/%3E%3C/svg%3E” width=“300" height=“300”>
</figure>
<p>Join Mediavine by helping us build the future, and your own online community, by opting into the Grow.me open beta.</p>
<p>Grow.me is a new platform by Mediavine to help you increase traffic, make more money, build your audience and improve user experience.</p>
<p>You don't need WordPress or the Grow Social Pro plugin to run Grow.me, which works directly from the Mediavine script wrapper. There will be enhanced features if you use Social Pro, but it is not required to run Grow.me.</p>
<p>Grow.me brings the speed and stability of Mediavine Ad Management to Grow, and it's where we’ll be adding future features. Right now, it will run alongside the WordPress Grow Social Pro plugin.</p>
<p>The initial Grow.me beta allows readers to love, bookmark and share your content easily to their favorite social platforms. But this is only the beginning. We've got big ideas, all designed to enhance your website for readers and keep them coming back.</p>
<p>So much is coming to the Grow.me beta that you can be p
<div class="article-meta">
<p>
<span class="posted-on"><span class="screen-reader-text">Posted on </span><time class="entry-date published" datetime="2015-08-14T03:20:35+10:00">14/08/2015</time><time class="updated" datetime="2020-06-04T08:50:09+10:00">04/06/2020</time></span> <span class="cat-links"><span class="screen-reader-text">Categories </span><a href="https://worldtravelfamily.com/category/money-to-travel/" rel="category tag">How to Get Money to Travel. How to Afford Travel</a></span> </p>
<p>
By: <span class="byline"><span class="screen-reader-text">Author </span><a class="url fn n" href="https://worldtravelfamily.com/author/travelschooling/">Alyson for World Travel Family</a></span> </p>
</div>
<script>
<?php if ( $google_analytics_delay ) { ?>
setTimeout(function(){
<?php } ?>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '<?php echo esc_js( self::$ga_id ); ?>');
<?php if ( $google_analytics_delay ) { ?>
@jdcauley
jdcauley / sample.js
Created March 31, 2020 13:16
Lazy Load JS groups with IO
// Sample from Trellis
import { loadImages } from './helpers/lazyload'
const boot = () => {
const bodyTag = document.getElementsByTagName('body')[0];
bodyTag.className = bodyTag.className.replace(/\bmvt-no-js\b/,'mvt-js')
const insertLegacyScript = () => {
const legacyTag = document.createElement('script')
legacyTag.src = `${window.mvt.theme_directory}/assets/dist/legacy.${window.mvt.version}.js`
{
"id": 1,
"slug": 'something-house-wives',
"title": 'Something House Wives",
// additional core meta data
"post": {
"html": "the html that would be rendered at servertime",
"editor_content": "editor version with whatever your shortcodes are"
},
"author: {
@jdcauley
jdcauley / admin.js
Last active November 6, 2018 06:02
User Profile WP
jQuery(document).ready(function($){
var _custom_media = true,
_orig_send_attachment = wp.media.editor.send.attachment;
$('#upload_image_button').click(function(e) {
var send_attachment_bkp = wp.media.editor.send.attachment;
var button = $(this);
var id = button.attr('id').replace('_button','');
_custom_media = true;
function api_featured_images( $post ) {
$field = get_post_meta($post['id'], 'field_id', true);
return $field;
}
add_action('rest_api_init', function() {
register_rest_field( 'post, 'field_name', array(
'get_callback' => 'your_field_function'
));
});
{
"title": "Pancakes",
"author": "Chelsea Cauley",
"yield": "16 Pancakes ",
"suitable_for_diet": null,
"thumbnail_id": "425",
"thumbnail_uri": "http://barleyandcraft.com/wp-content/uploads/2018/09/CC77BE4B-7151-4CF9-9CDC-8691D42503AB.jpeg",
"description": null,
"category": "2",
"category_name": "Breakfast",
[
{
"id": "2442598894",
"type": "setting",
"slug": "mv_create_copyright_attribution",
"value": null,
"data": {
"type": "text",
"label": "Default Copyright Attribution",
"instructions": "If left blank, the Create Card author will be displayed."