eijiy
フォーラムへの返信
-
フォーラム: プラグイン
返信が含まれるトピック: DC’s nicer archives の EXPAND が作動しない返信有難うござます。
まず検索では上手くいっています。
それからカテゴリは紹介して頂いたコードで親カテゴリの総合は表示されませんが、その下のカテゴリは表示されるようになったので助かりました。残った問題は、月別のアーカイブはタイトルと親カテゴリーが一緒に一覧表示されますが、EXPAND が機能しません。
またカレンダーの日付をクリックすると一件表示されますが、こちらも EXPAND が機能しません。ただこの場合、出来れば開いた状態で普通に表示したい。
あとカテゴリにも EXPAND 機能を使えたらいのですが可能でしょうか。宜しくお願いします。
フォーラム: プラグイン
返信が含まれるトピック: DC_nicer_archivesフォーラム: テーマ
返信が含まれるトピック: default で検索結果のページにサイドバーを表示させたいkz さん、教えて頂いた方法ではどうしても上手くいきませんでした。
貴重な時間を割いて、折角教えて頂いたのに生かしきれずに申し訳ありません。
それで代案を検索したところカナログさんのブログで「WordPress2.7のデフォルトテーマを3カラムにする~ソース編~」というのをみて、以下の様にして上手くいきました。
sidebar.phpを以下内容に書き換え
01 <div id=”sidebar”>
02 <ul class=”sidebar1″>
03 <?php if ( !function_exists(‘dynamic_sidebar’)
04
05 || !dynamic_sidebar(‘sidebar1’) ) : ?>
06 <?php endif; ?>
07
08 <ul class=”sidebar2″>
09 <?php if ( !function_exists(‘dynamic_sidebar’)
10
11 || !dynamic_sidebar(‘sidebar2’) ) : ?>
12 <?php endif; ?>
13
14 </div>
functions.phpの部分をを以下内容に書き換え
01 if ( function_exists(‘register_sidebar’) )
02 register_sidebar(array(‘name’=>’sidebar1’,
03 ‘before_widget’ => ‘<li id=”%1$s” class=”widget %2$s”>’,
04 ‘after_widget’ => ”,
05 ‘before_title’ => ‘<h2 class=”widgettitle”>’,
06 ‘after_title’ => ‘</h2>’,
07 ));
08 register_sidebar(array(‘name’=>’sidebar2’,
09 ‘before_widget’ => ‘<li id=”%1$s” class=”widget %2$s”>’,
10 ‘after_widget’ => ”,
11 ‘before_title’ => ‘<h2 class=”widgettitle”>’,
12 ‘after_title’ => ‘</h2>’,
13 )); }
後は css 調整して2列のサイドバーが出来ました。
この度はお世話になり有難うございました。また宜しくお願いいたします。フォーラム: テーマ
返信が含まれるトピック: default で検索結果のページにサイドバーを表示させたい一歩前進です。
サイドバー1は表示されるようになりました。
原因はシングルページの content に css でセンター配置にしてあった為、カラム落ちしていたのを見逃していたようです。
しかしサイドバー2は表示されません。
それからダッシュボードでウィジェットを見るとサイドバーが1,2,3,4と4っつもありました。
これはどういうことでしょうか。長い事申し訳ありませんがもう少しお付き合いください。宜しくお願いします。フォーラム: テーマ
返信が含まれるトピック: default で検索結果のページにサイドバーを表示させたいやっぱり駄目ですね。
そこで新規の default の single.php の <?php get_footer(); ?> の上に <?php get_sidebar(); ?> を追加してみましたが、シングルページはサイドバーがないですね。フォーラム: テーマ
返信が含まれるトピック: default で検索結果のページにサイドバーを表示させたいタイトルの背景がアップできませんでしたが、http://eiji.in/wp/こちらの総合をクリックしタイトルをクリックしてみてください。
宜しくお願いします。フォーラム: テーマ
返信が含まれるトピック: default で検索結果のページにサイドバーを表示させたい返信有難うございます。
3カラムは default の functions.php の以下の部分をコメントアウトして
/*if ( function_exists(‘register_sidebar’) ) {
register_sidebar(array(
‘before_widget’ => ‘<li id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ”,
‘before_title’ => ‘<h2 class=”widgettitle”>’,
‘after_title’ => ‘</h2>’,
));
}*/
その下に以下のコードを入れました。
if ( function_exists(‘register_sidebar’) ) {
register_sidebar(array(
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h2 class=”widgettitle”>’,
‘after_title’ => ‘</h2>’,
));
register_sidebar(array(
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h2 class=”widgettitle”>’,
‘after_title’ => ‘</h2>’,
));
}
それから sidebar.php のコードをコピーしてそのまま最終行に貼り付け以下の様にしました。
<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/
?>
<div id=”sidebar” role=”complementary”>-
<?php /* Widgetized sidebar, if you have the plugin installed. */
- <?php get_search_form(); ?>
- <h2><?php _e(‘Author’, ‘kubrick’); ?></h2>
<p>A little something about you, the author. Nothing lengthy, just an overview.</p> -
<?php /* If this is a 404 page */ if (is_404()) { ?>
<?php /* If this is a category archive */ } elseif (is_category()) { ?>
<p><?php printf(__(‘You are currently browsing the archives for the %s category.’, ‘kubrick’), single_cat_title(”, false)); ?></p><?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<p><?php printf(__(‘You are currently browsing the %2$s blog archives for the day %3$s.’, ‘kubrick’), get_bloginfo(‘url’), get_bloginfo(‘name’), get_the_time(__(‘l, F jS, Y’, ‘kubrick’))); ?></p><?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<p><?php printf(__(‘You are currently browsing the %2$s blog archives for %3$s.’, ‘kubrick’), get_bloginfo(‘url’), get_bloginfo(‘name’), get_the_time(__(‘F, Y’, ‘kubrick’))); ?></p><?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<p><?php printf(__(‘You are currently browsing the %2$s blog archives for the year %3$s.’, ‘kubrick’), get_bloginfo(‘url’), get_bloginfo(‘name’), get_the_time(‘Y’)); ?></p><?php /* If this is a search result */ } elseif (is_search()) { ?>
<p><?php printf(__(‘You have searched the %2$s blog archives for ‘%3$s’. If you are unable to find anything in these search results, you can try one of these links.’, ‘kubrick’), get_bloginfo(‘url’), get_bloginfo(‘name’), wp_specialchars(get_search_query(), true)); ?></p><?php /* If this set is paginated */ } elseif (isset($_GET[‘paged’]) && !empty($_GET[‘paged’])) { ?>
<p><?php printf(__(‘You are currently browsing the %2$s blog archives.’, ‘kubrick’), get_bloginfo(‘url’), get_bloginfo(‘name’)); ?></p><?php } ?>
if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar() ) : ?><!– Author information is disabled per default. Uncomment and fill in your details if you want to use it.
–>
<?php if ( is_404() || is_category() || is_day() || is_month() ||
is_year() || is_search() || is_paged() ) {
?><?php }?>
<ul role=”navigation”>
<?php wp_list_pages(‘title_li=<h2>’ . __(‘Pages’, ‘kubrick’) . ‘</h2>’ ); ?>- <h2><?php _e(‘Archives’, ‘kubrick’); ?></h2>
-
<?php wp_get_archives(‘type=monthly’); ?>
<?php wp_list_categories(‘show_count=1&title_li=<h2>&order=desc’ . __(‘Categories’, ‘kubrick’) . ‘</h2>’); ?>
-
<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
- <h2><?php _e(‘Meta’, ‘kubrick’); ?></h2>
<?php wp_list_bookmarks(); ?>-
<?php wp_register(); ?>
- <?php wp_loginout(); ?>
- “><?php _e(‘Valid <abbr title=”eXtensible HyperText Markup Language”>XHTML</abbr>’, ‘kubrick’); ?>
- <abbr title=”<?php _e(‘XHTML Friends Network’, ‘kubrick’); ?>”><?php _e(‘XFN’, ‘kubrick’); ?></abbr>
- “>WordPress
<?php wp_meta(); ?>
<?php } ?>
<?php endif; ?>
</div><!–sidebar–>
<div id=”sidebar2″ role=”complementary”>
-
<?php /* Widgetized sidebar, if you have the plugin installed. */
- <?php get_search_form(); ?>
- <h2><?php _e(‘Author’, ‘kubrick’); ?></h2>
<p>A little something about you, the author. Nothing lengthy, just an overview.</p> -
<?php /* If this is a 404 page */ if (is_404()) { ?>
<?php /* If this is a category archive */ } elseif (is_category()) { ?>
<p><?php printf(__(‘You are currently browsing the archives for the %s category.’, ‘kubrick’), single_cat_title(”, false)); ?></p><?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<p><?php printf(__(‘You are currently browsing the %2$s blog archives for the day %3$s.’, ‘kubrick’), get_bloginfo(‘url’), get_bloginfo(‘name’), get_the_time(__(‘l, F jS, Y’, ‘kubrick’))); ?></p><?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<p><?php printf(__(‘You are currently browsing the %2$s blog archives for %3$s.’, ‘kubrick’), get_bloginfo(‘url’), get_bloginfo(‘name’), get_the_time(__(‘F, Y’, ‘kubrick’))); ?></p><?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<p><?php printf(__(‘You are currently browsing the %2$s blog archives for the year %3$s.’, ‘kubrick’), get_bloginfo(‘url’), get_bloginfo(‘name’), get_the_time(‘Y’)); ?></p><?php /* If this is a search result */ } elseif (is_search()) { ?>
<p><?php printf(__(‘You have searched the %2$s blog archives for ‘%3$s’. If you are unable to find anything in these search results, you can try one of these links.’, ‘kubrick’), get_bloginfo(‘url’), get_bloginfo(‘name’), wp_specialchars(get_search_query(), true)); ?></p><?php /* If this set is paginated */ } elseif (isset($_GET[‘paged’]) && !empty($_GET[‘paged’])) { ?>
<p><?php printf(__(‘You are currently browsing the %2$s blog archives.’, ‘kubrick’), get_bloginfo(‘url’), get_bloginfo(‘name’)); ?></p><?php } ?>
if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(2) ) : ?><!– Author information is disabled per default. Uncomment and fill in your details if you want to use it.
–>
<?php if ( is_404() || is_category() || is_day() || is_month() ||
is_year() || is_search() || is_paged() ) {
?><?php }?>
<ul role=”navigation”>
<?php wp_list_pages(‘title_li=<h2>’ . __(‘Pages’, ‘kubrick’) . ‘</h2>’ ); ?>- <h2><?php _e(‘Archives’, ‘kubrick’); ?></h2>
-
<?php wp_get_archives(‘type=monthly’); ?>
<?php wp_list_categories(‘show_count=1&title_li=<h2>&order=desc’ . __(‘Categories’, ‘kubrick’) . ‘</h2>’); ?>
-
<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
- <h2><?php _e(‘Meta’, ‘kubrick’); ?></h2>
<?php wp_list_bookmarks(); ?>-
<?php wp_register(); ?>
- <?php wp_loginout(); ?>
- “><?php _e(‘Valid <abbr title=”eXtensible HyperText Markup Language”>XHTML</abbr>’, ‘kubrick’); ?>
- <abbr title=”<?php _e(‘XHTML Friends Network’, ‘kubrick’); ?>”><?php _e(‘XFN’, ‘kubrick’); ?></abbr>
- “>WordPress
<?php wp_meta(); ?>
<?php } ?>
<?php endif; ?>
</div><!–sidebar2–>
最後に各 index.php archive.php single.php の <?php get_sidebar(); ?> の下に <?php get_sidebar(2); ?> 追加しました。
これで固定ページもアーカイブページもサイドバーは表示されていたんですが間違っていますか。
宜しくお願いします。フォーラム: テーマ
返信が含まれるトピック: default theme の背景画像を全て取り除きたい自己解決しました。
方法は、header.php の <head> ~ </head> 間にある stylesheet をコメントアウトか削除して、後は css で好きにデザインすればいい様です。フォーラム: プラグイン
返信が含まれるトピック: Breadcrumb NavXT 3.4.1kz さん、kvex さん、お陰さまで解決できました。
結果、固定ページ用に page.php の content 開始タグの直下に <div class=”breadcrumb”> を配置して、それ以外のカテゴリー、月、日の時系列用に archive.php の content タグ内の上下に <div class=”breadcrumb”> を配置して上手くいきました。
この度はお世話になりました、有難うございました。また教えて下さい。失礼します。フォーラム: プラグイン
返信が含まれるトピック: Breadcrumb NavXT 3.4.1kvexさん、返信有難うございます。
archive.php のところに
<div class=”breadcrumb”>
<div id=”content” class=”narrowcolumn” role=”main”>
<div class=”breadcrumb_top”>
と試してみましたが、やっぱり言われた事が解っていないようです。
具体的にどこに入れたらいいのでしょうか。
宜しくお願いします。
archive.php のコードは以下のとおりです。
<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/get_header();
?><div class=”breadcrumb”>
<?php
if(function_exists(‘bcn_display’))
{
bcn_display();
}
?>
</div><div id=”content” class=”narrowcolumn” role=”main”>
<div class=”breadcrumb_top”>
<?php
if(function_exists(‘bcn_display’))
{
bcn_display();
}
?>
</div><?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h2 class=”pagetitle”><?php printf(__(‘Archive for the ‘%s’ Category’, ‘kubrick’), single_cat_title(”, false)); ?></h2>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<h2 class=”pagetitle”><?php printf(__(‘Posts Tagged ‘%s’’, ‘kubrick’), single_tag_title(”, false) ); ?></h2>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h2 class=”pagetitle”><?php printf(_c(‘Archive for %s|Daily archive page’, ‘kubrick’), get_the_time(__(‘F jS, Y’, ‘kubrick’))); ?></h2>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h2 class=”pagetitle”><?php printf(_c(‘Archive for %s|Monthly archive page’, ‘kubrick’), get_the_time(__(‘F, Y’, ‘kubrick’))); ?></h2>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h2 class=”pagetitle”><?php printf(_c(‘Archive for %s|Yearly archive page’, ‘kubrick’), get_the_time(__(‘Y’, ‘kubrick’))); ?></h2>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h2 class=”pagetitle”><?php _e(‘Author Archive’, ‘kubrick’); ?></h2>
<?php /* If this is a paged archive */ } elseif (isset($_GET[‘paged’]) && !empty($_GET[‘paged’])) { ?>
<h2 class=”pagetitle”><?php _e(‘Blog Archives’, ‘kubrick’); ?></h2>
<?php } ?><div class=”navigation”><!–breadcrumbとwp-pagenaviを使う為にdefaultをコメントアウト
<div class=”alignleft”>
<?php next_posts_link(__(‘« Older Entries’, ‘kubrick’)); ?>
</div>
<div class=”alignright”>
<?php previous_posts_link(__(‘Newer Entries »’, ‘kubrick’)); ?>
</div>
ここまでコメントアウト–><?php if(function_exists(‘wp_pagenavi’)) { wp_pagenavi(); } ?>
</div>
<?php while (have_posts()) : the_post(); ?>
<div <?php post_class(); ?>>
<h3 id=”post-<?php the_ID(); ?>”>” rel=”bookmark” title=”<?php printf(__(‘Permanent Link to %s’, ‘kubrick’), the_title_attribute(‘echo=0’)); ?>”><?php the_title(); ?></h3>
<small><?php the_time(__(‘l, F jS, Y’, ‘kubrick’)) ?></small><div class=”entry”>
<?php the_content() ?>
</div><p class=”postmetadata”><?php the_tags(__(‘Tags:’, ‘kubrick’), ‘, ‘, ‘
‘); ?> <?php printf(__(‘Posted in %s’, ‘kubrick’), get_the_category_list(‘, ‘)); ?> | <?php edit_post_link(__(‘Edit’, ‘kubrick’), ”, ‘ | ‘); ?> <?php comments_popup_link(__(‘No Comments »’, ‘kubrick’), __(‘1 Comment »’, ‘kubrick’), __(‘% Comments »’, ‘kubrick’), ”, __(‘Comments Closed’, ‘kubrick’) ); ?></p></div>
<?php endwhile; ?>
<div class=”navigation”>
<!–breadcrumbとwp-pagenaviを使う為にdefaultをコメントアウト
<div class=”alignleft”><?php next_posts_link(__(‘« Older Entries’, ‘kubrick’)); ?></div>
<div class=”alignright”><?php previous_posts_link(__(‘Newer Entries »’, ‘kubrick’)); ?></div>
–><?php if(function_exists(‘wp_pagenavi’)) { wp_pagenavi(); } ?>
</div>
<?php else :
if ( is_category() ) { // If this is a category archive
printf(“<h2 class=’center’>”.__(“Sorry, but there aren’t any posts in the %s category yet.”, ‘kubrick’).'</h2>’, single_cat_title(”,false));
} else if ( is_date() ) { // If this is a date archive
echo(‘<h2>’.__(“Sorry, but there aren’t any posts with this date.”, ‘kubrick’).'</h2>’);
} else if ( is_author() ) { // If this is a category archive
$userdata = get_userdatabylogin(get_query_var(‘author_name’));
printf(“<h2 class=’center’>”.__(“Sorry, but there aren’t any posts by %s yet.”, ‘kubrick’).”</h2>”, $userdata->display_name);
} else {
echo(“<h2 class=’center’>”.__(‘No posts found.’, ‘kubrick’).'</h2>’);
}
get_search_form();
endif;
?></div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
フォーラム: プラグイン
返信が含まれるトピック: Breadcrumb NavXT 3.4.1何度もすみません。
パンくずはarchive.phpのcontent直下にあります。archive.phpに設置する事が間違いではないかと思いheader.phpに設置しても変わりません。
宜しくお願いします。フォーラム: プラグイン
返信が含まれるトピック: Breadcrumb NavXT 3.4.1kzさん、返信ありがとうございます。
問題の発生しているURLはhttp://eiji.in/wp/です。トップページと自己紹介のページのナビゲーションの表示位置や文字のサイズをカテゴリーのナビゲーションと同じようにしたいのです。
宜しくお願いします。