Antworten auf deine Fragen:
Neues Thema erstellen

HTML Seite in Wordpress umwandeln

Macman

Noch nicht viel geschrieben

Hallo,

ich bin dabei eine HTML Seite in Wordpress umzuwandeln.

habe das soweit auch zum laufen bekommen, aber ich habe ein Template das nur die Blog Inhalte darstellen soll, doch was ich auch mache ich bekomme nur die Überschrift der Seite aber keinen Beitrags Inhalt angezeigt?? Hat jemand eine Idee?



Hier der Code des Templates:

PHP:
<?php /* * Template Name: LOTTO spielen online Blog */ get_header();?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php if ( function_exists('language_attributes') ) language_attributes(); ?> id="fb">

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

  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>Startseite | Ihre Chance auf die Jackpot-Millionen | Spielregeln | Lotto 6 aus 49</title>

  <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
  <style type="text/css" media="screen">
        @import url( <?php bloginfo('stylesheet_url'); ?> );
    </style>
  
    
  <meta name="robots" content="index,follow" />
  <meta http-equiv="expires" content="0" />
  <meta name="description" content="Ihre chance auf die Jackpot-Millionen | Spielregeln | Lotto 6 aus 49" />
  <meta name="keywords" content=" Lotto, Lottozahlen 6 aus 49, Ziehung der Lottozahlen, 6 aus 49, Lotto online spielen, Lotto bw, Lottoquoten, Jackpot, Lotto Gewinner" lang="de" />

<?php wp_head(); ?>

</head>


<body>

<div id="wrapper">
<div id="rahmen">
<div class="logo">
<h1><a href="index.html">LOTTO <br />6 aus 49</a></h1>
<img src="<?php bloginfo( 'template_url' ); ?>/images/lotto-header.png" alt="Lotto Gewinnen Jackpot" />
</div>

<div style="width:180px; padding-top:5px; padding-bottom:5px; float: right; margin: 30px 20px 0 0;">
<iframe src="http://www.lottozahlenonline.de/data_extern/lottozahlen.php" name="Lottozahlen" width="180" height="115" scrolling="no" frameborder="0" marginheight="0" marginwidth="0">
<p>&nbsp;</p>
</iframe>
<div style="margin-left:5px;">&rsaquo; <a style="font-family:verdana, geneva; font-size:8px; color:#000000" href="http://www.lottozahlenonline.de/">www.lottozahlenonline.de</a></div>
</div>




<div class="kasten">
<div class="menue">
<?php wp_nav_menu( array( 'theme_location' => 'header-menu' ) ); ?>
</div>

<div class="affiliate">

</div>

  <div class="top-content">
  <img src="<?php bloginfo( 'template_url' ); ?>/images/chance.png" alt="Chance Jackpot-Millionen" style="float: left;" />
</div>

</div>

<div class="content">
  <div id="content">
                
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
 <p class="postmetadata">Posted in <?php the_category('Lotto'); ?></p>
 </div>
<div class="entry">
   <?php the_content(); ?>
 </div>
 <?php endwhile; else: ?>
 <h2> Sorry noch keine Texte vorhanden</h2>
 
 <?php endif; ?>
            
</div>

    

            
</div>
</div>

<img src="<?php bloginfo( 'template_url' ); ?>/images/lotto-gewinne.png" alt="Traumhaus Traumurlaub" style="float: right; margin-top: 20px;" />
</div>
</body>
</html>
 
Zuletzt bearbeitet von einem Moderator:

hub

nicht ganz neu hier

AW: HTML Seite in Wordpress umwandeln

Moin moin,
prinzipiell scheint dein Code in Ordnung zu sein. Hast du den Text mit deiner div "entry" vielleicht mit CSS "wegformatiert"? Bei mir funktioniert dein Code - auch wenn er etwas sehr chaotisch ist ... (schau dir im Browser mal den produzierten Quellcode an)

Gruß Ulli
 

Macman

Noch nicht viel geschrieben

AW: HTML Seite in Wordpress umwandeln

Hallo Ulli,

vielen Dank für den Hinweis, ich bin beim coden noch Anfänger deswegen kann es durchaus etwas chaotisch sein. Leider bin ich noch nicht in der Lage zu erkennen wann ein code chaotisch wirkt. :)

die div entry wird nicht durch die Css Datei angetastet, ich habe Sie jetzt mal gelöscht aber keine Änderung in der Darstellung.

ich hatte die codezeilen direkt von der codex.worpress.org kopiert, weil ich schon diverse Versuche angestellt habe, alle ohne Erfolg.

Gruß

Frank
 

cythux

Aktives Mitglied

hub

nicht ganz neu hier

AW: HTML Seite in Wordpress umwandeln

Moin moin,
es ist schwer zu sagen, wo dann der Fehler liegt. Dein Chaos entsteht u. A. Das du den gesamten Kopf mit der Funktion wp_head() noch einmal lädst. Hast du denn die Beitragsinhalte wenn du ein Standard-Template nutzt?
Der Hinweis von cythux, ein Basis-Theme zum Aufbau eines eigenen Themes zu nutzen, ist für das Kennenlernen der Zusammenhänge kein schlechter Ansatz ...

Gruß Ulli
 

Macman

Noch nicht viel geschrieben

AW: HTML Seite in Wordpress umwandeln

o.k. ich sehe schon, ist doch nicht so einfach wie ich es mir gedacht habe. Werde mir die Infos zu Gemüte ziehen.

Zur Zeit habe ich nur eine Index.php, eine template Datei deren Code ich oben gepostet habe und eine Style.css Datei.

Ich werde den Code jetzt erstmal auf eine header und footer Datei aufteilen.


Gruß

Frank
 

Macman

Noch nicht viel geschrieben

AW: HTML Seite in Wordpress umwandeln

So, ich habe mir das Tutorial von Pascal Bajorat "Erstellung einer kompletten Webseite" insbesondere den Teil 3 "Wordpress Theme" angeschaut.

Meine Theme sieht jetzt so aus, dass es eine index.php,footer.php,header.php, style.css und eine lottoblog.php Seitentemplate gibt.

Trotzdem kann ich nur die Überschrift der Seite Lotto News sehen ohne auch nur einen einzigen Beitrag angezeigt zu bekommen.

Vielleicht kann mir nochmal jemand helfen den Fehler zu finden.

Hier die Codes:

index.php
PHP:
<?php get_header ();?>
<div id="content" class="content">

 <?php if (have_posts()) : ?>
  <?php while (have_posts()) : the_post(); ?>
  
  <div class="post">
   <h2><a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
   <?php the_content(); ?>
  </div>
  <?php endwhile; ?>
  
  <p class="navigation"><?php next_posts_link(' ««« '); ?><?php previous_posts_link(' »»» '); ?></p>
  
  <?php else: ?>
  
  <p><?php _e('Nichts gefunden, was den Suchkriterien entspricht.'); ?></p>
  
 <?php endif; ?>
 
  
</div>
<?php get_footer ();?>

header.php

PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
<html xmlns="[URL]http://www.w3.org/1999/xhtml[/URL]" <?php if ( function_exists('language_attributes') ) language_attributes(); ?> id="fb">
<head profile="[URL]http://gmpg.org/xfn/11[/URL]">
 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
 <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title><?php bloginfo ('name'); if(is_single () ) {wp_title(); } ?></title>
  <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
  <link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" />
  
    
  <meta name="robots" content="index,follow" />
  <meta http-equiv="expires" content="0" />
  <meta name="description" content="Ihre Chance auf die Jackpot-Millionen | Spielregeln | Lotto 6 aus 49" />
  <meta name="keywords" content=" Lotto, Lottozahlen 6 aus 49, Ziehung der Lottozahlen, 6 aus 49, Lotto online spielen, Lotto bw, Lottoquoten, Jackpot, Lotto Gewinner" lang="de" />
  <?php wp_head(); ?>
</head>
 
<body>
<div id="wrapper">
<div id="rahmen">
<div class="logo">
<h1><a>LOTTO <br />6 aus 49</a></h1>
<img src="<?php bloginfo( 'template_url' ); ?>/images/lotto-header.png" alt="Lotto Gewinnen Jackpot" />
</div>
<div style="width:180px; padding-top:5px; padding-bottom:5px; float: right; margin: 30px 20px 0 0;">
<iframe src="[URL]http://www.lottozahlenonline.de/data_extern/lottozahlen.php[/URL]" name="Lottozahlen" width="180" height="115" scrolling="no" frameborder="0" marginheight="0" marginwidth="0">
<p>&nbsp;</p>
</iframe>
<div style="margin-left:5px;">&rsaquo; <a style="font-family:verdana, geneva; font-size:8px; color:#000000" href=">
</div>
 

<div class="kasten">
<div class="menue">
<?php wp_nav_menu( array( 'theme_location' => 'header-menu' ) ); ?>
</div>
<div class="affiliate">
</div>
<div class="top-content">
<img src="<?php bloginfo( 'template_url' ); ?>/images/chance.png" alt="Chance Jackpot-Millionen" style="float: left;" />
</div>
</div>

footer.php

PHP:
<img src="<?php bloginfo( 'template_url' ); ?>/images/lotto-gewinne.png" alt="Traumhaus Traumurlaub" style="float: right; margin-top: 20px;" />
</div>
</div>
</body>
<?php wp_footer (); ?>
</html>

lottoblog.php

PHP:
<?php /* * Template Name: LOTTO spielen online Blog */ get_header();?>
 
<div class="content">
  
    
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
 </div>
   <?php the_content(); ?>
 <?php endwhile; else: ?>
 <h2> Sorry noch keine Texte vorhanden</h2>
 
 <?php endif; ?>
   
</div>
<?php get_footer ();?>

style.css

PHP:
Theme URI: 
Description: Lotto Affiliate Theme für Wordpress
Version: 1.0
Author: Frank Kühn
Author URI: 
*/
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, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, object {margin: 0; padding: 0; border: 0; outline: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline;}
:focus { outline: 0;}
table { border-collapse: separate; border-spacing: 0;}
caption, th, td { text-align: left; font-weight: normal;}
blockquote:before, blockquote:after, q:before, q:after {content: "";}
blockquote, q { quotes: "" "";}

/******************************************************************/
body {
font: 16px/20px Lucida, "Lucida Grande", verdana, Arial, sans-serif;
background: #c46e1b;
padding: 0;
margin: 0;
color: #000;
}
i {
font-size: 11px;
}
p {
margin: 15px 0; line-height: 20px;
}
a {color: blue;}
a:hover {text-decoration: none;}
ol, ul {
list-style: none;
margin-top: 10px; padding: 0 0 0 20px;
list-style-position: outside;
}
ul li {
padding-left: 10px;
margin-bottom: 10px;
margin-left: 10px;
list-style: square;
}
ol li {
padding-left: 15px;
margin-bottom: 10px;
list-style-type:decimal
}
h1 {
text-transform: uppercase;
color: #000;
text-decoration: none;
font-size: 60px;
text-shadow: 1px 1px 5px black;
font-weight: normal;
}
h2 {
font-size: 24px;
color: #000;
font-weight: bold;
line-height: 26px;
}
h3 {
font-size: 24px;
color: #000;
font-weight: bold;
line-height: 26px;
margin-top: 20px;
}
strong {font-weight: bold;}
p.small {font-size: 11px; line-height: 13px;}
#wrapper {
width: 980px;
height: auto;
margin: 0 auto;
}
#rahmen {
width: 980px;
margin: 0;
float: left;
text-align: left;
background: url("http://www.psd-tutorials.de/forum/images/bg.png") repeat-y;
}

.logo {
width: 700px;
float: left;
margin: 20px 0 40px 0;
 }
.logo img {float: left; margin: 0 0 0 20px;}
.logo h1 a { 
text-transform: uppercase;
color: white;
text-decoration: none;
font-size: 30px;
font-weight: bold;
line-height: 50px;
text-shadow: 1px 1px 5px black;
display: inline;
float: left;
margin-top: 40px;
}
.kasten {
width: 920px;
float: left;
padding: 30px;
-moz-box-shadow: 0 0 10px #423a34;
-webkit-box-shadow: 0 0 10px #423a34;
box-shadow: 0 0 10px #423a34;
border-radius: 20px;
background: white url("http://www.psd-tutorials.de/forum/images/lottokugeln.png") no-repeat;
background-position: bottom right;
}
.top-content {
padding: 30px 30px 30px 60px;
float: left;
display: inline;
}
.affiliate {float: left;}
.content {
width: 560px;
padding: 30px;
float: left;
display: inline;
margin-right: 30px;
text-shadow: 0px 0px 2px #fff;
}
.menue {
width: 100%;
float: left;
margin: 0 0 20px 0;
border-bottom: 1px solid #9c9c9c;
}
.menue ul, .menue ul li {
margin: 0;
padding: 0;
float: left;
list-style: none;
}
.menue ul li a {
color: #9c9c9c;
margin: 0 15px 20px 0;
text-decoration: none;
float: left;
}
.menue ul li a:hover {
color: #000;
text-decoration: none;
}
.menue ul li a.aktiv {
color: #ff8e27;
text-decoration: none;
}
.kontakt {
float: left;
width: 240px;
margin: 20px 0 20px 0px;
color: white;
}
input[type=submit] {
border-radius: 10px;  border: 0; background: #a31082; padding: 10px; font-size: 14px; color: white; cursor: pointer;}
input[type=submit]:hover {
 background: #680a53;}
label {width: 50px; float: left; margin-top: 20px;}
input[type=text] {
 width: 130px;
 border: 0;
 height: 20px;
 margin-bottom: 5px;
 float: left;
 border: 1px solid #a31082;
 }
 
Zuletzt bearbeitet von einem Moderator:

cythux

Aktives Mitglied

AW: HTML Seite in Wordpress umwandeln

Packe mal dein Theme zusammen, mit allen ordner die du erstellt hast
wie img, css, js usw falls ich zeit finde kann ich mir das mal genauer anschauen

lg
 
Bilder bitte hier hochladen und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Antworten auf deine Fragen:
Neues Thema erstellen

Willkommen auf PSD-Tutorials.de

In unseren Foren vernetzt du dich mit anderen Personen, um dich rund um die Themen Fotografie, Grafik, Gestaltung, Bildbearbeitung und 3D auszutauschen. Außerdem schalten wir für dich regelmäßig kostenlose Inhalte frei. Liebe Grüße senden dir die PSD-Gründer Stefan und Matthias Petri aus Waren an der Müritz. Hier erfährst du mehr über uns.

Stefan und Matthias Petri von PSD-Tutorials.de

Nächster neuer Gratisinhalt

03
Stunden
:
:
25
Minuten
:
:
19
Sekunden

Flatrate für Tutorials, Assets, Vorlagen

Zurzeit aktive Besucher

Statistik des Forums

Themen
118.565
Beiträge
1.538.067
Mitglieder
67.488
Neuestes Mitglied
Andrew56524
Oben