Last active
June 20, 2017 21:23
-
-
Save jmarreros/cdb85a55634069bdbaf473f1c65dd939 to your computer and use it in GitHub Desktop.
Código que muestra una página estática
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 | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
if ( $paged == 1 && is_home() ) { | |
$idPage = 2; | |
$page = get_post( $idPage ); | |
$title = $page->post_title; | |
$content = apply_filters('the_content', $page->post_content); | |
$str = " | |
<article id='static-page'> | |
<header class='entry-header'> | |
<h3 class='entry-title'>".$title."</h3> | |
</header> | |
<div class='entry-content'> | |
".$content." | |
</div> | |
</article> | |
<hr> | |
"; | |
echo $str; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment