Zemlik Posted September 25, 2011 Report Share Posted September 25, 2011 Значит хочу вставить фото в шапку,вместо заголовка,помогите:Сам заголовок:<!-- Header Starts --> <div id="header"> <div id="headerleft"> <?php if (get_option('logoURL')) { ?> <h1><a href="<?php bloginfo('url'); ?>" class="nobar"><img src="<?php echo get_option('logoURL'); ?>" alt="<?php bloginfo('name'); ?>"></a></h1></h3> <?php } else { ?> <h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1><h3><?php bloginfo('description'); ?></h3> <?php } ?> </div> <div id="headerright"> <div id="searchboxo"> <?php include (TEMPLATEPATH . '/searchform.php'); ?> </div> </div> </div> <!-- Header Ends --> Quote Link to comment Share on other sites More sharing options...
0 Arinden Posted September 25, 2011 Report Share Posted September 25, 2011 (edited) Значит хочу вставить фото в шапку,вместо заголовка,помогите:Сам заголовок:<!-- Header Starts --> <div id="header"> <div id="headerleft"> <?php if (get_option('logoURL')) { ?> <h1><a href="<?php bloginfo('url'); ?>" class="nobar"><img src="<?php echo get_option('logoURL'); ?>" alt="<?php bloginfo('name'); ?>"></a></h1></h3> <?php } else { ?> <h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1><h3><?php bloginfo('description'); ?></h3> <?php } ?> </div> <div id="headerright"> <div id="searchboxo"> <?php include (TEMPLATEPATH . '/searchform.php'); ?> </div> </div> </div> <!-- Header Ends -->Исходя из данного кода, где-то в настройках Вашей CMS должна быть возможность загрузить изображение для лого (и уже из этих настроек код запрашивает адрес изображения). Вы хотите заменить логотип или я что-то не так понял?Можно вручную поменять адрес изображения вот здесь <img src="<?php echo get_option('logoURL'); ?>" Edited September 25, 2011 by Arinden Quote Link to comment Share on other sites More sharing options...
0 Zemlik Posted September 25, 2011 Author Report Share Posted September 25, 2011 (edited) Значит это тема для WordPress я хочу вставить это ФОТОвот сюда Сюда,возможно ли это,убрав все заголовки и поиск? Edited September 25, 2011 by Zemlik Quote Link to comment Share on other sites More sharing options...
0 Arinden Posted September 25, 2011 Report Share Posted September 25, 2011 <!-- Header Starts --><img src="http://storage4.static.itmages.ru/i/11/0925/h_1316956522_9287392_c9c21389f6.jpeg" width="448" height="134" alt="" /><!-- Header Ends --> Quote Link to comment Share on other sites More sharing options...
0 Zemlik Posted September 25, 2011 Author Report Share Posted September 25, 2011 Меня интересует в какую часть кода шапки нужно вставить тег с фото! Quote Link to comment Share on other sites More sharing options...
0 Arinden Posted September 25, 2011 Report Share Posted September 25, 2011 Меня интересует в какую часть кода шапки нужно вставить тег с фото!Вы же сказали, чтобы убрать весь текст и поиск, я и убрал. Quote Link to comment Share on other sites More sharing options...
0 Zemlik Posted September 25, 2011 Author Report Share Posted September 25, 2011 Меня интересует в какую часть кода шапки нужно вставить тег с фото!Вы же сказали, чтобы убрать весь текст и поиск, я и убрал.То есть вы хотите сказать,что мне необходимо заменить существующий код шапки,на тот который вы мне предоставили.Там нету привязки к CSS стилям? Quote Link to comment Share on other sites More sharing options...
0 Arinden Posted September 25, 2011 Report Share Posted September 25, 2011 Стиль есть для текста и поиска. Если Вам будет необходимо применить стиль к изображению, создайте id для img. <img id=" "... и сделайте для него стиль например с margin-left или что будет необходимо. Quote Link to comment Share on other sites More sharing options...
0 Zemlik Posted September 25, 2011 Author Report Share Posted September 25, 2011 Я пытаюсь понять,можно ли вставить этот тег <img src="http://storage4.static.itmages.ru/i/11/0925/h_1316956522_9287392_c9c21389f6.jpeg" width="448" height="134" alt="" />в этот код <!-- Header Starts --><div id="header"><div id="headerleft"><?phpif (get_option('logoURL')) {?><h1><a href="<?php bloginfo('url'); ?>" class="nobar"><img src="<?php echo get_option('logoURL'); ?>" alt="<?php bloginfo('name'); ?>"></a></h1></h3><?php} else {?><h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1><h3><?php bloginfo('description'); ?></h3><?php}?></div><div id="headerright"><div id="searchboxo"><?php include (TEMPLATEPATH . '/searchform.php'); ?></div></div></div><!-- Header Ends -->без создания CSS стиля.Если да,то куда нужно вставить и что удалить в коде чтоб получить хедер вот такого вида Фото а не такого вида Это Quote Link to comment Share on other sites More sharing options...
0 Arinden Posted September 25, 2011 Report Share Posted September 25, 2011 Я же написал. Или вы не пробовали этот вариант? Quote Link to comment Share on other sites More sharing options...
0 Zemlik Posted September 26, 2011 Author Report Share Posted September 26, 2011 Вышло что-то типо этого Этопробовал править,у меня не выходит... Quote Link to comment Share on other sites More sharing options...
0 Arinden Posted September 26, 2011 Report Share Posted September 26, 2011 Сделайте свойство margin-left: 61px; Quote Link to comment Share on other sites More sharing options...
0 Zemlik Posted October 1, 2011 Author Report Share Posted October 1, 2011 Можешь прописать вставку вот этого изображения в хедер,я прописал,чет не выходит,прошлое вышло,я обременил тегом div и получилось,а с этим чет не то,вот ссылка http://itmages.ru/image/view/293468/ee786555.jpg ,я прописал,что-то типо этого:<div align="center"><img src="http://storage4.static.itmages.ru/image/view/293468/ee786555.jpg" width="800" height="137" alt="" /></div>Не отображает... Quote Link to comment Share on other sites More sharing options...
Question
Zemlik
Значит хочу вставить фото в шапку,вместо заголовка,помогите:
Сам заголовок:
<!-- Header Starts -->
<div id="header">
<div id="headerleft">
<?php
if (get_option('logoURL')) {
?>
<h1><a href="<?php bloginfo('url'); ?>" class="nobar"><img src="<?php echo get_option('logoURL'); ?>" alt="<?php bloginfo('name'); ?>"></a></h1></h3>
<?php
} else {
?>
<h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1><h3><?php bloginfo('description'); ?></h3>
<?php
}
?>
</div>
<div id="headerright">
<div id="searchboxo">
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
</div>
</div>
</div>
<!-- Header Ends -->
Link to comment
Share on other sites
12 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.