Created
April 23, 2014 13:43
-
-
Save ivandoric/11215689 to your computer and use it in GitHub Desktop.
wordpress: Title for custom Wordpress pages, that have special loops on them
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$post_id = $wp_query->post->ID; // get post ID | |
?> | |
<h2><?php echo get_the_title($post_id); ?></h2> | |
/* If using WPML for translation then */ | |
<h2><?php echo get_the_title(icl_object_id($post_id, 'page', false)); ?></h2> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment