Skip to content

Instantly share code, notes, and snippets.

View ribeirovictor's full-sized avatar
🏠
Working from home

Victor Ribeiro ribeirovictor

🏠
Working from home
View GitHub Profile
import React, { useState, useEffect } from 'react'
import Parse from 'parse'
import Header from 'components/molecules/Header'
import Main from 'components/molecules/Main'
import NumbersList from 'components/molecules/NumbersList'
let CupomObject = Parse.Object.extend('Cupom')
@ribeirovictor
ribeirovictor / acf-future-posts.php
Created June 22, 2019 15:27 — forked from aderaaij/acf-future-posts.php
Advanced Custom Fields datepicker: Show only events with a date of today or in the future. Extra comments from Pasnon @ ACF Forums: f you needed to, you could also play with the comparison date, which is the first array in meta_query, currently set to date("Y-m-d") which is today; if you were to make it date("Y-m-d", strtotime("-1 day")) you cou…
<?php
/*
* Display posts only from today and in the future:
* http://old.support.advancedcustomfields.com/discussion/6000/how-to-sort-posts-by-acf-date-and-display-only-future-posts
* by Pasnon
*/
$date_args = array(
'post_type' => 'events',
@ribeirovictor
ribeirovictor / functions.php
Last active June 18, 2019 23:18
[Pagcerto] Rota customizada Wordpress Rest API para mostrar as 3 primeiras postagens do blog (título, link e imagem destacada)
<?php
// API Posts
function get_post_items() {
$args = array (
'post_status' => 'publish',
'posts_per_page' => 3,
);
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.