Sollte functions.php heißen...
Beiträge von Netsnoop
-
-
Hi Markus,
ick habs, du hattest doch Recht :) . Bin nochmal die funktion.php durchgegangen und habe den Code Schnipsel gefunden, welcher mir das Suchfeld immer einblendet...
ZitatAlles anzeigenif (!function_exists('theme_404_content')){ function theme_404_content($args = ''){
$args = wp_parse_args($args,
array(
'error_title' => __('Not Found', THEME_NS),
'error_message' => __( 'Apologies, but the page you requested could not be found. Perhaps searching will help.', THEME_NS),
'focus_script' => '<script type="text/javascript">jQuery(\'div.art-content input[name="s"]\').focus();</script>'
)
);
extract($args);
theme_post_wrapper(
array(
'title' => $error_title,
'content' => '<p class="center">'. $error_message . '</p>' . "\n" . theme_get_search() . $focus_script
)
);Danke & ein schönes Wochenende!
Gruß aus Berlin
Christian -
Hi Marcus,
danke für deinen Post. Ich hab mich jetzt noch ein bissel mit Google belesen. Es ist wohl kein Theme Problem, sonder wohl eher ein Wordpress Problem. Wenn kein Suchbegriff (oder ein Suchbegriff der nicht existiert) im Suchfeld der Suche eingegeben ist, dann interpretiert Wordpress dies als leere Seite, welche nicht existiert und gibt die Fehlermeldung raus:
Jetzt müsste ich nur noch rausfinden, wo ich diese Meldung bearbeiten kann und dann dort das Suchfeld rausnehmen.
Du hast nicht zufällig gleich einen Tip wo ich suchen könnte? Ich fang schon mal an mit googlen, würde mir aber vielleicht etwas Zeit ersparen ;-) .
Gruß Christian
-
-
Hallo,
ich benutze ein Theme welches ich mit Artisteer erstellt habe und habe mir die Suche in die Menüleiste integriert.
Nun habe ich das Problem, dass bei einer erfolglosen Suche (mal davon abgesehen, dass die Suchfunktion von Wordpress nicht gerade toll ist) immer das Suchfeld im Hauptframe angezeigt wird.
Normalerweise wird ja die Suchseite mit der search.php aufgerufen oder nicht? Dort kann ich allerdings nichts finden, was das Aufrufen des Suchfeldes auslöst.
PHP<?php /** * * search.php * * The search results template. Used when a search is performed. * */ get_header(); ?><div class="art-layout-wrapper"> <div class="art-content-layout"> <div class="art-content-layout-row"> <div class="art-layout-cell art-sidebar1"> <?php get_sidebar('default'); ?> <div class="cleared"></div> </div> <div class="art-layout-cell art-content"> <?php get_sidebar('top'); ?> <?php if(have_posts()) { theme_post_wrapper( array('content' => '<h4 class="box-title">' . sprintf( __( 'Search Results for: %s', THEME_NS ), '<span class="search-query-string">' . get_search_query() . '</span>' ) . '</h4>' ) ); /* Display navigation to next/previous pages when applicable */ if (theme_get_option('theme_top_posts_navigation')) { theme_page_navigation(); } /* Start the Loop */ while (have_posts()) { the_post(); get_template_part('content', get_post_format()); } /* Display navigation to next/previous pages when applicable */ if (theme_get_option('theme_bottom_posts_navigation')) { theme_page_navigation(); } } else { theme_404_content( array( 'error_title' => __('Nothing Found', THEME_NS), 'error_message' => __('Sorry, but nothing matched your search criteria. Please try again with some different keywords.', THEME_NS) ) ); } ?> <?php get_sidebar('bottom'); ?> <div class="cleared"></div> </div> </div> </div></div><div class="cleared"></div><?php get_footer(); ?>Könnt ihr mir ein wenig bei der Lösung unter die Arme greifen?
Gruß Christian
P.S. Falls noch Angaben gebraucht werden sagt mir Bescheid, ich such sie dann raus.
-
Gibt es mittlerweile schon eine Lösung anstatt eines Workarrounds?
-
Teil 2:
PHP
Alles anzeigen<tr> <td>Tradedoubler ID:</td> <td><input type=\"text\" name=\"tradedoubler_id\" value=\"".get_option("tradedoubler_id")."\" style=\"width:200px;font-weight:bold;font-size:9pt;height:20px;padding:1px;border:1px solid #DDDDDD;\"/></td> <td>Noch kein <a href=\"http://clkde.tradedoubler.com/click?p(82)a(1618207)g(11705314)\" title=\"register to tradedoubler\" target=\"_blank\">Tradedoubler Partner</a>?</td> </tr> <tr> <td colspan=\"2\"><input type=\"submit\" name=\"appstorechartspaid_save_options\" value=\"save\" style=\"width:310px;font-weight:bold;font-size:9pt;height:20px;padding:1px;border:1px solid #DDDDDD;\"/></td> </tr> </table> </form> </div> "; echo $AdminPage; } function itunes_appstorecharts_add_menu() { add_options_page('itunes_appstorechartspaid', 'Appstore Charts Paid', 9, __FILE__, array('ituneschartspaid_widget','itunes_appstorechartspaid_option_page')); } } ?>Das Problem ist, wenn ich etwas im Adminmenü bei dem Free Apps ändere übernimmt er dies auch für die anzeige der Pay Apps , er zeigt dort also auch die Free Apps an. Ich habe noch nicht gecheckt wo er das speichert was er anzeigen soll... in dem jeweiligen Widget...
Ich hoffe es kann mir jemand auf die Spünge helfen.
LG aus Berlin
Christian -
und hier der Code von den Pay Apps (Teil 1):
PHP
Alles anzeigen<?php /* Plugin Name: Appstore Charts Plugin URI: http://www.milchrausch.de/wordpress-plugin-itunes-appstore-charts-widget/ Description: Appstore Charts is a free configurable widget to display the current download charts in the iTunes Appstore Version: 1.2 Author: Hauke Leweling Author URI: http://www.milchrausch.de Update Server: http://wordpress.org/extend/plugins/itunes-appstore-charts/ Min WP Version: 2.7.0 Max WP Version: 2.7.1 */ add_action("widgets_init", array('ituneschartspaid_widget', 'register')); add_action("widgets_init", array('ituneschartspaid_widget', 'update_contents')); add_action("admin_menu", array('ituneschartspaid_widget', 'itunes_appstorecharts_add_menu')); register_activation_hook( __FILE__, array('ituneschartspaid_widget', 'activate')); register_deactivation_hook( __FILE__, array('ituneschartspaid_widget', 'deactivate')); class ituneschartspaid_widget { function control() { echo "Configuration is stored under Settings"; } function register() { register_sidebar_widget('AppStore Charts Paid', array('ituneschartspaid_widget', 'widget')); register_widget_control('AppStore Charts Paid', array('ituneschartspaid_widget', 'control')); } function activate() { add_option("itunescharts_lastrefresh","0"); add_option("itunescharts_content",""); add_option("appstorecharts_country","143443"); add_option("appstorecharts_dispalaytop","10"); add_option("appstorecharts_show","toppaidapplications"); add_option("tradedoubler_id","1618207"); } function deactivate() { } function update_contents() { if(get_option("itunescharts_lastrefresh") < time() - 1800) { $RSSFile = "http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/".get_option("appstorecharts_show")."/sf=".get_option("appstorecharts_country")."/limit=".get_option("appstorecharts_dispalaytop")."/xml"; include_once(dirname(__FILE__)."/magpierss/rss_fetch.inc"); //include_once(ABSPATH . WPINC . '/rss.php'); $RSS = fetch_rss($RSSFile); $APPS = array(); foreach($RSS->items as $Key => $ITEM) { $Application = array(); $Application['TITLE'] = utf8_encode($ITEM['title']); $Application['ITUNES'] = utf8_encode($ITEM['id']); $Application['DESC'] = utf8_encode($ITEM['summary']); $Application['PRICE'] = utf8_encode($ITEM['im']['price']); $Application['NAME'] = utf8_encode($ITEM['im']['name']); $Application['ARTIST'] = utf8_encode($ITEM['im']['artist']); $Application['IMAGE'] = utf8_encode($ITEM['im']['image']); $Application['RELEASE'] = utf8_encode($ITEM['im']['releasedate']); $Application['PREVIEW'] = utf8_encode($ITEM['link_enclosure']); $Application['RIGHTS'] = utf8_encode($ITEM['rights']); $Application['ATOM'] = utf8_encode($ITEM['atom_content']); array_push($APPS,$Application); } update_option("itunescharts_content",$APPS); update_option("itunescharts_lastrefresh",time()); } } function widget($args) { $i = 1; // setzt die Position (1., 2., 3.) echo $args['before_widget']; echo $args['before_title'] . 'TOP Paid Apps' . $args['after_title']; $PartnerID = get_option("tradedoubler_id"); //echo "<ul>"; echo "<br>"; foreach(get_option("itunescharts_content") as $Key => $App) { echo " <table width=\"200\" border=\"0\">"; echo " <tr>"; echo " <th width=\"54\" scope=\"col\"><img src=\"".substr($App['IMAGE'],0,strpos($App['IMAGE'],"jpghttp"))."jpg\" alt=\"".$App['TITLE']."\"/></th>"; echo " <th scope=\"col\"><div align=\"left\"><a href=\"".$App['ITUNES']."&partnerId=2003\" rel=\"nofollow\"><font size=\"2\">".substr($App['NAME'],0,45)."</font></a><br><font size=\"1\">".substr($App['ARTIST'],0,45)."</font></div></th>"; echo " </tr>"; echo " </table>"; $i++; } echo "<li>"; echo "<a href=\"http://www.milchrausch.de\">by milchrausch.de</a>"; echo "</li>"; // echo "</ul>"; echo $args['after_widget']; } function itunes_appstorechartspaid_option_page() { $AdminPage = null; if(isset($_POST['appstorechartspaid_save_options'])) { update_option("appstorechartspaid_country",attribute_escape($_POST['appstorecharts_country'])); update_option("appstorechartspaid_dispalaytop",attribute_escape($_POST['appstorecharts_dispalaytop'])); update_option("appstorecharts_show",attribute_escape($_POST['appstorecharts_show'])); update_option("tradedoubler_id",attribute_escape($_POST['tradedoubler_id'])); update_option("ituneschartspaid_lastrefresh",0); } $Countries = array( 143443 => "Germany", 143452 => "Netherlands", 143441 => "USA", 143469 => "Russia", 143444 => "UK", 143459 => "Switzerland", 143465 => "China", 143448 => "Greece", 143450 => "Italy", 143461 => "New Zealand" ); asort($Countries); $AdminPage .= " <div class=\"wrap\"> <h2>Appstore Chart Paid Configuration</h2> <form name=\"ifs_comment_config\" action=\"".get_settings("siteurl")."/wp-admin/options-general.php?page=itunes-appstore-charts-paid/appstore_charts.php\" method=\"post\"> <table> <tr> <td>Country:</td> <td> <select name=\"appstorecharts_country\" style=\"width:200px;font-weight:bold;\">"; foreach($Countries as $Key => $Country) { $AdminPage .= "<option value=\"".$Key."\""; if(get_option("appstorecharts_country") == $Key) $AdminPage .= " selected=\"selected\""; $AdminPage .= ">".$Country."</option>"; } $AdminPage .= "</select> </td> </tr> <tr> <td>Display Top:</td> <td> <select name=\"appstorecharts_dispalaytop\" style=\"width:200px;font-weight:bold;\"> <option value=\"3\""; if(get_option("appstorecharts_dispalaytop") == 3) $AdminPage .= " selected=\"selected\""; $AdminPage .= ">3</option> <option value=\"5\""; if(get_option("appstorecharts_dispalaytop") == 5) $AdminPage .= " selected=\"selected\""; $AdminPage .= ">5</option> <option value=\"10\""; if(get_option("appstorecharts_dispalaytop") == 10) $AdminPage .= " selected=\"selected\""; $AdminPage .= ">10</option> <option value=\"25\""; if(get_option("appstorecharts_dispalaytop") == 25) $AdminPage .= " selected=\"selected\""; $AdminPage .= ">25</option> <option value=\"50\""; if(get_option("appstorecharts_dispalaytop") == 50) $AdminPage .= " selected=\"selected\""; $AdminPage .= ">50</option> <option value=\"100\""; if(get_option("appstorecharts_dispalaytop") == 100) $AdminPage .= " selected=\"selected\""; $AdminPage .= ">100</option> </select> </td> </tr> <tr> <td>Show:</td> <td> <select name=\"appstorecharts_show\" style=\"width:200px;font-weight:bold;\"> <option value=\"topfreeapplications\""; if(get_option("appstorecharts_show") == "topfreeapplications") $AdminPage .= " selected=\"selected\""; $AdminPage .= ">free Apps</option> <option value=\"toppaidapplications\""; if(get_option("appstorecharts_show") == "toppaidapplications") $AdminPage .= " selected=\"selected\""; $AdminPage .= ">paid Apps</option> </select> </td> </tr> -
Teil 2
PHP
Alles anzeigen<tr> <td>Tradedoubler ID:</td> <td><input type=\"text\" name=\"tradedoubler_id\" value=\"".get_option("tradedoubler_id")."\" style=\"width:200px;font-weight:bold;font-size:9pt;height:20px;padding:1px;border:1px solid #DDDDDD;\"/></td> <td>Noch kein <a href=\"http://clkde.tradedoubler.com/click?p(82)a(1618207)g(11705314)\" title=\"register to tradedoubler\" target=\"_blank\">Tradedoubler Partner</a>?</td> </tr> <tr> <td colspan=\"2\"><input type=\"submit\" name=\"appstorecharts_save_options\" value=\"save\" style=\"width:310px;font-weight:bold;font-size:9pt;height:20px;padding:1px;border:1px solid #DDDDDD;\"/></td> </tr> </table> </form> </div> "; echo $AdminPage; } function itunes_appstorecharts_add_menu() { add_options_page('itunes_appstorecharts', 'Appstore Charts Free', 9, __FILE__, array('itunescharts_widget','itunes_appstorecharts_option_page')); } } ?> -
Hier ist mein Code vom Free Apps Widget (Teil1 - da nur 10000 Zeichen erlaubt sind):
PHP
Alles anzeigen<?php add_action("widgets_init", array('itunescharts_widget', 'register')); add_action("widgets_init", array('itunescharts_widget', 'update_contents')); add_action("admin_menu", array('itunescharts_widget', 'itunes_appstorecharts_add_menu')); register_activation_hook( __FILE__, array('itunescharts_widget', 'activate')); register_deactivation_hook( __FILE__, array('itunescharts_widget', 'deactivate')); class itunescharts_widget { function control() { echo "Configuration is stored under Settings"; } function register() { register_sidebar_widget('AppStore Charts Free', array('itunescharts_widget', 'widget')); register_widget_control('AppStore Charts Free', array('itunescharts_widget', 'control')); } function activate() { add_option("itunescharts_lastrefresh","0"); add_option("itunescharts_content",""); add_option("appstorecharts_country","143443"); add_option("appstorecharts_dispalaytop","10"); add_option("appstorecharts_show","topfreeapplications"); add_option("tradedoubler_id","1618207"); } function deactivate() { } function update_contents() { if(get_option("itunescharts_lastrefresh") < time() - 1800) { $RSSFile = "http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/".get_option("appstorecharts_show")."/sf=".get_option("appstorecharts_country")."/limit=".get_option("appstorecharts_dispalaytop")."/xml"; include_once(dirname(__FILE__)."/magpierss/rss_fetch.inc"); //include_once(ABSPATH . WPINC . '/rss.php'); $RSS = fetch_rss($RSSFile); $APPS = array(); foreach($RSS->items as $Key => $ITEM) { $Application = array(); $Application['TITLE'] = utf8_encode($ITEM['title']); $Application['ITUNES'] = utf8_encode($ITEM['id']); $Application['DESC'] = utf8_encode($ITEM['summary']); $Application['PRICE'] = utf8_encode($ITEM['im']['price']); $Application['NAME'] = utf8_encode($ITEM['im']['name']); $Application['ARTIST'] = utf8_encode($ITEM['im']['artist']); $Application['IMAGE'] = utf8_encode($ITEM['im']['image']); $Application['RELEASE'] = utf8_encode($ITEM['im']['releasedate']); $Application['PREVIEW'] = utf8_encode($ITEM['link_enclosure']); $Application['RIGHTS'] = utf8_encode($ITEM['rights']); $Application['ATOM'] = utf8_encode($ITEM['atom_content']); array_push($APPS,$Application); } update_option("itunescharts_content",$APPS); update_option("itunescharts_lastrefresh",time()); } } function widget($args) { $i = 1; // setzt die Position (1., 2., 3.) echo $args['before_widget']; echo $args['before_title'] . 'TOP Free Apps' . $args['after_title']; $PartnerID = get_option("tradedoubler_id"); //echo "<ul>"; echo "<br>"; foreach(get_option("itunescharts_content") as $Key => $App) { echo " <table width=\"200\" border=\"0\">"; echo " <tr>"; echo " <th width=\"54\" scope=\"col\"><img src=\"".substr($App['IMAGE'],0,strpos($App['IMAGE'],"jpghttp"))."jpg\" alt=\"".$App['TITLE']."\"/></th>"; echo " <th scope=\"col\"><div align=\"left\"><a href=\"".$App['ITUNES']."&partnerId=2003\" rel=\"nofollow\"><font size=\"2\">".substr($App['NAME'],0,45)."</font></a><br><font size=\"1\">".substr($App['ARTIST'],0,45)."</font></div></th>"; echo " </tr>"; echo " </table>"; $i++; } /echo "<li>"; echo "<a href=\"http://www.milchrausch.de\">by milchrausch.de</a>"; echo "</li>"; // echo "</ul>"; echo $args['after_widget']; } function itunes_appstorecharts_option_page() { $AdminPage = null; if(isset($_POST['appstorecharts_save_options'])) { update_option("appstorecharts_country",attribute_escape($_POST['appstorecharts_country'])); update_option("appstorecharts_dispalaytop",attribute_escape($_POST['appstorecharts_dispalaytop'])); update_option("appstorecharts_show",attribute_escape($_POST['appstorecharts_show'])); update_option("tradedoubler_id",attribute_escape($_POST['tradedoubler_id'])); update_option("itunescharts_lastrefresh",0); } $Countries = array( 143443 => "Germany", 143452 => "Netherlands", 143441 => "USA", 143469 => "Russia", 143444 => "UK", 143459 => "Switzerland", 143465 => "China", 143448 => "Greece", 143450 => "Italy", 143461 => "New Zealand" ); asort($Countries); $AdminPage .= " <div class=\"wrap\"> <h2>Appstore Chart Free Configuration</h2> <form name=\"ifs_comment_config\" action=\"".get_settings("siteurl")."/wp-admin/options-general.php?page=itunes-appstore-charts-free/appstore_charts.php\" method=\"post\"> <table> <tr> <td>Country:</td> <td> <select name=\"appstorecharts_country\" style=\"width:200px;font-weight:bold;\">"; foreach($Countries as $Key => $Country) { $AdminPage .= "<option value=\"".$Key."\""; if(get_option("appstorecharts_country") == $Key) $AdminPage .= " selected=\"selected\""; $AdminPage .= ">".$Country."</option>"; } $AdminPage .= "</select> </td> </tr> <tr> <td>Display Top:</td> <td> <select name=\"appstorecharts_dispalaytop\" style=\"width:200px;font-weight:bold;\"> <option value=\"3\""; if(get_option("appstorecharts_dispalaytop") == 3) $AdminPage .= " selected=\"selected\""; $AdminPage .= ">3</option> <option value=\"5\""; if(get_option("appstorecharts_dispalaytop") == 5) $AdminPage .= " selected=\"selected\""; $AdminPage .= ">5</option> <option value=\"10\""; if(get_option("appstorecharts_dispalaytop") == 10) $AdminPage .= " selected=\"selected\""; $AdminPage .= ">10</option> <option value=\"25\""; if(get_option("appstorecharts_dispalaytop") == 25) $AdminPage .= " selected=\"selected\""; $AdminPage .= ">25</option> <option value=\"50\""; if(get_option("appstorecharts_dispalaytop") == 50) $AdminPage .= " selected=\"selected\""; $AdminPage .= ">50</option> <option value=\"100\""; if(get_option("appstorecharts_dispalaytop") == 100) $AdminPage .= " selected=\"selected\""; $AdminPage .= ">100</option> </select> </td> </tr> <tr> <td>Show:</td> <td> <select name=\"appstorecharts_show\" style=\"width:200px;font-weight:bold;\"> <option value=\"topfreeapplications\""; if(get_option("appstorecharts_show") == "topfreeapplications") $AdminPage .= " selected=\"selected\""; $AdminPage .= ">free Apps</option> <option value=\"toppaidapplications\""; if(get_option("appstorecharts_show") == "toppaidapplications") $AdminPage .= " selected=\"selected\""; $AdminPage .= ">paid Apps</option> </select> </td> </tr> -
Hi,
ich benutze das Plugin Appstore Charts und habe folgendes Problem.
In diesem Plugin kann man auswählen ob man die Charts der Free oder der Pay Apps angezeigt haben möchte. Ich habe mir daraus 2 Widgets gebaut weil ich mir in dem einen Widget die Free Apps und in dem anderen die Pay Apps anzeigen lassen möchte.
-
Komisch, benutze IE7 und FF3 und bei mir sah es so aus wie auf meinen Pic´s.
Nunja, ich habe es jetzt doch hinbekommen, war wohl etwas spät gestern abend :mrgreen:
Meine sidebar.php sieht jetzt so aus:
PHP
Alles anzeigen<!-- "RSS Links" --> <div id="RSS"><a href="<?php bloginfo('rss2_url'); ?>"><?php _e('Syndicate this site using RSS'); ?></a><br /></div> <hr /> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> <!-- Standard-Sidebar, wenn keine Widgets vorhanden sind --> <!-- "Pages" --> <h2><?php _e('Pages'); ?></h2> <ul> <?php wp_list_pages('title_li='); ?> </ul> <hr /> <!-- "Categories" --> <h2><?php _e('Categories'); ?></h2> <ul> <?php wp_list_categories('show_count=1&title_li='); ?> </ul> <hr /> <!-- "Archives" --> <h2><?php _e('Archives'); ?></h2> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> <!-- "Blogroll" --> <?php /* Links */ if ( (is_home()) and !(is_page()) and !(is_single()) and !(is_search()) and !(is_archive()) and !(is_author()) and !(is_category()) and !(is_paged()) ) { $links_list_exist = @$wpdb->get_var("SELECT link_id FROM $wpdb->links LIMIT 1"); if($links_list_exist) { ?> <hr /> <div id="blogroll"> <?php wp_list_bookmarks(); ?> </div> <?php } ?> <?php } ?> <?php endif; ?>Und meine functions.php sieht so aus:
PHP
Alles anzeigen<?php if ( function_exists('register_sidebar') ) { register_sidebar( array( 'before_widget' => '', 'after_widget' => '<hr/>', 'before_title' => '<h2>', 'after_title' => '</h2>' ) ); } ?>Das h2 halt für die fette Überschrift und das hr für die Linie die die Widget trennt.
Ein Design-Problem hab ich aber noch, dazu aber in einem neuen Thread ;-)
-
Hab jetzt nochmal ein bissel rumprobiert und bin ein gutes Stück weiter gekommen. Jetzt ist nur noch der im Bild rot markierte Umbruch zu klären, dann wars das ja... :mrgreen:
-
Ich habe im Anhang nochmal versucht zu erläutern was ich möchte ;-)
-
Das "nur" gibt mir da wieder Hoffnung :mrgreen: .
Hier ist der Link zur Seite. Momentan habe ich wieder die Links alá Widgets aktiviert oder sollte ich das lieber lassen und das "normale" Seitenmenü wählen?
-
Hi maxe,
jup, soweit habe ich es ja hinbekommen, mein Problem ist das Layout.
Normalerweise müsste es so ausschaun wie in diesem Anhang.
-
Ist es überhaupt möglich dieses Theme widgetfähig zu machen?
Muss ich hier vielleicht noch andere Sachen definieren?
PHP'before_widget' => '<div id="Bar" class="Bar">', 'after_widget' => '</div>', 'before_title' => '<div class="BarBox h2">', 'after_title' => '</div>' ) );Es wäre echt super wenn mich jemand mal in die richtige Richtung lenken könnte.
-
Hallöchen,
ich habe mich nun nach 3 Stunden doch entschlossen hier mal ein paar Profis zu fragen :mrgreen: .
Ich benutze ein Theme (iPhonFan) welches ich wigdetfähig machen möchte. Ich habe mich schon durchgegoogelt und weiß das ich:
1. eine functions.php brauche
oder
PHP
Alles anzeigen<?php if ( function_exists('register_sidebar') ) { register_sidebar( array( 'before_widget' => '<div id="..." class="...">', 'after_widget' => '</div>', 'before_title' => '<div class="...">', 'after_title' => '</div>' ) ); } ?>und
2. diesen Verweis in der sidebar.php
bzw.
PHP<ul id="sidebar"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> <?php endif; ?> </ul>Meine sidebar.php sieht so aus:
PHP
Alles anzeigen<!-- WP Termina Loop | Inicia Sidebar --> </div> <!-- DIV de cierre 'iPhoneContainer' --> </div> <!-- DIV de cierre 'IPhoneScreen' --> <div id="iPhoneFooter"> <!-- Parte Inferior del iPhone --> <div class="home"><a href="<?php echo get_option('home'); ?>/"><img src="<?php bloginfo('stylesheet_directory'); ?>/pix/blank.gif" width="50" height="50" border="0" /></a></div> </div> </div> <!-- DIV de cierre 'IPhoneBox' --> <!-- Termina iPhone Body | Inicia Barra Lateral --> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <div id="Bar"> <div id="BarHeader"></div> <div id="BarContainer"> <img src="<?php bloginfo('stylesheet_directory'); ?>/pix/blank.gif" width="220" height="1" border="0" /> <!-- Patch --> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> <!-- Standard-Sidebar, wenn keine Widgets vorhanden sind --> <div id="BarBox"> <!-- Search --> <h2><?php _e('Search'); ?></h2> <div id="search"> <?php include (TEMPLATEPATH . '/searchform.php'); ?> </div> <!-- "Search Data" --> <?php if ( is_404() || is_category() || is_day() || is_month() || is_year() || is_search() || is_paged() ) { ?> <?php /* If this is a 404 page */ if (is_404()) { ?> <?php /* If this is a category archive */ } elseif (is_category()) { ?> <p class="data_b">You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p> <?php /* If this is a yearly archive */ } elseif (is_day()) { ?> <p class="data_t">You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives for the day <?php the_time('l, F jS, Y'); ?>.</p> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <p class="data_t">You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives for <?php the_time('F, Y'); ?>.</p> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <p class="data_t">You are currently browsing the <a href="<?php bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives for the year <?php the_time('Y'); ?>.</p> <?php /* If this is a monthly archive */ } elseif (is_search()) { ?> <p class="data_s">You have searched the <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives for <strong>'<?php the_search_query(); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p> <?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <p class="data_b">You are currently browsing the <a href="<?php echo bloginfo('url'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives.</p> <?php } ?> <?php } ?> <hr/> <!-- "RSS Links" --> <div id="RSS"><a href="<?php bloginfo('rss2_url'); ?>"><?php _e('Syndicate this site using RSS'); ?></a><br /></div> <hr /> <!-- "Pages" --> <h2><?php _e('Pages'); ?></h2> <ul> <?php wp_list_pages('title_li='); ?> </ul> <hr /> <!-- "Categories" --> <h2><?php _e('Categories'); ?></h2> <ul> <?php wp_list_categories('show_count=1&title_li='); ?> </ul> <hr /> <!-- "Archives" --> <h2><?php _e('Archives'); ?></h2> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> <!-- "Blogroll" --> <?php /* Links */ if ( (is_home()) and !(is_page()) and !(is_single()) and !(is_search()) and !(is_archive()) and !(is_author()) and !(is_category()) and !(is_paged()) ) { $links_list_exist = @$wpdb->get_var("SELECT link_id FROM $wpdb->links LIMIT 1"); if($links_list_exist) { ?> <hr /> <div id="blogroll"> <?php wp_list_bookmarks(); ?> </div> <?php } ?> <?php } ?> <!-- "Theme Credit" --> <hr /> <div id="Karma"> <div id="kb"><a href="http://www.iphonefan.com/blog"><img src="<?php bloginfo('stylesheet_directory'); ?>/pix/Sticker_iPF.png" width="60" height="60" border="0" /></a></div> <a href="http://iphonefan.com/wordpress_theme/"><span class="kt">iPhoneFan</span><br/>Wordpress Theme</a><br /><br /> Designed by <a href="http://bacteriano.com">Bacteriano</a> <!--based on iPhone PSD file designed by <a href="http://manicho.deviantart.com">Manicho</a>-->. </div> <img src="<?php bloginfo('stylesheet_directory'); ?>/pix/blank.gif" width="220" height="1" border="0" /> <!-- Patch --> </div> <!-- DIV de cierre 'BarBox' --> <img src="<?php bloginfo('stylesheet_directory'); ?>/iPF_pix/ipf_null.gif" width="220" height="1" border="0" /> <!-- Patch para Firefox --> </div> <!-- DIV de cierre 'BarContainer' --> <div id="BarFooter"></div> <!-- "WP Credit" --> <div id="WP" align="center"> <a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform."><img src="<?php bloginfo('stylesheet_directory'); ?>/pix/Sticker_WP.png" border="0" /></a> <?php wp_meta(); ?> </div> </div> <!-- DIV de cierre 'Bar' --> <?php endif; ?>Meine functions.php so:
PHP
Alles anzeigen<?php if ( function_exists('register_sidebar') ) { register_sidebar( array( 'before_widget' => '<div id="" class="">', 'after_widget' => '</div>', 'before_title' => '<div class="">', 'after_title' => '</div>' ) ); } ?>Und meine style.css Auszugsweise...
PHP
Alles anzeigen/* @group Sidebar */ #Bar { float: right; width: 240px; } #BarHeader { width: 240px; height: 20px; background-image: url(pix/ipf_sb_head.png); behavior: url(iepngfix.htc); margin-top: 17px; } #BarContainer { width: 240px; height: auto; background: url(pix/ipft_sb_body.png) repeat-y; behavior: url(iepngfix.htc); } #BarBox { font-size: 13px; margin-left: 20px; width: 200px; } /* @group Busqueda */ #search { margin-top: 15px; } .busqueda { text-align: center; } #bsqd {width: 150px;} #bsqd, #submit {vertical-align: bottom; } #bsqd, input[type="text"], input[type="password"], textarea { background: #ccc; border: 2px solid; border-color: #000 #D9D9D9 #D9D9D9 #000;} .data_s { width: 160px; background: url(pix/spot.png) no-repeat; padding-left: 30px; font-size: 10px; margin-left: 10px; padding-bottom: 3px; } .data_b { width: 160px; background: url(pix/safari.png) no-repeat; padding-left: 30px; font-size: 10px; margin-left: 10px; padding-bottom: 3px; } .data_t { width: 160px; background: url(pix/calendar.png) no-repeat; padding-left: 30px; font-size: 10px; margin-left: 10px; padding-bottom: 3px; } /* @end */ #RSS { height: 24px; width: 160px; padding-left: 30px; line-height: 12px; background: url(pix/feed-icon-24x24.png) no-repeat; margin-bottom: 10px; margin-left: 10px; margin-top: 15px; } #BarBox h2 { color: #69c; font-size: 16px; text-align: left; margin-top: 0; margin-bottom: -12px; } #BarBox ul { list-style-type: none; list-style-image: none; margin-bottom: 15px; } #BarBox li { list-style-type: none; list-style-image: none; text-indent: -5px; margin-left: -25px; margin-bottom: 1px; margin-top: 0; } #BarBox a { color: #fff; } #BarBox a:hover { color: #fbcc18; } .morelasts { padding-top: 2px; padding-bottom: 2px; } #blogroll { padding-left: 30px; } #creditos { margin-top: 20px; } #BarFooter { width: 240px; height: 25px; background-image: url(pix/ipf_sb_bottom.png); behavior: url(iepngfix.htc); } #Karma { margin-top: 10px; width: 130px; padding-left: 70px; font-size: 10px; background-repeat: no-repeat; } .kt { font-size: 12px; } #kb { width: 60px; height: 60px; float: left; margin-left: -70px; } #WP { margin-top: 60px; width: 200px; margin-left: auto; margin-right: auto; } /* @end */Vorab ich bin kein Profi und mache sowas nicht täglich...
Geändert habe ich zum Bsp. schon in der functions.php:
PHP'before_widget' => '<div id="BarHeader bzw. BarContainer" class="BarHeader bzw. BarContainer">', 'after_widget' => '</div>', 'before_title' => '<div class="BarBox h2 oder BarHeader">', 'after_title' => '</div>' ) );[COLOR=Black]
Und habe dann gegenteilig in der sidebar.php den Code in den Zeilen verschoben:
[/COLOR]
Nunja, nicht immer nach Plan... :-?
Momentan sieht es so aus wie im Anhang meines Posts.
-
Alphawolf
Danke, aber das hat hier irgendwie die Formatierung gemacht, bei mir im Code stehen keine <A href ;-) -
Ich glaube ich sollte immer mal noch ein bissel warten, obwohl ich vorher schon viel rumprobiert hatte habe ich es eben hinbekommen, mit diesem Code:
HTML
Alles anzeigen<h2><b>News</b></h2> <ul> <script language="JavaScript"> var tickerheight = 50; var tickerwidth = 200; var bordersize = 0; var fontspace = 5; var font = "Helvetica"; var fontsize = 12; var fontbold = 0; var rubrik = 13; var sparte = 4; var font_underline = 0; var rollover_underline = 0; var bordercolor = "#f3f3f3"; var tickercolor = "#f3f3f3"; var fontcolor = "#000000"; var rollovercolor = "#990000"; var visitedlink = "#ffffff"; var transparent = 0; var tickertyp = 1; var cellpadding = 5; var cellspacing = 0; var numbernews = 5; var tickertyp = 1; var u_id = 320910; </script> <script charset="iso-8859-1" language="JavaScript" src="http://newsticker.shortnews.de/de/js/free/4/rubrik.js"></script> <script charset="iso-8859-1" language="JavaScript" src="http://newsticker.shortnews.de/de/js/free/4/ticker.js"></script> </ul>
...vielleicht hat ja jemand auch mal so ein Problem und findet dann diesn Beitrag mit Hilfe der Suchfunktion ;-)
Gruß Netsnoop