フォーラムへの返信

4件の返信を表示中 - 16 - 19件目 (全19件中)
  • フォーラム: 使い方全般
    返信が含まれるトピック: widget レイアウト
    トピック投稿者 ysjack

    (@ysjack)

    難解な原因が判明しました。
    Artisteerの場合widgetの書き出しを独自のファンクションで行っていました。

    <?php if (!art_sidebar(1)): ?>
    <?php endif ?>

    サイドバーへのCSSの管理も「Block」がリードしています。
    !art_sidebar 
    ————————————

    function art_sidebar($index = 1)
    {
    	if (!function_exists('dynamic_sidebar')) return false;
    	ob_start();
    	$success = dynamic_sidebar($index);
    	$content = ob_get_clean();
    	if (!$success) return false;
    	$content = art_normalize_widget_style_tokens($content);
    	$replaces = array(
    		'<!--- BEGIN Widget --->' => "<div class=\"Block\">\r\n    <div class=\"Block-body\">\r\n",
    		'<!--- BEGIN WidgetTitle --->' => "<div class=\"BlockHeader\">\r\n    <div class=\"header-tag-icon\">\r\n        <div class=\"BlockHeader-text\">\r\n",
    		'<!--- END WidgetTitle --->' => "\r\n        </div>\r\n    </div>\r\n    <div class=\"l\"></div>\r\n    <div class=\"r\"><div></div></div>\r\n</div>\r\n",
    		'<!--- BEGIN WidgetContent --->' => "<div class=\"BlockContent\">\r\n    <div class=\"BlockContent-body\">\r\n",
    		'<!--- END WidgetContent --->' => "\r\n    </div>\r\n</div>\r\n",
    		'<!--- END Widget --->' => "\r\n    </div>\r\n</div>\r\n"
    	);
    	$bwt = '<!--- BEGIN WidgetTitle --->';
    	$ewt = '<!--- END WidgetTitle --->';
    	if ('' == $replaces[$bwt] && '' == $replaces[$ewt]) {
    		$startTitle = 0;
    		$endTitle = 0;
    		$result = '';
    		while (true) {
    			$startTitle = strpos($content, $bwt, $endTitle);
    			if (false == $startTitle) {
    				$result .= substr($content, $endTitle);
    				break;
    			}
    			$result .= substr($content, $endTitle, $startTitle - $endTitle);
    			$endTitle = strpos($content, $ewt, $startTitle);
    			if (false == $endTitle) {
    				$result .= substr($content, $startTitle);
    				break;
    			}
    			$endTitle += strlen($ewt);
    		}
    		$content = $result;
    	}
    	$content = str_replace(array_keys($replaces), array_values($replaces), $content);
    	echo $content;
    	return true;
    }

    —————————
    このような感じです。
    私が「!art_sidebar 」をWPのファンクションタグと思って探していた為
    答えが見つからなかったようです。^^;

    なのでこの!art_sidebarを消して通常のWPのwidgetファンクション

    <?php if ( function_exists('dynamic_sidebar')): ?>
    <?php endif ?>

    で書き込んで
    CSSで「display:inline;」としてやればよいのですよね?

    <?php if ( !function_exists('dynamic_sidebar') ||
                      !dynamic_sidebar('1') ) :?>
    <?php endif ?>

    と書き込んでいますが、エラーにはならない物の何も表示されません。^^;
    この書式間違っていますでしょうか?
    引き続きご教授お願い致します。

    フォーラム: 使い方全般
    返信が含まれるトピック: widget レイアウト
    トピック投稿者 ysjack

    (@ysjack)

    ご指南ありがとうございます。
    私もテンプレート自体は私なりにチョコチョコ勉強しているのですが^^;

    今回は「Artisteer 2」を使ってオリジナルを作ってみました。
    http://pr4u.bz/MNT/
    これがそのテーマです。
    Artisteer は他のブログも発行できることが前提なので各セクションのタグが見慣れないものになっています。
    ページ下部の「Pages」「Archives」がWPのwidgetです。2.7.1の標準装備のものです。
    引き続きアドバイス頂ければうれしいです。

    まだまだ勉強中のものですが、よろしくお願い致します。

    フォーラム: 使い方全般
    返信が含まれるトピック: ページごとに異なるサイドバー

    こんなのありますよ
    http://www.thaslayer.com/free-plugins/
    ページ、記事、カテゴリーなど細かく表示できるwidgetを切り替えることが可能です。

    ただし、WP2.6.5でしか検証していません。
    プラグインのバージョンの関係で私は2.7を断念していて
    わざわざこれらのプラグインを使いたいがために2.6.5に戻しました。

    おためしあれ。

    こんなのありますが・・・

    http://wpremix.com/

4件の返信を表示中 - 16 - 19件目 (全19件中)