Sziasztok!
Volna egy nagyon összetett kérdésem!
- A sidebar-on a keresésnél nem jelenik meg címként a “Keresés” szó, amit egy kicsit hiányoltam, úgyhogy hatalmas php tudásommal belenyúltam a widgets.php-ba, és megpróbáltam odavarázsolni.
Szóval ez volt eredetileg:
function wp_widget_search($args) {
extract($args);
$searchform_template = get_template_directory() . '/searchform.php';
echo $before_widget;
// Use current theme search form if it exists
if ( file_exists($searchform_template) ) {
include_once($searchform_template);
} else { ?>
<?php _e('Search for:'); ?>
<?php }
echo $after_widget;
}
És ezt csináltam belőle:
function wp_widget_search($args) {
extract($args);
$searchform_template = get_template_directory() . '/searchform.php';
$title = empty($options) ? __('Search') : apply_filters('widget_title', $options);
?>
<?php echo $before_widget; ?>
<?php echo $before_title . $title . $after_title; ?>
-
<?php _e('Search for:'); ?>
// Use current theme search form if it exists
if ( file_exists($searchform_template) ) {
include_once($searchform_template);
} else { ?>
<?php echo $after_widget; ?>
<?php
}
Kicsit elizéltem, mert az oldalon ez is megjelent:
// Use current theme search form if it exists
if ( file_exists($searchform_template) ) {
include_once($searchform_template);
} else { ?>
Nem is értettem! :D Próbáltam php előtag-et adni neki, mert vége már volt, de akkor már minden eltűnt!

Kérdem én; Nagyon-nagy marhaságot csináltam, vagy ez így még elmehet? Tulajdonképpen azt vettem észre, hogy ha olyan dolgot írok a keresőbe, amire 0 találatot ad ki, akkor a sidebar-ról nem tűnik el a kereső, (aminek örülök! :)) illetve hiába írom be, hogy size=15, ha a sidebar szélessége 500px, akkor a kereső input is megnyúlik!
2. A másik kérdésem pedig az lenne, hogy van-e rá mód, egy ilyen keresési eredmény oldal megjelenítésére:
Oldal/Bejegyzés címe
(Kategóriák)
(Cimkék)
texttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttext
Dátum, Idő
Igazából a "texttexttexttexttext" lenne a lényeg, ami a talált oldal első X (100-200) karakterét írná ki!
Köszi előre is!