alchymyth: Erstmal herzlichen Dank für Deine Hilfe!
Es funktioniert soweit, nur leider werden wohl durch die Funktion alles entfernt, nicht nur der a href. Zudem bekommt man beim zweiten Artikel einen Fehler.
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 erstellenalchymyth: Erstmal herzlichen Dank für Deine Hilfe!
Es funktioniert soweit, nur leider werden wohl durch die Funktion alles entfernt, nicht nur der a href. Zudem bekommt man beim zweiten Artikel einen Fehler.
Vielen Dank. Dann wird leider nichts ausgeben.
Gibt es da evtl noch eine Alternative?
Hallo,
ich verzweifle hier langsam. Ich würde gerne alle href Links in the_content() "löschen" sprich das anstatt der Link nur das Wort angezeigt wird.
Hat jemand eine Idee, wie man dies am besten umsetzt?
Ich hatte folgendes getestet:
ZitatAlles anzeigenfunction strip_only($str, $tags) {
if(!is_array($tags)) {
$tags = (strpos($str, '>') !== false ? explode('>', str_replace('<', '', $tags)) : array($tags));
if(end($tags) == '') array_pop($tags);
}
foreach($tags as $tag) $str = preg_replace('#</?'.$tag.'[^>]*>#is', '', $str);
return $str;
}$str = the_content();
echo strip_only($str);
LG und Danke an Euch!
Funktioniert! Ganz herzlichen Dank alchymyth!
Danke, der Fehler lag an der Schreibweise!
[LEFT] [COLOR=#000000] [COLOR=#0000BB]<?php $current_tag [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#0000BB]single_tag_title[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]""[/COLOR][COLOR=#007700], [/COLOR][COLOR=#0000BB]false[/COLOR][COLOR=#007700]); include([/COLOR][COLOR=#0000BB]TEMPLATEPATH [/COLOR][COLOR=#007700]. [/COLOR][COLOR=#DD0000]'/'[/COLOR][COLOR=#007700].[/COLOR][COLOR=#0000BB]$current_tag[/COLOR][COLOR=#007700].[/COLOR][COLOR=#DD0000]".php"[/COLOR][COLOR=#007700]); [/COLOR][COLOR=#0000BB]?>[/COLOR] [/COLOR] [/LEFT]
Bekommst man das so hin, dass er nichts ausgibt wenn die Datei nicht existiert?
Hat noch jemand eine Idee?
Danke für Deine Antwort. Leider das gleiche Problem:
ZitatWarning: main(/wp-content/themes/xxx/Adidas.php) [function.main]: failed to open stream: No such file or directory in /wp-content/themes/xxx/tag.php on line 9
Ich würde gerne eine Datei auf der Tagseite includen, die genau so heißt wie das Tag. Bsp: Tagname.php Den Namen soll aus der single_tag_title kommen.
Haben folgende Varianten getestet, leider ohne Erfolg. Hat jemand eine Idee wo der Fehler liegt?
Zitat1. <?php include(single_tag_title().".php"); ?>
2. <?php $current_tag = single_tag_title("", false); include($current_tag.".php"); ?>
Gibt es eigentlich eine Möglichkeit die tag_description als HTML auszugeben?
Sofern man Standardgemäß HTML einträgt werden diese gelöscht und nur als Text ausgegeben.
Viele Grüße und Danke,
dypor
Kann mir evtl. jemand sagen, welche Dateien hier gefixt wurden?
ZitatFehler beim Upload in die Mediathek wurden beseitigt (Upload und Einbindung mit dem Internet Explorer sind jetzt möglich)
gelöst. "float:left;" ;)
Hast die Logindaten per PM bekommen ;)
Hallo,
leider habe ich das Problem das meine Content Box unter meine Sidebar rutscht, kann jemand evtl. sehen, wo der Fehler liegt?
Vielen Dank im voraus!!!
style.css
body {
background: #f9f9f9 url(pics/br.jpg);
margin: 0px;
padding: 0px 0px 0px 0px;
font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif;
text-align:center;
font-size: 12px;
}
h1 {margin:0px;}
h2 {margin: 0;border-bottom: solid 1px #ccc;}
a {
font-weight: bold;
text-decoration:none;
color: #ffffff;
}
#interface {
width: 1024px;
margin: 0 auto;
text-align:left;
padding:0;
}
#head {
width: 1024px;
height: 152px;
background: #ffffff url(pics/header.jpg);
margin: 0px;
padding: 0px;
}
#head h1 {
color: #5A71024;
padding-top: 20px;
text-align: center;
} .description {text-align: center;}
#menu {
width: 1024px;
height: 38px;
background: #ffffff url(pics/navi.jpg);
}
#menu a{
color: #a01d22;
font-size: 14px;
margin: 0px -50px 0px 60px;
}
#menu a:hover {color:#CCCCCC;}
#menu ul{margin: 0; padding: 0;
}
#menu li{
float:left;
list-style: none;
padding: 0;
margin: 10px 10px 0 10px;
}
#contentbox {
width: 700px;
background: #ffffff;
margin-top: 1px;
margin-left: 250px;
margin-bottom: 0px;
}
#container {
width: 1024px;
padding-top: 2px;
background: #ffffff url(pics/main.jpg);
}
#navi {
float:left;
width: 200px;
}
#navibox {
width: 180px;
background: #ff;
margin-left: 50px;
margin-bottom: 0px;
}
#navibox ul{margin: -0px; padding: 0px;
}
#navibox li{
height: 22px;
margin-bottom: 1px;
background: #a01d21;
padding-left: 5px;
padding-top: 5px;
list-style: none;
}
#content {
float:left;
width: 1024x;
background: #ffffff url(pics/main.jpg);
}
#footer {
clear:both;
width: 1024px;
height: 10px;
background: #ffffff url(pics/footer.jpg);
}
#footerlink{
#float:right;
#margin: 6px 10px 0 10px;
#}
Alles anzeigen