Skip to content

Instantly share code, notes, and snippets.

@shazdeh
Created March 26, 2014 02:12
Show Gist options
  • Save shazdeh/9775707 to your computer and use it in GitHub Desktop.
Save shazdeh/9775707 to your computer and use it in GitHub Desktop.
Parallax: unlink portfolio images in the portfolio expander and single portfolio views
<?php
function custom_unlink_portfolio_images() {
global $post, $themify;
if( $post->post_type == 'portfolio' ) {
if( is_singular( 'portfolio' ) || ( ! empty( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ] ) && strtolower( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ]) == 'xmlhttprequest' ) ) {
$themify->unlink_image = 'yes';
}
}
}
add_action( 'themify_post_before', 'custom_unlink_portfolio_images' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment