PSD-Tutorials.de
Forum für Design, Fotografie & Bildbearbeitung
Tutkit
Agentur
Hilfe
Kontakt
Start
Forum
Aktuelles
Besonderer Inhalt
Foren durchsuchen
Tutorials
News
Anmelden
Kostenlos registrieren
Aktuelles
Suche
Suche
Nur Titel durchsuchen
Von:
Menü
Anmelden
Kostenlos registrieren
App installieren
Installieren
JavaScript ist deaktiviert. Für eine bessere Darstellung aktiviere bitte JavaScript in deinem Browser, bevor du fortfährst.
Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden.
Du solltest ein Upgrade durchführen oder einen
alternativen Browser
verwenden.
Antworten auf deine Fragen:
Neues Thema erstellen
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
CMS, Shopsoftware & Forensysteme
WordPress
Seiten anstelle von Artikeln verlinken
Beitrag
<blockquote data-quote="FrostAgent" data-source="post: 1934580"><p><strong>AW: Seiten anstelle von Artikeln verlinken</strong></p><p></p><p>Okay, ich habe mich jetzt noch ein bisschen mit der Startseite beschäfigt und et voila, wie gewünscht. Habe es nun doch ohne Widget gelöst und ohne die index.php komplett neuzuschreiben. Einfach den Inhalt des ul-Containers vergrößert. <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>[PHP]<?php get_header(); ?> </p><p> <!------------------------------------- Erste Box Anfang LEISTUNGEN Zeile 1/2---------------------------------------></p><p> <ul class="mcol"></p><p> <?php if(have_posts()) : ?><?php query_posts('page_id=119'); ?><?php while(have_posts()) : the_post(); ?></p><p> <li class="article" id="page-<?php the_ID(); ?>"></p><p></p><p> <?php</p><p> if ( has_post_thumbnail() ) { ?></p><p> <?php </p><p> $imgsrcparam = array(</p><p> 'alt' => trim(strip_tags( $post->post_excerpt )),</p><p> 'title' => trim(strip_tags( $post->post_title )),</p><p> );</p><p> $thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?></p><p> <div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div></p><p></p><p> </p><p> <?php } else {?></p><p> <div class="preview"></p><p> <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_url'); ?>/images/Leistungen hover_240px.png" alt="<?php the_title(); ?>" /></a></p><p> </div></p><p> <?php } ?></p><p></p><p> <div class="article-over"></p><p> <!--Hovergrafik einfügen--></p><p> <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_url'); ?>/images/Leistungen hover_240px.png" alt="<?php the_title(); ?>" /></a></p><p> </p><p></p><p> </div></p><p> </li> <?php ?></p><p> <?php endwhile; ?></p><p> <?php else : ?></p><p></p><p></p><p> <?php endif; ?></p><p> <!------------------------------------- Erste Box Ende LEISTUNGEN---------------------------------------> </p><p> <!------------------------------------- Zweite Box Anfang SHOP ---------------------------------------> </p><p> <?php if(have_posts()) : ?><?php query_posts('page_id=304'); ?><?php while(have_posts()) : the_post(); ?></p><p> <li class="article" id="page-<?php the_ID(); ?>"></p><p></p><p> <?php</p><p> if ( has_post_thumbnail() ) { ?></p><p> <?php </p><p> $imgsrcparam = array(</p><p> 'alt' => trim(strip_tags( $post->post_excerpt )),</p><p> 'title' => trim(strip_tags( $post->post_title )),</p><p> );</p><p> $thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?></p><p> <div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div></p><p></p><p> </p><p> <?php } else {?></p><p> <div class="preview"></p><p> <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_url'); ?>/images/shop hover_240px.png" alt="<?php the_title(); ?>" /></a></p><p> </div></p><p> <?php } ?></p><p></p><p> <div class="article-over"></p><p> <!--Hovergrafik einfügen--></p><p> <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_url'); ?>/images/shop hover_240px.png" alt="<?php the_title(); ?>" /></a></p><p> </p><p></p><p> </div></p><p> </li> <?php ?></p><p> <?php endwhile; ?></p><p> <?php else : ?></p><p></p><p></p><p> <?php endif; ?></p><p> <!------------------------------------- Zweite Box Ende SHOP---------------------------------------></p><p> <!------------------------------------- Dritte Box Anfang Angebote---------------------------------------></p><p> </p><p> <?php if(have_posts()) : ?><?php query_posts('page_id=307'); ?><?php while(have_posts()) : the_post(); ?></p><p> <li class="article" id="page-<?php the_ID(); ?>"></p><p></p><p> <?php</p><p> if ( has_post_thumbnail() ) { ?></p><p> <?php </p><p> $imgsrcparam = array(</p><p> 'alt' => trim(strip_tags( $post->post_excerpt )),</p><p> 'title' => trim(strip_tags( $post->post_title )),</p><p> );</p><p> $thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?></p><p> <div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div></p><p></p><p> </p><p> <?php } else {?></p><p> <div class="preview"></p><p> <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_url'); ?>/images/Angebote hover_240px.png" alt="<?php the_title(); ?>" /></a></p><p> </div></p><p> <?php } ?></p><p></p><p> <div class="article-over"></p><p> <!--Hovergrafik einfügen--></p><p> <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_url'); ?>/images/Angebote hover_240px.png" alt="<?php the_title(); ?>" /></a></p><p> </p><p></p><p> </div></p><p> </li> <?php ?></p><p> <?php endwhile; ?></p><p> <?php else : ?></p><p></p><p></p><p> <?php endif; ?></p><p> <!------------------------------------- Dritte Box Ende Angebote---------------------------------------></p><p> </p><p> </ul></p><p></p><p> <?php if(have_posts()) : ?><?php query_posts('page_id=119'); ?><?php while(have_posts()) : the_post(); ?></p><p> <?php endwhile; ?></p><p> <?php else : ?></p><p> <h1 id="error"><?php _e("Seite nicht gefunden."); ?></h1></p><p> <?php endif; ?></p><p> </p><p><!----------------------- Zweite Zeile --------------------------> </p><p></p><p> </p><p> <!------------------------------------- Vierte Box Anfang Referenzen Zeile 2---------------------------------------></p><p> </p><p><ul class="mcol"></p><p> <?php if(have_posts()) : ?><?php query_posts('page_id=194'); ?><?php while(have_posts()) : the_post(); ?></p><p> <li class="article" id="page-<?php the_ID(); ?>"></p><p></p><p> <?php</p><p> if ( has_post_thumbnail() ) { ?></p><p> <?php </p><p> $imgsrcparam = array(</p><p> 'alt' => trim(strip_tags( $post->post_excerpt )),</p><p> 'title' => trim(strip_tags( $post->post_title )),</p><p> );</p><p> $thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?></p><p> <div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div></p><p></p><p> </p><p> <?php } else {?></p><p> <div class="preview"></p><p> <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_url'); ?>/images/Referenzen hover_240px.png" alt="<?php the_title(); ?>" /></a></p><p> </div></p><p> <?php } ?></p><p></p><p> <div class="article-over"></p><p> <!--Hovergrafik einfügen--></p><p> <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_url'); ?>/images/Referenzen hover_240px.png" alt="<?php the_title(); ?>" /></a></p><p> </p><p></p><p> </div></p><p> </li> <?php ?></p><p> <?php endwhile; ?></p><p> <?php else : ?></p><p></p><p></p><p> <?php endif; ?></p><p> <!------------------------------------- Vierte Box Ende Referenzen---------------------------------------></p><p> <!------------------------------------- Fünfte Box Anfang Kontakt---------------------------------------></p><p></p><p> <?php if(have_posts()) : ?><?php query_posts('page_id=7'); ?><?php while(have_posts()) : the_post(); ?></p><p> <li class="article" id="page-<?php the_ID(); ?>"></p><p></p><p> <?php</p><p> if ( has_post_thumbnail() ) { ?></p><p> <?php </p><p> $imgsrcparam = array(</p><p> 'alt' => trim(strip_tags( $post->post_excerpt )),</p><p> 'title' => trim(strip_tags( $post->post_title )),</p><p> );</p><p> $thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?></p><p> <div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div></p><p></p><p> </p><p> <?php } else {?></p><p> <div class="preview"></p><p> <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_url'); ?>/images/Kontakt hover_240px.png" alt="<?php the_title(); ?>" /></a></p><p> </div></p><p> <?php } ?></p><p></p><p> <div class="article-over"></p><p> <!--Hovergrafik einfügen--></p><p> <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_url'); ?>/images/Kontakt hover_240px.png" alt="<?php the_title(); ?>" /></a></p><p> </p><p></p><p> </div></p><p> </li> <?php ?></p><p> <?php endwhile; ?></p><p> <?php else : ?></p><p></p><p></p><p> <?php endif; ?></p><p> <!------------------------------------- Fünfte Box Ende Kontakt---------------------------------------></p><p> <!------------------------------------- Sechste Box Anfang Partner---------------------------------------></p><p> <?php if(have_posts()) : ?><?php query_posts('page_id=249'); ?><?php while(have_posts()) : the_post(); ?></p><p> <li class="article" id="page-<?php the_ID(); ?>"></p><p></p><p> <?php</p><p> if ( has_post_thumbnail() ) { ?></p><p> <?php </p><p> $imgsrcparam = array(</p><p> 'alt' => trim(strip_tags( $post->post_excerpt )),</p><p> 'title' => trim(strip_tags( $post->post_title )),</p><p> );</p><p> $thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?></p><p> <div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div></p><p></p><p> </p><p> <?php } else {?></p><p> <div class="preview"></p><p> <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_url'); ?>/images/Partner hover_240px.png" alt="<?php the_title(); ?>" /></a></p><p> </div></p><p> <?php } ?></p><p></p><p> <div class="article-over"></p><p> <!--Hovergrafik einfügen--></p><p> <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_url'); ?>/images/Partner hover_240px.png" alt="<?php the_title(); ?>" /></a></p><p> </p><p></p><p> </div></p><p> </li> <?php ?></p><p> <?php endwhile; ?></p><p> <?php else : ?></p><p></p><p></p><p> <?php endif; ?></p><p> </p><p> </p><p> </ul></p><p></p><p> <?php if(have_posts()) : ?><?php query_posts('page_id=194'); ?><?php while(have_posts()) : the_post(); ?></p><p> <?php endwhile; ?></p><p> <?php else : ?></p><p> <h1 id="error"><?php _e("Seite nicht gefunden."); ?></h1></p><p> <?php endif; ?> </p><p></p><p> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?></p><p><?php get_footer(); ?> </p><p> <!------------------------------------- Ende--------------------------------------->[/PHP]</p><p></p><p>Jetzt nurnochmal die Frage, wie bekomme ich die Hovergrafiken perfekt passig auf das [STRIKE]Artikel-[/STRIKE] Seiten-Bild?</p><p></p><p></p><p></p><p>Normal mit position absolute oder? Allerdings passt das nicht genau, das Problem mit der nicht passigen Position habe ich auch erst, seitdem ich den Container zentriert habe.</p><p></p><p>Ich habe versucht das dann irgendwie so zurechtzubiegen bis es passt, aber hundertprozentig sitzt es immer noch nicht, wie man der dritten Box oben sieht.</p><p></p><p>[CODE].article-over {</p><p> position:absolute;</p><p> bottom:1px;</p><p> left:32px;</p><p>}[/CODE]</p><p></p><p>...habe ich da eventuell noch andere Lösungsmöglichkeiten?</p></blockquote><p></p>
[QUOTE="FrostAgent, post: 1934580"] [b]AW: Seiten anstelle von Artikeln verlinken[/b] Okay, ich habe mich jetzt noch ein bisschen mit der Startseite beschäfigt und et voila, wie gewünscht. Habe es nun doch ohne Widget gelöst und ohne die index.php komplett neuzuschreiben. Einfach den Inhalt des ul-Containers vergrößert. :) [PHP]<?php get_header(); ?> <!------------------------------------- Erste Box Anfang LEISTUNGEN Zeile 1/2---------------------------------------> <ul class="mcol"> <?php if(have_posts()) : ?><?php query_posts('page_id=119'); ?><?php while(have_posts()) : the_post(); ?> <li class="article" id="page-<?php the_ID(); ?>"> <?php if ( has_post_thumbnail() ) { ?> <?php $imgsrcparam = array( 'alt' => trim(strip_tags( $post->post_excerpt )), 'title' => trim(strip_tags( $post->post_title )), ); $thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?> <div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div> <?php } else {?> <div class="preview"> <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_url'); ?>/images/Leistungen hover_240px.png" alt="<?php the_title(); ?>" /></a> </div> <?php } ?> <div class="article-over"> <!--Hovergrafik einfügen--> <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_url'); ?>/images/Leistungen hover_240px.png" alt="<?php the_title(); ?>" /></a> </div> </li> <?php ?> <?php endwhile; ?> <?php else : ?> <?php endif; ?> <!------------------------------------- Erste Box Ende LEISTUNGEN---------------------------------------> <!------------------------------------- Zweite Box Anfang SHOP ---------------------------------------> <?php if(have_posts()) : ?><?php query_posts('page_id=304'); ?><?php while(have_posts()) : the_post(); ?> <li class="article" id="page-<?php the_ID(); ?>"> <?php if ( has_post_thumbnail() ) { ?> <?php $imgsrcparam = array( 'alt' => trim(strip_tags( $post->post_excerpt )), 'title' => trim(strip_tags( $post->post_title )), ); $thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?> <div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div> <?php } else {?> <div class="preview"> <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_url'); ?>/images/shop hover_240px.png" alt="<?php the_title(); ?>" /></a> </div> <?php } ?> <div class="article-over"> <!--Hovergrafik einfügen--> <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_url'); ?>/images/shop hover_240px.png" alt="<?php the_title(); ?>" /></a> </div> </li> <?php ?> <?php endwhile; ?> <?php else : ?> <?php endif; ?> <!------------------------------------- Zweite Box Ende SHOP---------------------------------------> <!------------------------------------- Dritte Box Anfang Angebote---------------------------------------> <?php if(have_posts()) : ?><?php query_posts('page_id=307'); ?><?php while(have_posts()) : the_post(); ?> <li class="article" id="page-<?php the_ID(); ?>"> <?php if ( has_post_thumbnail() ) { ?> <?php $imgsrcparam = array( 'alt' => trim(strip_tags( $post->post_excerpt )), 'title' => trim(strip_tags( $post->post_title )), ); $thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?> <div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div> <?php } else {?> <div class="preview"> <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_url'); ?>/images/Angebote hover_240px.png" alt="<?php the_title(); ?>" /></a> </div> <?php } ?> <div class="article-over"> <!--Hovergrafik einfügen--> <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_url'); ?>/images/Angebote hover_240px.png" alt="<?php the_title(); ?>" /></a> </div> </li> <?php ?> <?php endwhile; ?> <?php else : ?> <?php endif; ?> <!------------------------------------- Dritte Box Ende Angebote---------------------------------------> </ul> <?php if(have_posts()) : ?><?php query_posts('page_id=119'); ?><?php while(have_posts()) : the_post(); ?> <?php endwhile; ?> <?php else : ?> <h1 id="error"><?php _e("Seite nicht gefunden."); ?></h1> <?php endif; ?> <!----------------------- Zweite Zeile --------------------------> <!------------------------------------- Vierte Box Anfang Referenzen Zeile 2---------------------------------------> <ul class="mcol"> <?php if(have_posts()) : ?><?php query_posts('page_id=194'); ?><?php while(have_posts()) : the_post(); ?> <li class="article" id="page-<?php the_ID(); ?>"> <?php if ( has_post_thumbnail() ) { ?> <?php $imgsrcparam = array( 'alt' => trim(strip_tags( $post->post_excerpt )), 'title' => trim(strip_tags( $post->post_title )), ); $thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?> <div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div> <?php } else {?> <div class="preview"> <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_url'); ?>/images/Referenzen hover_240px.png" alt="<?php the_title(); ?>" /></a> </div> <?php } ?> <div class="article-over"> <!--Hovergrafik einfügen--> <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_url'); ?>/images/Referenzen hover_240px.png" alt="<?php the_title(); ?>" /></a> </div> </li> <?php ?> <?php endwhile; ?> <?php else : ?> <?php endif; ?> <!------------------------------------- Vierte Box Ende Referenzen---------------------------------------> <!------------------------------------- Fünfte Box Anfang Kontakt---------------------------------------> <?php if(have_posts()) : ?><?php query_posts('page_id=7'); ?><?php while(have_posts()) : the_post(); ?> <li class="article" id="page-<?php the_ID(); ?>"> <?php if ( has_post_thumbnail() ) { ?> <?php $imgsrcparam = array( 'alt' => trim(strip_tags( $post->post_excerpt )), 'title' => trim(strip_tags( $post->post_title )), ); $thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?> <div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div> <?php } else {?> <div class="preview"> <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_url'); ?>/images/Kontakt hover_240px.png" alt="<?php the_title(); ?>" /></a> </div> <?php } ?> <div class="article-over"> <!--Hovergrafik einfügen--> <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_url'); ?>/images/Kontakt hover_240px.png" alt="<?php the_title(); ?>" /></a> </div> </li> <?php ?> <?php endwhile; ?> <?php else : ?> <?php endif; ?> <!------------------------------------- Fünfte Box Ende Kontakt---------------------------------------> <!------------------------------------- Sechste Box Anfang Partner---------------------------------------> <?php if(have_posts()) : ?><?php query_posts('page_id=249'); ?><?php while(have_posts()) : the_post(); ?> <li class="article" id="page-<?php the_ID(); ?>"> <?php if ( has_post_thumbnail() ) { ?> <?php $imgsrcparam = array( 'alt' => trim(strip_tags( $post->post_excerpt )), 'title' => trim(strip_tags( $post->post_title )), ); $thumbID = get_the_post_thumbnail( $post->ID, 'background', $imgsrcparam ); ?> <div class="preview"><a href="<?php the_permalink() ?>"><?php echo "$thumbID"; ?></a></div> <?php } else {?> <div class="preview"> <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_url'); ?>/images/Partner hover_240px.png" alt="<?php the_title(); ?>" /></a> </div> <?php } ?> <div class="article-over"> <!--Hovergrafik einfügen--> <a href="<?php the_permalink(); ?>"><img src="<?php bloginfo('template_url'); ?>/images/Partner hover_240px.png" alt="<?php the_title(); ?>" /></a> </div> </li> <?php ?> <?php endwhile; ?> <?php else : ?> <?php endif; ?> </ul> <?php if(have_posts()) : ?><?php query_posts('page_id=194'); ?><?php while(have_posts()) : the_post(); ?> <?php endwhile; ?> <?php else : ?> <h1 id="error"><?php _e("Seite nicht gefunden."); ?></h1> <?php endif; ?> <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?> <?php get_footer(); ?> <!------------------------------------- Ende--------------------------------------->[/PHP] Jetzt nurnochmal die Frage, wie bekomme ich die Hovergrafiken perfekt passig auf das [STRIKE]Artikel-[/STRIKE] Seiten-Bild? Normal mit position absolute oder? Allerdings passt das nicht genau, das Problem mit der nicht passigen Position habe ich auch erst, seitdem ich den Container zentriert habe. Ich habe versucht das dann irgendwie so zurechtzubiegen bis es passt, aber hundertprozentig sitzt es immer noch nicht, wie man der dritten Box oben sieht. [CODE].article-over { position:absolute; bottom:1px; left:32px; }[/CODE] ...habe ich da eventuell noch andere Lösungsmöglichkeiten? [/QUOTE]
Bilder bitte
hier hochladen
und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Zitate einfügen…
Authentifizierung
Der grüne Frosch hüpft über die Hügel an den Bäumen vorbei in die Höhle. Bitte nenne das fünfte Wort!
Antworten
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
CMS, Shopsoftware & Forensysteme
WordPress
Seiten anstelle von Artikeln verlinken
Oben