Skip to content

Instantly share code, notes, and snippets.

View gdnwebmedia's full-sized avatar

Robert Galofre gdnwebmedia

View GitHub Profile
* 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 / functions.php
Last active February 12, 2021 21:46
Useful Wordpress functions
// 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 / custom_related_field.php
Last active May 23, 2022 00:16
Get related posts from a Pods custom relationship field and show post title--as a link--and a custom field. For full explanation see: