← WordPress

Editar tema wp

Lida 5749 vezes

Offline

swing 
Membro
Mensagens 3126 Gostos 41
Feedback +13

Troféus totais: 32
Trófeus: (Ver todos)
Avatar Level 6 Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5

Olá,

Fiz download de um tema e mudei a imagem do header, pois a que esta e muito grande, o que acontece e que a imagem que enviei é mais pequena, e até dei  o mesmo nome.. só que fica na mesma um grande espaço no header como se la estivesse a imagem grande.
Perceberam alguma coisa? :superlol:

Resumindo queria que a imagem no header tivesse apenas uns 5 cms de altura e não uns 10 como esta..
O que tenho de fazer para mudar?
Ja tive a ver no style.css e mudei algumas coisas mas esta td na mesma..
Offline

Celso Azevedo 
Membro
Mensagens 3500 Gostos 38
Feedback +12

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Tenth year Anniversary Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Mete aqui o css e o header.php :)
Offline

Diogo Pinto 
Administrador
Mensagens 4400 Gostos 371
Feedback +4

Troféus totais: 37
Trófeus: (Ver todos)
Avatar Search Level 6 Linux User Mobile User Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes

Tens de mudar a height da class header ou uma parecida ;)
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

As vezes também pode ser um padding. Mete aqui o style.css e o header.php.
Offline

Riey 
Membro
Mensagens 1001 Gostos 0
Feedback +4

Troféus totais: 30
Trófeus: (Ver todos)
Apple User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4 Level 3

Se poderes deixa link de onde tens o tema instalado, é mais fácil de ajudar.
Offline

swing 
Membro
Mensagens 3126 Gostos 41
Feedback +13

Troféus totais: 32
Trófeus: (Ver todos)
Avatar Level 6 Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5

header


<?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

<title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_head(); ?>
<script>
   function getPageSizeWithScroll(){     
   if (window.innerHeight && window.scrollMaxY) {// Firefox         
   yWithScroll = window.innerHeight + window.scrollMaxY;         
   xWithScroll = window.innerWidth + window.scrollMaxX;     
   } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac         
   yWithScroll = document.body.scrollHeight;         
   xWithScroll = document.body.scrollWidth;     }
   else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari         
   yWithScroll = document.body.offsetHeight;         
   xWithScroll = document.body.offsetWidth;       
   }     
   arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);     
   
   var browserName=navigator.appName;

   
   if (browserName=="Microsoft Internet Explorer")
    {
     document.getElementById("footer").style.marginTop =0;
    }
    else
     {
      document.getElementById("footer").style.marginTop = yWithScroll-625;
      }

   
 
   return arrayPageSizeWithScroll; }
</script>   

</head>
<body onload="getPageSizeWithScroll();">
   <div id="container">

      <div id="header">
         <div style="float:left;height:80px;margin:0 0 0 25px;">
            <a href="<?php echo get_option('home'); ?>/" class="lnk_big" title="<?php bloginfo('description'); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/header.png" border="0"></a><br />
         </div>   
         <div style="float:right;height:80px;"><a href="<?php bloginfo('rss2_url'); ?>" title="Rss"><img src="<?php bloginfo('template_directory'); ?>/images/rss_logo.png" width="102" height="54" align="bottom" style="margin:26px 40px 0 0;" border="0" alt="RSS" /></a></div>
         <div id="menu">
              <a href="<?php echo get_option('home'); ?>/" class="<? echo (is_home())?'current':''; ?>" title="Home">Home</a>
              <?php
              $page_id=$wp_query->post->ID;
               $pages = get_pages('sort_column=menu_order');
              //$pages = get_pages();
              foreach ($pages as $pagg) {
                  if ($page_id==$pagg->ID) {
                      $menu = '<a href="'.get_page_link($pagg->ID).'" class="current">';
               }   
               else {
                      $menu = '<a href="'.get_page_link($pagg->ID).'">';
               }
                  $menu .= $pagg->post_title;
               $menu .= '</a>';
               echo $menu;
              }
             ?>
            
         </div>   
         
      </div>
 
Offline

swing 
Membro
Mensagens 3126 Gostos 41
Feedback +13

Troféus totais: 32
Trófeus: (Ver todos)
Avatar Level 6 Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5

style.css

/*
Theme Name: Smack Diet
Theme URI: http://smackthemes.com/smack-diet
Description: Premium Wordpress Theme, diet, fitness, health, simple, light.
Author: SmackThemes.com
Author URI: http://smackthemes.com
Version: 1.1
Tags: diet, fitness, health, simple, simple, green, vegetable, white, light, two-columns, fixed-width
*/

html { height: 100%; }
body { min-height: 100%; height: 100%; }

body {
   margin:0;
   padding:0;
   background: #bfbfbf url(images/bg.jpg) top center no-repeat;
   font-family:Trebuchet Ms;
   font-size:16px;
   text-align:center;
}
 
div#container {
   width:900px;
   text-align:left;
   
   position:relative; /* needed for footer positioning*/
   margin:0 auto; /* center, not in IE5 */
   height:auto !important; /* real browsers */
   height:100%; /* IE6: treaded as min-height*/
   min-height:100%; /* real browsers */

}

   div#header {
      padding:220px 0 0 0;
      height:130px;
   }
      div#menu {   float:left;
            height:48px;
            padding:0px;
            background: #7e9c30;width:100%;
            margin:0;}
      div#menu {font-family:Trebuchet Ms;font-size:20px;}
      div#menu a{padding: 11px 25px;color: #fff;text-decoration: none;float: left;}
      div#menu a:hover{color: #384a0b;text-decoration: none;}
      div#menu a.current{color: #fff;}
                     
   div#content {
      margin:25px 0 0 0;
      background:#fff;
      padding:25px;
      color:#000000;
      min-height: 100%;
      width:850px;
      /width:900px;
      position:absolute;
      /position:relative;
   }
      div#post{
         float:left;
         width:545px;
      }
         .info {
            float:left;
            font-size:14px;
            color:#000;
         }
         .comments {
            float:left;
            background: url('images/bg_comments.gif') no-repeat;
            width:86px;
            height:22px;
            font-size:13px;
            color:white;
            margin:0 0 0 10px;
         }
      
      div#sidebar {
         float:right;
         width:275px;
         font-size:13px;
      }

      div#footer {
         margin:0 auto; /* center, not in IE5 */
         text-align:left;
         width:860px;
         height:30px;
         font-size:13px;
         color:#384a0b;
         padding:40px 20px;
      }

   
.title{
   color:#fff;
   font-size:30px;font-style:bold;
}
.description{
   color:#fff;
   font-size:18px;
}   
a.lnk_big{color:#fff;font-size:38px;text-decoration:none;font-weight:bold;}
a.lnk_big:hover{color:#fff;font-size:38px;text-decoration:none;font-weight:bold;}

h1 {font-family:Trebuchet Ms;font-size:24px;color:#000;padding:0px;margin:0px;font-weight:normal;}

h1 a{color:#7e9c30;text-decoration:underline;}
h1 a:hover{color:#7e9c30;text-decoration:underline;}

a.lnk_pink:link {font-family:Trebuchet Ms; font-size:12px; color:#7e9c30; text-decoration:none;}
a.lnk_pink:visited {font-family:Trebuchet Ms; font-size:12px; color:#7e9c30; text-decoration:none;}
a.lnk_pink:hover {font-family:Trebuchet Ms; font-size:12px; color:#7e9c30;text-decoration:underline;}
a.lnk_pink:active {font-family:Trebuchet Ms; font-size:12px; color:#7e9c30; text-decoration:none;}

 
a.more{color:#7e9c30;text-decoration:none;}
a.more:hover{color:#7e9c30;text-decoration:underline;}

.comments a{color:#FFF;text-decoration:none;}
.comments a:hover{color:#FFF;text-decoration:underline;}

a.lnk_pink:link {font-size:13px; color:#7e9c30; text-decoration:none;}
a.lnk_pink:visited {font-size:13px; color:#7e9c30; text-decoration:none;}
a.lnk_pink:hover {font-size:13px; color:#7e9c30;text-decoration:underline;}
a.lnk_pink:active {font-size:13px; color:#7e9c30; text-decoration:none;}

a.lnk_footer:link {font-size:13px; color:#384a0b; text-decoration:none;}
a.lnk_footer:visited {font-size:13px; color:#384a0b; text-decoration:none;}
a.lnk_footer:hover {font-size:13px; color:#384a0b;text-decoration:underline;}
a.lnk_footer:active {font-size:13px; color:#384a0b; text-decoration:none;}


#sidebar h2{font-size:13px;color:#7e9c30;margin:0px;text-decoration:underline;}

#sidebar  ul a{color:#000000;text-decoration:none;}
#sidebar  ul li a:hover{color:#000000;text-decoration:underline;}

#sidebar ul{
   list-style:none;
   margin:0 0 10px 0;
   padding:0px;
   
}
#sidebar ul li{
   list-style:none;
   margin:0px;
   padding:0px;
}


/* Begin Images */
p img {
   padding: 0;
   max-width: 100%;
   }
img.centered {
   display: block;
   margin-left: auto;
   margin-right: auto;
   }

img.alignright {
   padding: 4px;
   margin: 0 0 2px 7px;
   display: inline;
   }

img.alignleft {
   padding: 4px;
   margin: 0 7px 2px 0;
   display: inline;
   }

.alignright {
   float: right;
   }

.alignleft {
   float: left;
   }
/* End Images */   
Offline

swing 
Membro
Mensagens 3126 Gostos 41
Feedback +13

Troféus totais: 32
Trófeus: (Ver todos)
Avatar Level 6 Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5

queria que a imagem do header fosse tipo um banner com 900×200 pixels
Offline

swing 
Membro
Mensagens 3126 Gostos 41
Feedback +13

Troféus totais: 32
Trófeus: (Ver todos)
Avatar Level 6 Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5

queria que a imagem do header fosse tipo um banner com 900×200 pixels

Já mudei este file: http://demo.smackthemes.com/wp-content/themes/smack-diet/images/header.png e coloquei outro mas fica sempre com um header muito grande como se la estivesse a imagem antiga - http://demo.smackthemes.com/wp-content/themes/smack-diet/images/bg.jpg
Offline

Ricardo75 
Membro
Mensagens 1660 Gostos 0
Troféus totais: 28
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

   div#header {
      padding:220px 0 0 0;
      height:130px;
   }

muda o padding de 220 para uma valor menor e o height se for preciso.
Offline

swing 
Membro
Mensagens 3126 Gostos 41
Feedback +13

Troféus totais: 32
Trófeus: (Ver todos)
Avatar Level 6 Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5

Obrigado ja consegui.
Agora pretendia que o tema fosse mais largo, é possivel?

Aumentei os valores no css mas ficou na mesma:

div#container {
   width:900px;   ( aumentei o valor aqui)
   text-align:left;



   div#header {
      padding:220px 0 0 0;
      height:130px;
   }

muda o padding de 220 para uma valor menor e o height se for preciso.
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Tens de aumentar também nas outras divs.
Offline

swing 
Membro
Mensagens 3126 Gostos 41
Feedback +13

Troféus totais: 32
Trófeus: (Ver todos)
Avatar Level 6 Linux User Mobile User Windows User Super Combination Combination Topic Starter Poll Voter Level 5

Já consegui. Obrigado.

Só para finalizar, existe algum plugin para integrar no wp que permita criar um menu, em que se clica e mostra as páginas, tipo o menu "comunidade" aqui no + trafego?

 
Tens de aumentar também nas outras divs.
Offline

Souza 
Elite
Mensagens 1816 Gostos 1
Troféus totais: 28
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

Procura tu um menu de dropdown no google (Código) e introduzes "à pata" os hyperlinks.