Skip to content

Instantly share code, notes, and snippets.

View PudparK's full-sized avatar
🎯
Focusing

Paul Barron PudparK

🎯
Focusing
View GitHub Profile
@PudparK
PudparK / GraphQL Repo Query
Last active June 6, 2020 01:40
Project Page - Github GraphQL Query
{
user (login: "PudparK") {
name
avatarUrl
repositories (first: 100) {
nodes {
name
createdAt
description
homepageUrl
function slider_shortcode() {
$args = array( 'post_type' => 'slider', 'posts_per_page' => 4 );
$loop = new WP_Query( $args );
$return = '<div id="carousel-example-generic" class="carousel slide carousel-fade" data-ride="carousel">
<ol class="carousel-indicators">';
while ( $loop->have_posts() ) : $loop->the_post();
$numbers = $loop->current_post;
$active = ( $loop->current_post == 0 ) ? 'class="active"' : '';