menu, wordpress, custom item

Leave a comment
  • Вывод featured image

    foxkeys Aug 08, 2011 13:40


    if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
    the_post_thumbnail();
    }

    wordpress, featured image

    Leave a comment
  • Галерея

    foxkeys Aug 08, 2011 13:37

        $size = array(566, 245);
        $GaleryPageId = 16;

    $Query = array(
            'post_parent' => $GaleryPageId,
            'post_type' => 'attachment',
            'post_mime_type' => 'image',);

    echo '
          if ( $images = get_children($Query ( Read more... )

    gallery, wordpress

    Leave a comment
  • Подключение скриптов из темы

    foxkeys Aug 08, 2011 13:35

    wp_enqueue_script('cufon-yui', get_bloginfo('template_directory').'/js/cufon-yui.js', array('jquery'));

    wordpress, theme, script

    Leave a comment
  • Простой вывод текста поста по Id

    foxkeys Aug 08, 2011 13:24

    Велосипед? Не знаю...
    Размещать в functions.php темы.

    function print_post_content($PostId) {

    global $post;
    $tmp_post = $post;
    $post = get_posts( 'p='.$PostId );
    setup_postdata($post[0]);
    the_content();
    $post = $tmp_post;
    }

    content, wordpress, post

    Leave a comment
  • Первые и последние элементы меню

    foxkeys Aug 08, 2011 13:15

    Простой способ выделять первые/последние элементы (в т.ч. в подменю)
    $("#nav li:first-child").addClass("first");
    $("#nav li:last-child").addClass("last");

    меню, menu, wordpress, вордпресс

    Leave a comment
  • Up