سلام
دوستان من چطوری می تونم از شر این برگه خلاصشم ؟
عکس رو ببینید !
فایل پیوست 5437
نمایش نسخه قابل چاپ
سلام
دوستان من چطوری می تونم از شر این برگه خلاصشم ؟
عکس رو ببینید !
فایل پیوست 5437
قسمتی در قالبتون هستش که اصطلاحا لا کلاس هایی به نام های nav یا navbar نام گذاری شده اون رو پیدا کنید و در قسمت منوی اون این قسمت رو حذف کنید
کد HTML:<li>خانه</li>
توی فایل هدر دنبالش بگردید
اگر پیدا نکردید کد های header.php رو بزارید تا دقیقا براتون مشخص کنم کجاس
سلام
من header.php رو گشتم و اون 2 تا کلاس nav و navbar رو پیدا کردم ولی بازم موفق نشدم این کدپیدا کنم.کد:
<li>خانه</li>
اینم کدهای هدر.
کد:<?php/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="content-main">
*
* @package Graphene
* @since graphene 1.0
*/
global $graphene_settings;
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<title><?php wp_title( '' ); ?></title>
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_head(); ?>
</head><?php flush(); ?>
<body <?php body_class(); ?>>
<?php if (!get_theme_mod('background_image', false) && !get_theme_mod('background_color', false)) : ?>
<div class="bg-gradient">
<?php endif; ?>
<?php do_action( 'graphene_container_before' ); ?>
<div id="container" class="container_16">
<?php if ($graphene_settings['hide_top_bar'] != true) : ?>
<div id="top-bar">
<?php do_action('graphene_before_feed_icon'); ?>
<div id="rss" class="clearfix gutter-left">
<?php if ($graphene_settings['hide_feed_icon'] != true) : ?>
<?php $custom_feed_url = ($graphene_settings['custom_feed_url']) ? $graphene_settings['custom_feed_url'] : get_bloginfo('rss2_url'); ?>
<a href="<?php echo $custom_feed_url; ?>" title="<?php printf(esc_attr__("Subscribe to %s's RSS feed", 'graphene'), get_bloginfo('name')); ?>" class="rss_link" <?php if ( $graphene_settings['social_media_new_window'] ) { echo 'target="_blank"'; } ?>><span><?php _e('Subscribe to RSS feed', 'graphene'); ?></span></a>
<?php endif; ?>
<?php do_action('graphene_feed_icon'); ?>
</div>
<?php
/**
* Retrieves our custom search form.
*/
?>
<?php if (($search_box_location = $graphene_settings['search_box_location']) && $search_box_location == 'top_bar' || $search_box_location == '') : ?>
<div id="top_search" class="grid_4">
<?php get_search_form(); ?>
<?php do_action('graphene_top_search'); ?>
</div>
<?php endif; ?>
<?php do_action( 'graphene_top_bar' ); ?>
</div>
<?php endif; ?>
<?php
if ($post)
$post_id = $post->ID;
else
$post_id = false;
$header_img = apply_filters( 'graphene_header_image', graphene_get_header_image( $post_id ) );
/*
* Check if the page uses SSL and change HTTP to HTTPS if true
*
* Experimental. Let me know if there's any problem.
*/
if (is_ssl() && stripos($header_img, 'https') === false) {
$header_img = str_replace('http', 'https', $header_img);
}
// Gets the colour for header texts, or if we should display them at all
if ('blank' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) || '' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR))
$style = ' style="display:none;"';
else
$style = ' style="color:#' . get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) . ';"';
?>
<div id="header" style="background-image:url(<?php echo $header_img; ?>);">
<?php if ($graphene_settings['link_header_img']) : ?>
<a href="<?php echo home_url(); ?>" id="header_img_link" title="<?php esc_attr_e('Go back to the front page', 'graphene'); ?>"> </a>
<?php endif; ?>
<?php /* Header widget area */
if ($graphene_settings['enable_header_widget'] && is_active_sidebar('header-widget-area')) {
echo '<div class="header-widget">';
dynamic_sidebar('header-widget-area');
echo '</div>';
}
?>
<?php /* The site title and description */
if (is_singular() && !is_front_page()) {
$title_tag = 'h2';
$desc_tag = 'h3';
} else {
$title_tag = 'h1';
$desc_tag = 'h2';
}
?>
<?php echo '<'.$title_tag; ?> <?php echo $style; ?> class="header_title push_1 grid_15">
<?php if ( ! is_front_page() ) : ?><a <?php echo $style; ?> href="<?php echo home_url(); ?>" title="<?php esc_attr_e('Go back to the front page', 'graphene'); ?>"><?php endif; ?>
<?php bloginfo('name'); ?>
<?php if ( ! is_front_page() ) : ?></a><?php endif; ?>
</<?php echo $title_tag; ?>>
<?php echo '<'.$desc_tag; ?> <?php echo $style; ?> class="header_desc push_1 grid_15">
<?php bloginfo('description'); ?>
</<?php echo $desc_tag; ?>>
<?php do_action('graphene_header'); ?>
</div>
<div id="nav">
<?php /* The navigation menu */ ?>
<div id="header-menu-wrap" class="clearfix">
<?php
/* Header menu */
$args = array(
'container' => '',
'menu_id' => 'header-menu',
'menu_class' => graphene_get_menu_class('menu clearfix'),
'fallback_cb' => 'graphene_default_menu',
'depth' => 5,
'theme_location' => 'Header Menu',
);
if ( ! $graphene_settings['disable_menu_desc'] )
$args = array_merge( $args, array( 'walker' => new Graphene_Description_Walker() ) );
wp_nav_menu( apply_filters( 'graphene_header_menu_args', $args ) ); ?>
<div class="clear"></div>
<?php if (($search_box_location = $graphene_settings['search_box_location']) && $search_box_location == 'nav_bar') : ?>
<div id="top_search" class="grid_4">
<?php get_search_form(); ?>
<?php do_action('graphene_nav_search'); ?>
</div>
<?php endif; ?>
<?php do_action( 'graphene_header_menu' ); ?>
</div>
<?php
/* Secondary menu */
$args = array(
'container' => 'div',
'container_id' => 'secondary-menu-wrap',
'container_class' => 'clearfix',
'menu_id' => 'secondary-menu',
'menu_class' => 'menu clearfix',
'fallback_cb' => 'none',
'depth' => 5,
'theme_location' => 'secondary-menu',
);
wp_nav_menu( apply_filters( 'graphene_secondary_menu_args', $args ) );
?>
<div class="menu-bottom-shadow"> </div>
<?php do_action( 'graphene_top_menu' ); ?>
</div>
<?php do_action( 'graphene_before_content' ); ?>
<div id="content" class="clearfix hfeed">
<?php do_action( 'graphene_before_content-main' ); ?>
<?php
/* Sidebar2 on the left side? */
if ( in_array( graphene_column_mode(), array( 'three-col-right', 'three-col-center', 'two-col-right' ) ) ){
get_sidebar( 'two' );
}
/* Sidebar1 on the left side? */
if ( in_array( graphene_column_mode(), array( 'three-col-right' ) ) ){
get_sidebar();
}
?>
<div id="content-main" <?php graphene_grid( 'clearfix', 16, 11, 8 ); ?>>
<?php do_action( 'graphene_top_content' ); ?>
دوستان کسی نمی تونه بهم کمک کنه ؟
سلام دوست عزیز. به نظرم قسمت منو تم وردپرس شما از یک فایل دیگه دستور میگیره .
لیست فایل های php موجود در پوشته تم مذکور را لطف بفرمایید (البته ممکن هم است دقیقا اسم فایل menu نباشد )
---------- Post added at 08:45 PM ---------- Previous post was at 08:26 PM ----------
دوست عزیز کافی است این خط(با لینک صفحه اصلی که یا جلوشه یا زیرش) را در فایل های php موجود پیدا وحذف نمایید و مشکل شما حل بشود :
کد PHP:
<li class="page_item page-item-20"?>
سلام
این قسمت هم هست.
کد:<?php/**
* Defines the custom walker that adds description to the display of our Header Menu
*/
class Graphene_Description_Walker extends Walker_Nav_Menu {
function start_el( &$output, $item, $depth, $args ) {
global $wp_query;
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
$class_names = $value = '';
$classes = empty( $item->classes ) ? array() : (array) $item->classes;
$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) );
$class_names = ' class="'. esc_attr( $class_names ) . '"';
$output .= $indent . '<li id="menu-item-'. $item->ID . '"' . $value . $class_names .'>';
$attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : '';
$attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : '';
$attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : '';
$attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : '';
$prepend = '<strong>';
$append = '</strong>';
// Don't show description if it's longer than the length
$desc_length = apply_filters( 'graphene_menu_desc_length', 50 );
if ( strlen( $item->description ) > $desc_length)
$description = '';
else
$description = ! empty( $item->description ) ? '<span>'.esc_attr( $item->description ).'</span>' : '';
if ( $depth != 0 ) {
$description = $append = $prepend = "";
}
$item_output = $args->before;
$item_output .= '<a'. $attributes .'>';
$item_output .= $args->link_before .$prepend.apply_filters( 'the_title', $item->title, $item->ID ).$append;
$item_output .= $description.$args->link_after;
$item_output .= '</a>';
$item_output .= $args->after;
$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
}
}
/**
* Define the callback menu, if there is no custom menu.
* This menu automatically lists all Pages as menu items, including their direct
* direct descendant, which will only be displayed for the current parent.
*/
if ( ! function_exists( 'graphene_default_menu' ) ) :
function graphene_default_menu(){ global $graphene_settings; ?>
<ul id="header-menu" class="<?php echo graphene_get_menu_class('menu clearfix default-menu'); ?>">
<?php if (get_option( 'show_on_front' ) == 'posts' ) : ?>
<li <?php if ( is_single() || is_front_page() ) { echo 'class="current_page_item current-menu-item"'; } ?>>
<a href="<?php echo get_home_url(); ?>">
<strong><?php _e( 'Home','graphene' ); ?></strong>
<?php if ( $graphene_settings['navmenu_home_desc']) {echo '<span>'.$graphene_settings['navmenu_home_desc'].'</span>';} ?>
</a>
</li>
<?php endif; ?>
<?php
$args = array(
'echo' => 1,
'depth' => 5,
'title_li' => '',
'walker' => new Walker_PageDescription()
);
wp_list_pages( apply_filters( 'graphene_default_menu_args', $args ) );
?>
</ul>
<?php
do_action( 'graphene_default_menu' );
}
endif;
class Walker_PageDescription extends Walker_Page {
/**
* Code exact copied from: wp-includes\post-template.pgp >> Walker_Page::start_el()
* @since 2.1.0
*/
function start_el( &$output, $page, $depth, $args, $current_page ) {
global $graphene_settings;
if ( $depth )
$indent = str_repeat("\t", $depth);
else
$indent = '';
extract( $args, EXTR_SKIP);
$css_class = array( 'page_item', 'page-item-'.$page->ID);
if ( !empty( $current_page) ) {
$_current_page = get_page( $current_page );
_get_post_ancestors( $_current_page);
if ( isset( $_current_page->ancestors) && in_array( $page->ID, (array) $_current_page->ancestors) ) {
$css_class[] = 'current_page_ancestor';
$css_class[] = 'current-menu-ancestor';
}
if ( $page->ID == $current_page ) {
$css_class[] = 'current_page_item';
$css_class[] = 'current-menu-item';
}
elseif ( $_current_page && $page->ID == $_current_page->post_parent ) {
$css_class[] = 'current_page_parent';
$css_class[] = 'current-menu-ancestor';
$css_class[] = 'current-menu-parent';
}
} elseif ( $page->ID == get_option( 'page_for_posts' ) ) {
$css_class[] = 'current_page_parent';
$css_class[] = 'current-menu-ancestor';
$css_class[] = 'current-menu-parent';
}
// Check if page has children
if ( get_pages( array( 'child_of' => $page->ID, 'parent' => $page->ID ) ) ) {
$css_class[] = 'menu-item-ancestor';
}
$css_class = implode( ' ', apply_filters( 'page_css_class', $css_class, $page) );
$title = apply_filters( 'the_title', $page->post_title, $page->ID );
// get the graphene description if it is set otherwise the wordpress default -> title
$menu_title = apply_filters( 'the_title', $page->post_title, $page->ID );
if ( ! $depth && ! $graphene_settings['disable_menu_desc'] ){
$menu_title = '<strong>' . $menu_title . '</strong>';
}
if ( ! $graphene_settings['disable_menu_desc'] ){
$menu_title .= ( get_post_meta( $page->ID, '_graphene_nav_description', true ) && ! $depth ) ?
'<span>' . get_post_meta( $page->ID, '_graphene_nav_description', true ) . '</span>' :
'';
}
$output .= $indent . '<li class="' . $css_class . '"><a href="' . get_permalink( $page->ID) . '">' . $link_before . $menu_title . $link_after . '</a>';
if ( !empty( $show_date) ) {
if ( 'modified' == $show_date )
$time = $page->post_modified;
else
$time = $page->post_date;
$output .= " " . mysql2date( $date_format, $time);
}
$output = apply_filters( 'graphene_page_description_walker_output', $output, $page, $depth, $args, $current_page );
}
}
/*
* Adds a menu-item-ancestor class to menu items with children for styling.
* Code taken from the Menu-item-ancestor plugin by Valentinas Bakaitis
*/
function graphene_add_ancestor_class( $classlist, $item){
global $wp_query, $wpdb;
//get the ID of the object, to which menu item points
$id = get_post_meta( $item->ID, '_menu_item_object_id', true);
//get first menu item that is a child of that object
$children = $wpdb->get_var( 'SELECT post_id FROM '.$wpdb->postmeta.' WHERE meta_key like "_menu_item_menu_item_parent" AND meta_value='.$item->ID.' LIMIT 1' );
//if there is at least one item, then $children variable will contain it's ID (which is of course more than 0)
if( $children > 0)
//in that case - add the CSS class
$classlist[] = 'menu-item-ancestor';
//return class list
return $classlist;
}
//add filter to nav_menu_css_class list
add_filter( 'nav_menu_css_class', 'graphene_add_ancestor_class', 2, 10);
function graphene_get_menu_class( $menu_class ){
global $graphene_settings;
// if the search box is located in the navigation bar restrict the width of the menu to 12 grid columns
if (($search_box_location = $graphene_settings['search_box_location']) && $search_box_location == 'nav_bar'){
$menu_class .= ' grid_12';
}
return $menu_class;
}
?>
---------- Post added at 11:49 AM ---------- Previous post was at 11:47 AM ----------
اقا یک مشکل جدید سایت بالا نمی یاد این خطا رو می ده !!!
کد:Parse error: syntax error, unexpected T_ENDIF in /home/negintak/public_html/wp-content/themes/graphene/includes/theme-menu.php on line 64
با عرض سلام
دوست عزیز فقط کافی است این خط(با لینک صفحه اصلی که یا جلوشه یا زیرش) را در فایل های php موجود پیدا وحذف نمایید و مشکل شما حل بشود :
کد PHP:
<li class="page_item page-item-20"?>
در فایل های php موجود در تم شما این خط با لینک جلوش را یافته و حذف نمایید 100% این خط موجود و 100% مشکل شما با حذف این خط حل میشود
---------- Post added at 11:56 AM ---------- Previous post was at 11:53 AM ----------
دوست عزیز شما فایل theme-menu.php
دستکاری کردید به همین دلیل است که سایت بالا نمی آید
تم (بدون تغییرات جدید) را به آدرس ایمیل من ارسال کنید تا خودم مشکل را حل نمایم
اقا من این خط رو هیچ جا پیدا نکردم !!!
نمی دونید باید برم دقیقن کجا رو بگردم ؟کد:
<li class="page_item page-item-20"?>
خدایی روانی شدم.#-o
این کد رو به دلخواه ویرایش کنیدکد PHP:
<strong><?php _e( 'Home','graphene' ); ?></strong>