Skip to content

Instantly share code, notes, and snippets.

@jmarreros
Last active June 20, 2017 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmarreros/cdb85a55634069bdbaf473f1c65dd939 to your computer and use it in GitHub Desktop.
Save jmarreros/cdb85a55634069bdbaf473f1c65dd939 to your computer and use it in GitHub Desktop.
Código que muestra una página estática
<?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