🏠 wiki
+ Přidat ✎ Upravit

Příspěvky a stránky

Funkce

Okamžité

zobrazení
the_date();
the_author();
the_title();
the_content();

Uložení do proměnné

$contentView=get_the_content();          

Zkratky

category_name
order
p
ID
post_author
post_date
post_count
post_content
post_title
post_modified
guid -> url adresa

Přidat obsah stránky

if ($catSlug=="mpsv") $pageID=83;
     else $pageID=81;

$args=array(
   'post_type'=>'page',
   'p' => $pageID
);
query_posts($args);

global $more;
$more = 0;

// the Loop
while (have_posts()) : the_post();
   //echo "<h2>"; the_title(); echo "</h2>";
   the_content();
endwhile;

Přidat příspěvky na stránku

//'category_name' => 'my-category-slug',
$args=array(
   'cat' => 6,
   'posts_per_page' => 5,
   
);
query_posts($args);

while ( have_posts() ) : the_post(); 
  get_template_part( 'martyn-content', get_post_format() ); 
endwhile;

Nejnavštěvovanější

Příspěvky a stránky