Add WPML support to template file staff-header.php
This commit is contained in:
@@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|||||||
if ( ! isset( $id ) )
|
if ( ! isset( $id ) )
|
||||||
$id = get_the_ID();
|
$id = get_the_ID();
|
||||||
|
|
||||||
$post = get_post( $id );
|
$post = function_exists( 'icl_object_id' ) ? get_post( icl_object_id( $id, 'sp_staff', true ) ) : get_post( $id );
|
||||||
$title = $post->post_title;
|
$title = $post->post_title;
|
||||||
if ( $title ) {
|
if ( $title ) {
|
||||||
$staff = new SP_Staff( $id );
|
$staff = new SP_Staff( $id );
|
||||||
|
|||||||
Reference in New Issue
Block a user