Skip to content

Instantly share code, notes, and snippets.

View pegues's full-sized avatar

Daniel Pegues pegues

  • Centreville, VA
View GitHub Profile
@pegues
pegues / page.downloadimages.liquid
Created December 6, 2022 14:37 — forked from richard-DigitalCake/page.downloadimages.liquid
Download all Shopify images from a collection using a hidden page & template
{% comment %}
To download all collection images.
1) Create a blank page template and add the code below.
2) Create a blank hidden page that uses this new template.
3) If using Chrome, use an extension that can download all images from a page, such as:
https://chrome.google.com/webstore/detail/image-downloader-imageye/agionbommeaifngbhincahgmoflcikhm
(Disclaimer: I am not associated in any manner with this extension or its developers. I am sharing this only because it worked for me)
4) Open the preview of your hidden page and you should see all collections images view on the page.
5) Open the extension you've installed and you can then download all collection images.
{% endcomment %}
@pegues
pegues / expose_ACF_fields_to_REST.php
Created July 13, 2021 17:46 — forked from MelMacaluso/expose_ACF_fields_to_REST.php
Automatically expose all the ACF fields to the Wordpress REST API in Pages and in your custom post types.
<?php
function create_ACF_meta_in_REST() {
$postypes_to_exclude = ['acf-field-group','acf-field'];
$extra_postypes_to_include = ["page"];
$post_types = array_diff(get_post_types(["_builtin" => false], 'names'),$postypes_to_exclude);
array_push($post_types, $extra_postypes_to_include);
foreach ($post_types as $post_type) {
register_rest_field( $post_type, 'ACF', [