Jump to content

modificare meniu site pe platforma wordpress


tyiby
 Share

Recommended Posts

Salu, am nevoie de putin ajutor pentru a integra bara de cautare in meniul site-ului.

site-ul este xux.ro, iar tema este Whimag, o puteti descarca gratuit de aici: http://www.magpress.com/wordpress-themes/whimag.html

tot ce am nevoie e sa imi spuneti unde anume sa pun codul acesta, codul folosit la cautarea pe site:

 

<form action="http://xux.ro/cautare/" method="get">
<script_blocat="text" name="q" class="search">
<script_blocat="submit" style="background:#D8E6EB;border:0;color:#474747" value="caută">
</form>

vreau sa fie pe partea dreapta, in bara din meniul site-ului. gen cum au astia: http://www.addictivetips.com/

Link to comment
Share on other sites

Wordpress dispune de widget pentru cautare, l-ai activat in sidebar si nu iti apare?

am cautare personalizata cu google, integrata in site, nu folosesc p-aia din wordpress. http://xux.ro/cautare/

vreau sa pun căsuţa aia de căutare in meniul de sus, nu in sidebar! pentru asta trebuie sa mi se indice locatia unde sa pun acel cod, de mai sus..

Link to comment
Share on other sites

header.php din tema:

 

<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html <?php language_attributes(); ?> class="no-js"> <!--<![endif]-->
script_blocat>
script_blocat charset="<?php bloginfo( 'charset' ); ?>" />
script_blocat name="viewport" content="width=device-width, initial-scale=1.0">
<script_blocat="profile" href="http://gmpg.org/xfn/11">
<?php get_template_part ( '/lib/options/options-var' ); ?>
<title>
<?php global $page, $paged;
wp_title( '|', true, 'right' );
// Add the blog name.
bloginfo( 'name' );
// Add the blog description for the home/front page.
$site_description = get_bloginfo( 'description', 'display' );
if ( $site_description && ( is_home() || is_front_page() ) )
echo " | $site_description";
// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
echo ' | ' . sprintf( __( 'Page %s', TEMPLATE_DOMAIN ), max( $paged, $page ) );
?>
</title>
<?php do_action( 'bp_head' ) ?>
<!-- STYLESHEET INIT -->
<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" />
<?php if( function_exists('theme_custom_google_font')) { echo theme_custom_google_font(); } ?>
<?php if( get_theme_option('body_font') == 'Choose a font' || get_theme_option('body_font') == '') { ?>
<link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Asap:400,400italic,700,700italic' rel='stylesheet' type='text/css'>
<?php } ?>
<!-- favicon.ico location -->
<script_blocat="icon" href="http://xux.ro/wp-content/uploads/favicon.ico" type="images/x-icon" />
<script_blocat="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<!--[if lt IE 9]>
<script_blocat="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--[if gte IE 9]>
<style type="text/css">
#main-navigation,.post-meta,a.button,input[type='button'], input[type='submit'],h1.post-title,.wp-pagenavi a,#sidebar .item-options,.iegradient,h3.widget-title,.footer-bottom,.sf-menu .current_page_item a, .sf-menu .current_menu_item a, .sf-menu .current-menu-item a,.sf-menu .current_page_item a:hover, .sf-menu .current_menu_item a:hover, .sf-menu .current-menu-item a:hover {filter: none !important;}
</style>
<![endif]-->
<?php wp_head(); ?>
<?php if ( is_home() && get_theme_option('slider_on') == 'Enable' ) { ?>
<!-- Hook up the Slider -->
<script_blocat="text/javascript">
function startGallery() {
var myGallery = new gallery($('myGallery'), {
timed: true,
showArrows: true,
showCarousel: false,
embedLinks: true
});
document.gallery = myGallery;
}
window.onDomReady(startGallery);
</script>
<?php } ?>

<script_blocat="text/javascript">
jQuery.noConflict();
var $fc = jQuery;
$fc(document).ready(function() {
$fc("a[rel=gallery_group]").fancybox({
'transitionIn' : 'none',
'transitionOut' : 'none',
'titlePosition' : 'over',
'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
 return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? '   ' + title : '') + '</span>';
}
});
});
</script>
<script_blocat="text/javascript">
jQuery.noConflict();
var $sf = jQuery;
$sf(document).ready(function(){
 $sf("ul.sf-menu").supersubs({
	 minWidth: 15, // minimum width of sub-menus in em units
	 maxWidth: 15, // maximum width of sub-menus in em units
	 extraWidth: 1	 // extra width can ensure lines don't sometimes turn over
						 // due to slight rounding differences and font-family
 }).superfish(); // call supersubs first, then superfish, so that subs are
					 // not display:none when measuring. Call before initialising
					 // containing tabs for same reason.
});
</script>
<?php $g_analytics = get_theme_option('google_analytics'); echo stripcslashes($g_analytics); ?>
<?php print "<style type='text/css' media='all'>"; ?>
<?php get_template_part ( '/lib/options/options-css' ); ?>

