• 解決済 ebuild

    (@ebuild)


    テーマprimepressで、サイトタイトルを画像に変えるところで困っています。
    テーマディレクトリーない、imagesフォルダー>*****.gif(よこ347pix タテ38pix)
    を貼り付けたいと思っています。ご教授,よろしくお願いします。

    ■ header.php ■

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;

    <html xmlns=”http://www.w3.org/1999/xhtml”&gt;

    <head profile=”http://gmpg.org/xfn/11″&gt;

    <title><?php wp_title(‘ ‘); ?> <?php if(wp_title(‘ ‘, false)) { echo ‘–’; } ?> <?php bloginfo(‘name’); ?></title>

    <meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />

    <meta name=”generator” content=”WordPress <?php bloginfo(‘version’); ?>” /> <!– leave this for stats please –>

    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />

    <link rel=”stylesheet” href=”<?php bloginfo(‘template_url’); ?>/custom.css” type=”text/css” media=”screen” />

    <!–[if lte IE 7]>

    <link rel=”stylesheet” type=”text/css” href=”<?php bloginfo(‘template_url’); ?>/css/ie7.css” />

    <![endif]–>

    <!–[if lt IE 6]>

    <link rel=”stylesheet” type=”text/css” href=”<?php bloginfo(‘template_url’); ?>/css/ie6-.css” />

    <![endif]–>

    <link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”<?php bloginfo(‘rss2_url’); ?>” />

    <link rel=”alternate” type=”text/xml” title=”RSS .92″ href=”<?php bloginfo(‘rss_url’); ?>” />

    <link rel=”alternate” type=”application/atom+xml” title=”Atom 0.3″ href=”<?php bloginfo(‘atom_url’); ?>” />

    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />

    <?php wp_head(); ?>

    </head>

    <body class=”custom”>

    <div id=”page” class=”hfeed”>

    <div id=”header”>

    <div id=”branding”>

    <?php if (is_home()) { ?>

    <h1 class=”homelink”>” title=”<?php bloginfo(‘name’); ?>”><?php bloginfo(‘name’); ?></h1>

    <p class=”description”><?php bloginfo(‘description’); ?></p>

    <?php } else { ?>

    <div class=”homelink”>” title=”<?php bloginfo(‘name’); ?>”><?php bloginfo(‘name’); ?></div>

    <p class=”description”><?php bloginfo(‘description’); ?></p>

    <?php } ?>

    </div>

    <div id=”skip”>Skip to Content ↓</div>

    <ul class=”menu”>

    <?php include (TEMPLATEPATH . ‘/main-menu.php’); ?>

    </div><!–#header–>

    <div id=”container”>

    <div id=”rotating”>

    <?php include (TEMPLATEPATH . ‘/rotating.php’); ?>

    </div>

    ■ style.css ■

    /*

    Theme Name: PrimePress

    Theme URI:

    Description: A 3-column

    Author: Ravi Varma

    Author URI:

    Version: 1.1.1

    Tags: fixed width, 3 columns, widgets, right sidebar, microformats, white, blue

    */

    /* http://meyerweb.com/eric/tools/css/reset/ */

    /* v1.0 | 20080212 */

    html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code,

    del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li,

    fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td

    {margin:0; padding:0; border:0; outline:0; font-size:100%; vertical-align:baseline; background:transparent;}

    ol, ul {list-style: none;}

    blockquote, q {quotes: none;}

    blockquote:before, blockquote:after, q:before, q:after {content: ”; content: none;}

    /* remember to define focus styles! */

    :focus {outline: 0;}

    /* tables still need ‘cellspacing=”0″‘ in the markup */

    table {border-collapse: collapse; border-spacing: 0;}

    body {font-family:verdana, ‘Lucida Grande’, arial, sans-serif; font-size:62.5%; text-align:center; line-height:1.3; background:#fff;}

    /*—–layout—–*/

    #page {width:960px; margin:0 auto; text-align:left; color:#111;}

    #header{width:960px; float:left; position:relative;}

    #container{width:920px; float:left; padding:0 19px; background:#fff;}

    #rotating{width:920px; float:left; padding:19px 0; border-top:1px solid #ccc; border-bottom:1px solid #ccc;}

    #primary{width:480px; float:left; padding:0 19px 0 0;}

    #secondary{width:421px; float:left;}

    #sidebar-1{border-left:1px solid #ccc;}

    .sidebar{float:left; width:200px; padding:10px 0 0 10px;}

    #footer{width:920px; float:left; clear:both;}

    /*—–header—–*/

    .homelink{font:small-caps bold 35px/1 ‘trebuchet ms’, verdana, arial, sans-serif; letter-spacing:-0.5px; padding:40px 0 10px 19px;}

    .homelink a{color:#444;}

    .homelink a:hover{color:#000; text-decoration:none;}

    .description{color:#666; margin-top:-10px; padding:0 0 10px 20px; font-size:13px; line-height:1; font-style:italic;}

    #skip a{padding:0.2em 0.3em; font-weight:bold; background:#e5e5e5; color:#444; display:block; text-decoration:none; position:absolute; top:0.5em; right:999em;}

    #skip a:first-letter{text-decoration:underline;}

    #skip a:hover{background:#ddd;}

    /*-main-menu*/

    ul.menu{position:absolute; bottom:0; right:25px; padding:5px 10px 0;}

    ul.menu li{float:left; margin:0 0 0 5px; background:#777; font:bold 11px/1 ‘trebuchet ms’, arial, sans-serif;}

    ul.menu li a{display:block; color:#fff; padding:5px 10px;}

    ul.menu li a:hover{text-decoration:none; background:#888;}

    ul.menu li.current_page_item a{color:#444; background:#ccc; }

    /*—–Generic Styles—–*/

    b, strong{font-weight:bold;}

    i, em, dfn{font-style:italic;}

    dfn{font-weight:bold;}

    abbr, acronym{border-bottom:1px solid #ddd;}

    sup, sub{font-size:0.7692em; line-height:1;}

    sup{vertical-align:super;}

    sub{vertical-align:sub;}

    del{text-decoration:line-through;}

    u, ins{text-decoration:underline;}

    pre, code, tt{font:1em/1.5385 consolas, ‘Courier New’, Courier, Monospace;}

    pre{margin:0 0 1.5385em; padding:0.7692em 10px; border:1px solid #ddd; overflow:auto;}

    hr{background:#ccc; color:#ccc; clear:both; float:none; width:100%; height:0.1em; margin:0 0 1.5385em; border:none;}

    blockquote{margin:0 0 1.5385em; padding:0 0 0 40px; color:#555; background:url(‘images/quote.gif’) no-repeat;}

    /*—–headings—–*/

    h1, h2, h3, h4, h5, h6{font-weight:normal; font-family:’trebuchet MS’, verdana, arial, sans-serif; letter-spacing:-0.3px;}

    .entry-title, .page-title{font-size:2.2em; line-height:1; margin:0.9091em 0 0;}

    .page .entry-title, .page-template .entry-title{text-align:center;}

    .page-title{text-align:center; margin-bottom:0.9091em;}

    .sidebar h2{font-size:1.5em;}

    .entry-content h1, .entry-content h2{font-size:1.5385em; line-height:1; margin:1.5em 0 0.5em;}

    .entry-content h3{font-size:1.3846em; line-height:1.1111; margin:1.66665em 0 0.55555em;}

    .entry-content h4{font-size:1.2308em; font-weight:bold; line-height:1.25; margin:1.875em 0 0.625em;}

    .entry-content h5, .entry-content h6{font-size:1em; font-weight:bold; margin:2.30775em 0 0.76925em;}

    /*—–content—–*/

    .looped .entry, .single .entry{border-bottom:1px dashed #ddd;}

    .entry-content{font-size:1.3em; line-height:1.5385; margin:1.5385em 0 0;}

    .entry-content p{margin:0 0 1.5385em;}

    .entry-content li ul{margin:0 0 0 30px;}

    .entry-content li ol{margin:0.5385em 0 0.9999em 30px;}

    .entry-content ul, .entry-content ol{margin:0 0 1.5385em 30px;}

    .entry-content ul{list-style-type:disc;}

    .entry-content li ul{list-style-type:circle;}

    .entry-content ol{list-style-type:decimal;}

    .entry-content li ol{list-style-type:upper-alpha;}

    .entry-content dl{margin:0 0 1.5385em;}

    .entry-content dl dt{font-weight:bold;}

    .entry-content dd{margin:0 0 1.5385em;}

    .entry-content address{margin:0 0 1.5385em; font-style:italic;}

    /*-post info*/

    .entry-byline{color:#777; font:italic 1.1em ‘trebuchet ms’, sans-serif;}

    .entry-byline address{display:inline;}

    .entry-meta{margin:2.4999em 0 0.8333em; font:italic 1.2em/1.6666 ‘trebuchet ms’, sans-serif; color:#555;}

    /*-images*/

    img.alignleft, div.alignleft{margin:0 15px 3px 0; display:inline;}

    img.alignright, div.alignright{margin:0 0 3px 15px; display:inline;}

    .aligncenter, div.aligncenter {display:block; margin:0 auto 1.5385em;}

    img.border{padding:4px; border:1px solid #ccc; background:#eee;}

    .alignleft{float:left;}

    .alignright{float:right;}

    .center{text-align:center;}

    .wp-caption {text-align:center; padding-top:4px;}
    .wp-caption img {margin:0; padding:0; border:0 none;}
    .wp-caption p.wp-caption-text {color:#555; padding:4px; margin:0; font:italic 0.923em/1.6666em ‘trebuchet ms’, verdana, sans-serif;}

    /*-Gallery*/

    .entry-content .attachment a,

    .entry-content .gallery a,

    .entry-content .attachment a:hover,

    .entry-content .gallery a:hover {border:none;}

    .attachment img, .attachment-thumbnail, .entry-content .gallery img{padding:2px; border:1px solid #ccc;}

    .attachment img:hover, .attachment-thumbnail:hover, .entry-content .gallery img:hover{border:1px solid #888;}

    img.attachment-thumbnail{width:147px;}

    .attachment{text-align:center;}

    /*-tables*/

    .entry-content table{margin:0 0 1.5385em; border-collapse:collapse; border:1px solid #ccc; color:#444; width:80%;}

    .entry-content th{font-weight:bold; background:#ccc;}

    .entry-content th, .entry-content td{padding:0.2em 10px;}

    .entry-content td{border:1px solid #ccc;}

    .entry-content tbody tr:hover{background:#ddd;}

    .entry-content tfoot{background:#ddd;}

    /*—–sidebar—–*/

    /*-Feed*/

    #rss-links{height:32px; border-top:1px solid #aaa; border-bottom:1px solid #aaa; margin:0 0 1em 0; background:#ccc url(images/rss2.png) no-repeat 2% 47%;}

    #rss-links p{margin:0 0 0 65px; padding:8px 5px; font:bold 13px ‘trebuchet ms’, verdana, sans-serif;}

    /*-search*/

    div#search{height:22px; border-top:1px solid #aaa; border-bottom:1px solid #aaa; margin:0 0 1em 0; background:#ccc; padding:5px 5px 5px 6px;}

    #s-input{border:1px solid #fff; margin-right:4px; font-size:12px; height:16px; padding:2px; vertical-align:top;}

    .entry #s-input{border-color:#888;}

    #submit, #s-submit{border:1px solid #555; background:#555; color:#ddd; cursor:pointer; font-size:12px; height:22px; font-weight:bold; font-variant:small-caps;}

    #submit:hover, #s-submit:hover{color:#fff;}

    #s-input, #submit, #s-submit{font-family:arial, sans-serif;}

    /*-widgets*/

    .widget {font-size:1.2em; line-height:1.5; margin:0 0 1.25em; padding:5px 5px 5px 0; background:#eee;}

    .widget li{margin:0.1667em 0; padding:0 0 0 15px;}

    .widget h2{padding:0 0 0 10px; line-height:1.3; color:#555; font-variant:small-caps; font-weight:bold;}

    #recent-posts li, #recent-comments li, .widget_rss li{background: url(images/bullet.gif) 0 0.55em no-repeat;}

    /*-calendar*/

    #wp-calendar{width:95%; margin:0 auto;}

    #wp-calendar caption{font-weight:bold;}

    #wp-calendar th{background:#ccc;}

    #wp-calendar th, #wp-calendar td{text-align:center; padding:0.25em 0;}

    #wp-calendar td{font-size:0.9em; color:#666;}

    #wp-calendar a{font-weight:bold;}

    /*—–navigation—–*/

    .navigation{font-size:1.1em; text-align:center; padding:1.8181em 0;}

    .navleft, .gnavleft{float:left; width:50%; text-align:left;}

    .navright, .gnavright{float:right; width:50%; text-align:right;}

    .gnavigation{padding:0 0 2em;}

    /*—–footer—–*/

    #footer{margin:0 0 10px; border-top:1px solid #ccc; border-bottom:1px solid #ccc; padding:20px 0; font:12px/20px ‘trebuchet ms’, verdana, snas-serif;}

    #footer .left{width:50%; float:left; text-align:left;}

    #footer .right{width:50%; float:right; text-align:right;}

    .clear{margin:0; padding:0; clear:both;}

    /*—–comments—–*/

    #comments{width:480px;}

    .nocomments{text-align:center; padding:1.25em 0; font-size:1.6em; border-top:1px dashed #ddd;}

    #comments h3{font-size:2em; font-weight:normal; line-height:1;}

    h3.comments-number{margin:0 auto 1.5em; padding-top:1em; border-top:1px dashed #ddd;}

    h3#respond{margin:0 0 0.5em;}

    .commentlist{margin:0 0 4em;}

    .commentlist li{margin:0 0 1em; padding:0.5em 5px; position:relative;}

    .ccount{font-size:1.3em; position:absolute; right:10px;}

    .commentauthor{font:bold 1.5em/1 ‘trebuchet ms’, arial, sans-serif;}

    .comment-meta{font:italic 1.1em ‘trebuchet ms’, arial, sans-serif; color:#777;}

    .comment-content{font-size:1.1em; line-height:1.8181; color:#222;}

    .comment-content p{margin:1.8181em 5px 1.8181em 0;}

    .alt{background:#ececec;}

    .authorcomment{background:#ddd;}

    .avatar{float:left; padding-right:7px;}

    /*-commentforms*/

    #commentform{margin:0 0 4em 0;}

    #commentform p{margin:0 0 1em 0;}

    #commentform textarea, #commentform input[type=text]{font:1.2em verdana, Courier, Monospace; padding:3px; border:1px solid #ccc; color:#666;}

    #commentform textarea:focus, #commentform input[type=text]:focus{color:#000; border-color:#888;}

    #commentform label{font-size:1em;}

    #commentform textarea{width:90%;}

    #commentform input[type=text]{width:45%;}

    #commentform #submit{height:30px; padding:3px 6px;}

    /*—–links—–*/

    a{text-decoration:none; color:#0070C5;}

    a:hover{text-decoration:underline;}

    .entry-title a:hover, .entry-byline a:hover, .navigation a:hover{color:#000;}

    .entry-byline a{color:#777;}

    .entry-content a{}

    .entry-content a:hover{}

    #primary.page-template .entry-content a{text-decoration:none; font-weight:normal;}

    #primary.page-template .entry-content a:hover{text-decoration:underline;}

    #footer a:hover{}

    .gnavigation a:hover{border-bottom:none;} 

7件の返信を表示中 - 1 - 7件目 (全7件中)
  • テーマの作りを見てみました。
    テーマディレクトリのheadersディレクトリ内に画像を入れておくと、ランダムでその中から表示されるみたいですね。
    ソースいじってもいいですが、大きさ的に問題無ければ、画像を1つだけ入れておけば良いかも。

    もしくは
    header-images.php
    がヘッダ画像の部分なので、そこに単に画像を表示させるタグを書いておけば良いかもです。

    トピック投稿者 ebuild

    (@ebuild)

    kvexさん 投稿ありがとうございました。
    私の説明が適格でなかったようですいません。実は、このフォーラムの5ページ目TOPあたりにある ” [解決済み] headerimgにオリジナルロゴ画像を入れたい ” に私の投稿内容があたるかと思います。土曜日からこの回答も参考にさせていただいたのですが、テキストタイトルの箇所にロゴ画像を入れ変えて、画像にリンク設定することができませんでした。ご教授よろしくお願いいたします。

    モデレーター jim912

    (@jim912)

    ebuildさん、こんにちは。

    試した訳ではありませんが、

    <h1 class="homelink">" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></h1>

    <div class="homelink">" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></div>

    <?php bloginfo('name'); ?>

    部分をimgタグに置き換えるのでは、できませんか?

    トピック投稿者 ebuild

    (@ebuild)

    jim912さん 投稿ありがとうございました。
    チャレンジしてみます。

    トピック投稿者 ebuild

    (@ebuild)

    <?php bloginfo(‘name’); ?> name の部分にimgタグを下記のように記述し 管理画面上のサイト表示をクリックすると DNS Error – Server cannot be found というエラー画面がでます。logo.gifは、primepressフォルダーのimagesフォルダーに入っています。CSSファイルは、さわっていません。ご教授よろしくお願いいたします。

    <h1 class=”homelink”>
    title=”<?php bloginfo(‘img src=”<?php bloginfo(‘template_url’) ?>/images/logo.gif”‘); ?>”><?php bloginfo(‘name’); ?>
    </h1>

    <div class=”homelink”>
    title=”<?php bloginfo(‘img src=”<?php bloginfo(‘template_url’) ?>/images/logo.gif”‘); ?>”><?php bloginfo(‘name’); ?>
    </div>

    なんかすごいほにゃららってますね。
    jim912さんの言いたいことは、
    <h1><imgタグ></h1>
    これでいいんじゃない?って事かなーと。htmlは大丈夫ですか?:)

    リンクをつけるなら、もちろんこうです。
    <h1><aタグ><imgタグ></a></h1>

    サイトのURLをPHPで書くなら、WordPressでは
    <?php bloginfo('url') ?>
    で、
    画像までは
    <?php bloginfo('template_url'); ?>/images/hogehoge.gif
    っていう感じです。
    基本、まずhtmlで書いて、それをPHPに(する必要があるなら)書き換える、のが混乱しなくて良さそうです。

    例の” [解決済み] headerimgにオリジナルロゴ画像を入れたい ”という質問を見つけました。
    おっしゃるとおり、全く同じ質問ですね。
    ebuildさんが、何が分からず出来なかったのかが、分かりません…。

    トピック投稿者 ebuild

    (@ebuild)

    hihito さん 投稿ありがとうございました。
    大変、参考になりました。感謝です!

7件の返信を表示中 - 1 - 7件目 (全7件中)
  • トピック「テーマprimepressで、サイトタイトルを画像に変えたい」には新たに返信することはできません。