Gibt es dafür eine Lösung
hi
ich habe folgendes layout
ich möchte bei wp_list_pages nun für jedes <a href> element ein attribut class="link x" hinnzufügen, wobei x= x+1 für jedes LI von Parent Pages ist.
Hast du mittlerweile eine Lösung dafür?
Um schreiben oder kommentieren zu können, benötigen Sie ein Benutzerkonto.
Sie haben schon ein Benutzerkonto? Melden Sie sich hier an.
Jetzt anmeldenHier können Sie ein neues Benutzerkonto erstellen.
Neues Benutzerkonto erstellenGibt es dafür eine Lösung
hi
ich habe folgendes layout
ich möchte bei wp_list_pages nun für jedes <a href> element ein attribut class="link x" hinnzufügen, wobei x= x+1 für jedes LI von Parent Pages ist.
Hast du mittlerweile eine Lösung dafür?
Hallo,
Das Problem was ich hierbei habe zeig ich euch anhand meiner CSS und meiner Liste:
<div id="navigation">
<ul>
<li><a href="#" class="link1">Home</a></li>
<li><a href="#" class="drop link2">Aktuelles </a> </li>
<li><a href="#" class="drop link3">Irgendwas</a>
<ul>
<li><a href="#">Standort Frankfurt</a></li>
<li><a href="#">Standort Muenchen</a></li>
</ul>
</li>
<li><a href="#" class="drop link4">Schwerpunkt</a></li>
</ul>
</div>
Alles anzeigen
Meine CSS sieht wie folgt aus:
/* float the list to make it horizontal and a relative positon so that you
can control the dropdown menu positon */
#navigation li {
width:216px;
position:relative;
}
/* style the links for the top level */
#navigation a, #navigation a:visited {
display:block;
height:40px;
background:url(./images/navigation.png) top left;
text-indent:-9000px;
}
/* a hack so that IE5.5 faulty box model is corrected */
* html #navigation a, * html #navigation a:visited {
width:216px;
width:216px;
}
/* style the second level background */
#navigation ul ul a.drop, #navigation ul ul a.drop:visited {
background:#103b7d;
}
/* style the second level hover */
#navigation ul ul a.drop:hover{
background:#fff;
color:#103b7d;
}
#navigation ul ul :hover > a.drop {
background:#fff;
color:#103b7d;
}
/* style the third level background */
#navigation ul ul ul a, #navigation ul ul ul a:visited {
background:#e2dfa8;
}
/* style the third level hover */
#navigation ul ul ul a:hover {
background:#103b7d;
}
/* hide the sub levels and give them a positon absolute so that they take up no room */
#navigation ul ul {
visibility:hidden;
position:absolute;
top:-10px; left:216px;
padding:4px;
background:#103b7d;
height:96px; width:216px;
border-left:1px solid #999;
}
/* another hack for IE5.5 */
* html #navigation ul ul {
top:-9px;
top:-10px;
}
/* position the third level flyout menu */
#navigation ul ul ul{
left:149px;
top:-1px;
width:145px;
}
/* position the third level flyout menu for a left flyout */
#navigation ul ul ul.left {
left:-145px;
}
/* style the table so that it takes no ppart in the layout - required for IE to work */
#navigation table {
position:absolute;
top:0;
left:0;
border-collapse:collapse;
}
/* style the second level links */
#navigation ul ul a, #navigation ul ul a:visited {
background:#103b7d;
color:#fff;
height:auto;
line-height:14px;
text-indent:0px;
display:block;
padding:5px;
text-decoration:none;
font-size:11px;
}
/* yet another hack for IE5.5 */
* html #navigation ul ul a, * html #navigation ul ul a:visited {
width:145px;width:145px;
}
/* style the top level hover */
#navigation :hover > a, #navigation ul ul :hover > a {
background:url(./images/navigation.png) top left;
}
/* top level image background placements */
#navigation a.link1:hover {background-position:-216px 0px;}
#navigation a.link2 {background-position:0px -40px;}
/* DO NOT consolodate next 2 lines into one, this breaks IE6 */
#navigation a.link2:hover {background-position:-216px -40px;}
#navigation :hover > a.link2, #navigation ul ul :hover > a.link2 {
background-position:-216px -40px;}
#navigation a.link3 {background-position:0px -80px;}
#navigation a.link3:hover{background-position:-216px -80px;}
#navigation :hover > a.link3, #navigation ul ul :hover > a.link3 {
background-position:-216px -80px;}
#navigation a.link4 {background-position:0px -120px;}
#navigation a.link4:hover {background-position:-216px -120px;}
#navigation :hover > a.link4, #navigation ul ul :hover > a.link4 {
background-position:-216px -120px;}
#navigation a.link5 {background-position:0px -160px;}
#navigation a.link5:hover {background-position:-216px -160px;}
#navigation a.link6 {background-position:0px -200px;}
#navigation a.link6:hover {background-position:-216px -200px;}
#navigation ul ul a:hover {background:#fff; color:#103b7d;}
/* make the second level visible when hover on first level list OR link */
#navigation ul li:hover ul,
#navigation ul a:hover ul{visibility:visible; }
/* keep the third level hidden when you hover on first level list OR link */
#navigation ul :hover ul ul{visibility:hidden;}
/* make the third level visible when you hover over second level list OR link */
#navigation ul :hover ul :hover ul{ visibility:visible;}
Alles anzeigen
Dieses Navigationsmenü will ich nun mit Wordpress nachbauen. Dabei habe ich ein Bild erstellt, welches alle das vorher und hover in einem abgebildet hat.
Wie kann ich nun die Ausgabe machen wie
<ul class="link1"> .... <ul class="link2"> etc.
Ich zerbrech mir hier den Kopf finde aber keine Möglichkeit die wp_list_pages diese Informationen weiterzugeben, dass für jedes UL ein element class="link x" möglich ist!
Irgendein Tip?
Merci!
Hallo,
ich benötige dringend einen Ratschlag bezüglich meines 2 Spalten Layouts. Für mein Template habe ich vorgesehen den Content Bereich in zwei Divs zu unterteilen, also
Dabei soll auf der linken Seite text abgebildet werden und auf der rechten seite Bilder.
Im Wordpress Admin kann der Benutzer den Text einer Seite somit erstellen, dass er Text und Bilder untereinander einfügt, bspw.
Text
BILD
Text
BILD
Ich habe nun eine functions.php gebastelt, die sobald sie ein image tag findet, das bild in ein div="content_right" wrappt und den davor liegenden Text in div="content_left". Das funktioniert, zwar aber ich bin sehr unflexibel. Somit habe ich beispielsweise keine Chance mehr im content_left irgendwelche Bilder einzufügen.
Daher meine Frage. Wie würde ihr das lösen, wenn ihr euren content bereich so einfach wie möglich halten wollt aber die möglichkeit bieten wollt, das links text steht und rechts ein dazu passendes bild?
Falls ihr noch mehr Infor benötigt sagt bescheid, ich poste hier den code gerne rein.
vielen dank im voraus!
ja super, das hat geklappt. genau das habe ich gesucht! vielen dank!
vielleicht hast du noch zeit dir meinen anderen post mal anzuschauen. geht um 2 divs im content bereich. krieg die krise :-D
Aber vielen DANK!!!!!
Hallo,
um die URI einer Seite zu erhalten benutze ich folgenden befehl
<?php echo get_permalink(get_page_by_title('pakete')); ?>
Das klappt auch ganz gut, bloss funktioniert dies nicht für subpages. Wie kann ich die ID einer Subpage anhand des slugs bekommen?
Ich habe nun ein wenig recherchiert...
meine idee ist jetzt folgende
im content bereich habe ich zwei divs
content_left und content_right
In left möchte ich den Text eines posts einpacken
und in right möchte ich dann das bild einfügen.
ich müsste nun im content bereich nachschauen ob ein <img> tag kommt, wenn das der fall ist dann würde ich alles was davor kam in das content_left packen und das img in das content_right div.
Damit würde ich den benutzer aber sehr einschränken im WP-Admin! Nichtsdestrotz wenn ich sowas machen möchte.... wie kann ich das hinbekommen???
Hallo,
ich weiss nciht genau wo ich suchen soll.
Und zwar möchte ich im Content Bereich eine Anordungn von Text und Bild haben so wie es auf dem Bild gezeigt ist.....
Dazu habe ich folgenden code damit das so hinhaut...
<div id="content" class="clearfix">
<div class="contentwrapper clearfix">
<div class="content">
<h2>Page Title</h2>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum.
</p>
<p>
In enger Kooperation werden Funktionsstörungen und Schmerzen in einer gemeinsam erarbeiteten Strategie vor
Ort präzise therapiert. Siehe hierzu auch
<a href="/leistungen/kiefergelenksdiagnostik-und-therapie-kopfmedizin-koeln">Kiefergelenksdiagnostik</a>
</p>
</div>
<div class="contentpics">
<div class="contentpic">
<img height="162" width="216" title="" alt="" src="img/bild.jpg"/>
</div>
</div>
</div>
</div>
Alles anzeigen
Meine Frage ist nun wie kann ich genau das im Wordpress Admin Bereich hinbekommen, dass wenn ich eine Page anlege dass ich nur noch Text eingebe und Bild hinzufüge, dass es so aussieht! Ich möchte gerne, dass dies ohne eingabe von irgendwelchen DIVS durch benutzer funktioniert... Vielleicht könnt ihr mir weiterhelfen!
Danke