<?php
$bodytype = get_theme_option('body_font');
$headtype = get_theme_option('headline_font');
$navtype = get_theme_option('navigation_font');
if($bodytype=='Museo, Georgia, Serif' || $headtype=='Museo, Georgia, Serif' || $navtype=='Museo, Georgia, Serif'): ?>
<?php get_template_part ( '/lib/fonts/museo700/museo700' ); ?>
<?php endif; ?>
<?php if( !has_nav_menu('primary') ) : ?>
.sf-menu li:hover ul,.sf-menu li.sfHover ul {left:0;top:2.5em;}
<?php endif; ?>
<?php if( get_theme_option('social_on') == 'Yes'): ?>
<?php endif; ?>
<?php print "</style>"; ?>
</head>
<body <?php body_class(); ?> id="custom">
<?php if( get_theme_option('social_on') == 'Yes') { ?>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<?php } ?>
<?php do_action( 'bp_before_wrapper' ) ?>
<div id="wrapper">
<?php do_action( 'bp_before_header' ) ?>
<!-- HEADER START -->
<header class="iegradient" id="header" role="banner">
<div class="header-inner">
<div class="innerwrap">
<div id="siteinfo">
<?php
global $shortname, $option_upload_path, $option_upload_url;
if( file_exists( $option_upload_path . '/' . $shortname . '_header_logo.jpg' ) ) { ?>
<a href="<?php echo home_url( '/' ); ?>" title="<?php bloginfo('name'); ?>"><img src="<?php echo $option_upload_url . '/' . $shortname . '_header_logo.jpg'; ?>" alt="<?php bloginfo('name'); ?>" /></a>
<?php } else { ?>
<h1><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1><p id="site-description"><?php bloginfo( 'description' ); ?></p>
<?php } ?>
</div><!-- SITEINFO END -->
<?php $header_banner = get_theme_option('header_embed'); if($header_banner == '') { ?>
<?php } else { ?><div id="topbanner"> <?php echo get_theme_option('header_embed'); ?></div><!-- TOPBANNER END --><?php } ?>
</div>
</div>
</header>
<!-- HEADER END -->
<?php do_action( 'bp_after_header' ) ?>

<?php do_action( 'bp_before_nav' ) ?>
<!-- NAVIGATION START -->
<nav class="iegradient" id="main-navigation" role="navigation">
<div class="innerwrap">
<?php if ( function_exists( 'wp_nav_menu' ) ) { ?>
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => false, 'menu_class' => 'sf-menu', 'fallback_cb' => 'revert_wp_menu_page','walker' => new Custom_Description_Walker )); ?>
<?php } ?>
</div>
</nav>
<div id="mobile-nav">
<div class="innerwrap">
<?php get_mobile_navigation( $type='top', $nav_name="primary" ); ?>
</div>
</div>
<!-- NAVIGATION END -->
<?php do_action( 'bp_after_nav' ) ?>

<div id="wrapper-main">
<div id="bodywrap" class="innerwrap">
<?php do_action( 'bp_before_container' ) ?>
<!-- CONTAINER START -->
<section id="container">
<?php if( get_header_image() ): ?>
<div class="innerwrap-custom-header">
<div id="custom-img-header"><a href="<?php echo home_url( '/' ); ?>" title="<?php bloginfo('name'); ?>"><img src="<?php echo header_image(); ?>" alt="" /></a></div>
</div>
<?php endif; ?>

<div class="container-wrap">

Edited by Sun Tzu
Link to comment
Share on other sites

Incearca sa bagi codul dupa liniile:

<?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => false, 'menu_class' => 'sf-menu', 'fallback_cb' => 'revert_wp_menu_page','walker' => new Custom_Description_Walker )); ?>
<?php } ?>

Link to comment
Share on other sites

Cauta linia:

<?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => false, 'menu_class' => 'sf-menu', 'fallback_cb' => 'revert_wp_menu_page','walker' => new Custom_Description_Walker )); ?> <?php } ?>

Si adauga:

<div align="right">
<form action="/cautare/" method="get">
<input type="text" name="q" class="search">
<input type="submit" style="background:#D8E6EB;border:0;color:#474747" value="caută">
</form>
</div>

Dupa <?php } ?> si inainte de </div>.

 

Uite cum s-a facut: http://i45.tinypic.com/2b2mw1.png

Edited by Sun Tzu
Link to comment
Share on other sites

Cauta linia:

<?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => false, 'menu_class' => 'sf-menu', 'fallback_cb' => 'revert_wp_menu_page','walker' => new Custom_Description_Walker )); ?> <?php } ?>

Si adauga:

<div align="right">
<form action="/cautare/" method="get">
<script_blocat="text" name="q" class="search">
<script_blocat="submit" style="background:#D8E6EB;border:0;color:#474747" value="caută">
</form>
</div>

Dupa <?php } ?> si inainte de </div>.

 

Uite cum s-a facut: http://i45.tinypic.com/2b2mw1.png

buna treaba, multumesc!

 

o sa-ti dau si + imediat ce o sa pot!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.