Při vývoji nebo hledání chyb je možné v souboru wp-config.php změnit nastavení WP_DEBUG:
define('WP_DEBUG', true);
@ini_set('display_errors', 1);Generátory kódu:
Příklady použití:
<?php
$args = array(
'posts_per_page' => 1,
'post_type'=> 'page',
'p' => 453 // Page ID
);
$myposts = get_posts($args);
foreach ($myposts as $post) : setup_postdata($post);
the_title();
the_content();
endforeach;
wp_reset_postdata();
?><?php the_title('<h3>', '</h3>'); ?><?php
if (is_page('24')) {
the_widget('WP_Widget_Categories', 'count=1');
}
?>get_the_post_thumbnail($post_id, 'thumbnail'); // Thumbnail get_the_post_thumbnail($post_id, 'medium'); // Medium resolution get_the_post_thumbnail($post_id, 'large'); // Large resolution get_the_post_thumbnail($post_id, 'full'); // Original resolution