Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert Galofre gdnwebmedia

View GitHub Profile
View oxygen-repeater-dynamic-relationship-query.php
/*
* Add post object field on the CPT you want to display
* In the post object field select the CPT post you want this post to show on
*
* Example:
* 2 CPT's - Tours and Reviews
*
* To show reviews on the relevant tours:
* - Add the post object field to the reviews CPT
* - Select the tours that I want the reviews to show on inside the Review post
@jsongerber
jsongerber / functions.php
Last active Feb 12, 2021
Useful Wordpress functions
View functions.php
<?php
// Dequeue functions.js -> Contains handlers for navigation and widget area.
function buxum_dequeue_script() {
wp_dequeue_script( 'twentysixteen-script' );
}
add_action( 'wp_print_scripts', 'buxum_dequeue_script', 100 );
// Hide admin bar
function my_function_admin_bar(){ return false; }
@Shelob9
Shelob9 / custom_related_field.php
Last active May 23, 2022
Get related posts from a Pods custom relationship field and show post title--as a link--and a custom field. For full explanation see: http://pods.io/tutorials/get-values-from-a-custom-relationship-field/
View custom_related_field.php