カテゴリー ‘ホームページ制作’ の一覧

WPのネットワーク時にKtai Styleで画像が表示されない問題

2010年 8月 25日 (水) / PM 12:00

WordPress 3.0.1 ネットワーク(マルチサイト、複数サイト)化して
Ktai Style 2.0.3 で携帯ページを表示する際に記事内の画像が表示されないケース

plugins/ktai-style/inc/shrinkage.php
でネットワーク化したWordPressの判定が無いで画像フォルダの指定が正しくされていない。
なので無理やりWordPress MU の処理を適用させるために下記をコメントアウト。

89-111行目
	if (! isset($wpmu_version)) {  // single install WordPress
		$uploads = wp_upload_dir();
		$uploads_url = trailingslashit($uploads['baseurl']);
		$content_url = trailingslashit(content_url());
		if ( $uploads['baseurl'] && false === strpos($uploads_url, $this->wpurl) && false === strpos($uploads_url, $content_url) ) {
			$this->self_dir[] = trailingslashit(str_replace('\\', '/', $uploads['basedir']));
			$this->self_url[] = $uploads_url;
			$this->self_url_path[] = $url_path = $this->base->strip_host($uploads_url);
			$this->self_regex[] = $this->make_url_regex($uploads_url, $url_path);
		}
		if ( strlen($content_url) <= 1 && false === strpos($content_url, $this->wpurl) ) {
			$this->self_dir[] = trailingslashit(str_replace('\\', '/', WP_CONTENT_DIR));
			$this->self_url[] = $content_url;
			$this->self_url_path[] = $url_path = $this->base->strip_host($content_url);
			$this->self_regex[] = $this->make_url_regex($content_url, $url_path);
		}
		if ($this->wpurl) {
			$this->self_dir[] = str_replace('\\', '/', ABSPATH);
			$this->self_url[] = $this->wpurl;
			$this->self_url_path[] = $url_path = $this->base->strip_host($this->wpurl);
			$this->self_regex[] = $this->make_url_regex($this->wpurl, $url_path);
		}
	} else { // WordPress MU

122行目
	}

タグ: , ,
カテゴリー: WordPress, 携帯サイト
コメント: コメントはまだありません »

簡単なjQueryのタブ切替サンプル【複数版】

2010年 8月 23日 (月) / AM 11:46

簡単なアコーディオン処理の記事に「CSSもjsも(タブの)数を増やしても変更しなくていい」サンプルが無いかとコメントが来ていたので考えてみた。
簡単なタブ切替処理のサンプル【複数のタブに対応】

以下、サンプルの解説。
(続きを読む…)

タグ:
カテゴリー: jQuery
コメント: コメント 3 件 »

WordPressのコンテンツを静的ページ内に設置する

2010年 8月 4日 (水) / PM 4:35

   <ul id="blog">
    <?php
        require('../blog/wp-blog-header.php');
        switch_to_blog(2); // サイトIDを指定

        $posts = get_posts();
        foreach ($posts as $post):
        setup_postdata($post);
    ?>
    <li><div class="blog_title"> [ <?php the_time('Y.m.d') ?> ] <a href="<?php the_permalink() ?>"><?php the_title() ?></a></div><?php the_content(); ?></li>
    <?php endforeach; ?>
    <li></li>
   </ul>

カテゴリー: WordPress
コメント: コメントはまだありません »

wp3.0携帯投稿設定

2010年 7月 16日 (金) / PM 12:00

WordPressのネットワークを使った場合、メール投稿用の設定が特権管理者のみ変更できるようになるようで、その設定場所

特権管理者 > サイト > 編集 >

Mailserver Url

Mailserver Login

Mailserver Pass

Mailserver Port

カテゴリー: WordPress
コメント: コメントはまだありません »

WordPressのカレンダーの土日に色付け

2010年 7月 10日 (土) / AM 10:57

日曜始まりのカレンダーを対象

        <script type="text/javascript">
			$(document).ready(
				function(){
					$('#wp-calendar th:first , #wp-calendar tbody tr td:first-child:not(.pad)').addClass("sunday");
					$('#wp-calendar th:last , #wp-calendar tbody tr td:last-child:not(.pad)').addClass("saturday");
				});
        </script>

カテゴリー: jQuery, WordPress
コメント: コメントはまだありません »