Forum Replies Created

Viewing 15 replies - 1 through 15 (of 17 total)
  • chinese

    appearance -> menus -> pages

    edit the header.php of your theme

    Comment like this

    <!--
    				<<?php echo $heading_tag; ?> id="site-title">
    					<span>
    						<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
    					</span>
    				</<?php echo $heading_tag; ?>>
    				<div id="site-description"><?php bloginfo( 'description' ); ?></div>
    -->

    edit the functions.php of your theme, search

    // The height and width of your custom header. You can hook into the theme's own filters to change these values.
    // Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values.
    define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) );
    define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 115 ) );

    Thread Starter akasuna

    (@akasuna)

    It’s the header.php of my website
    I add a <div id=”search_form_nav” class=”extt”> to it, you can see.

    <?php
    /**
     * The Header for our theme.
     *
     * Displays all of the <head> section and everything up till <div id="main">
     *
     * @package WordPress
     * @subpackage Twenty_Ten
     * @since Twenty Ten 1.0
     */
    ?><!DOCTYPE html>
    <html >
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <title><?php
    	/*
    	 * Print the <title> tag based on what is being viewed.
    	 * We filter the output of wp_title() a bit -- see
    	 * twentyten_filter_wp_title() in functions.php.
    	 */
    	wp_title( '|', true, 'right' );
    
    	?></title>
    <link rel="profile" href="https://gmpg.org/xfn/11" />
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <?php
    	/* We add some JavaScript to pages with the comment form
    	 * to support sites with threaded comments (when in use).
    	 */
    	if ( is_singular() && get_option( 'thread_comments' ) )
    		wp_enqueue_script( 'comment-reply' );
    
    	/* Always have wp_head() just before the closing </head>
    	 * tag of your theme, or you will break many plugins, which
    	 * generally use this hook to add elements to <head> such
    	 * as styles, scripts, and meta tags.
    	 */
    	wp_head();
    ?>
    </head>
    
    <body <?php body_class(); ?>>
    <div id="wrapper" class="hfeed">
    	<div id="header">
    		<div id="masthead">
    			<div id="branding" role="banner">
    				<?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
    <!--
    				<<?php echo $heading_tag; ?> id="site-title">
    					<span>
    						<a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
    					</span>
    				</<?php echo $heading_tag; ?>>
    				<div id="site-description"><?php bloginfo( 'description' ); ?></div>
    -->
    				<?php
    					// Check if this is a post or page, if it has a thumbnail, and if it's a big one
    					if ( is_singular() &&
    							has_post_thumbnail( $post->ID ) &&
    							( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' ) ) &&
    							$image[1] >= HEADER_IMAGE_WIDTH ) :
    						// Houston, we have a new header image!
    						echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' );
    					else : ?>
    						<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
    					<?php endif; ?>
    			</div><!-- #branding -->
    
    			<div id="access" role="navigation">
    			  <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
    				<div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a></div>
    				<?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?>
    				<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
    
    			</div><!-- #access -->
    <div id="search_form_nav" class="extt">
    <form method="get" id="searchformnav" action="<?php bloginfo('home');?>">
    <input type="text" value="<?php echo wp_specialchars($s,1);?>" name="s" id="s" size="14" maxlength="50"  />
    <input type="submit"  value="Go!" id="searchbutton"/>
    </form>
    </div>
    		</div><!-- #masthead -->
    	</div><!-- #header -->
    
    	<div id="main">

    .post {
    	border-bottom: 2px solid #CCC;
    	padding:15px;
    }
    .widget-container {
    	border-bottom: 2px solid #CCC;
    	padding:15px;
    }

    add this code to end of style.css

    see demo, Ugly!

    Try this:

    In style.css find

    #content {
    	margin: 0 280px 0 20px;
    }

    and change it to

    #content {
    	margin: 0 250px 0 20px;
    	border-right: 1px solid #CCC;
    	padding:15px;
    }

    This will add a thin grey line to the right hand side of your content.

    see here

    WP-Syntax works good with 3.0

    WP-Syntax PHP Code Demo

    if you don’t set a lang propertie, wp-syntax will not know how to highlight your code, because he doesn’t know which language you are coding.

    Thread Starter akasuna

    (@akasuna)

    I think you mean instructions, the intsructions is for twentyten theme, and i noticed that the theme of your blog is not twentyten

    the latest demo is on my site https://www.akasuna.com , and it works ok.

    Where are you from?

    Thread Starter akasuna

    (@akasuna)

    Hi, cascd88

    put the above code into “style.css” and “header.php”

    change c++ to cpp

    Thread Starter akasuna

    (@akasuna)

    Oh yeah!
    I have completed this work !
    Visit the demo https://w3.akasuna.com/

    chinmoy, thank you for your help !

    Thread Starter akasuna

    (@akasuna)

    hi sanypoo,
    twenty ten use “wp_nav_menu” function to get menulist, but I don’t know how to add your code into this function.

    And my website is https://w3.akasuna.com/
    but what I want to is https://www.kingcosmonaut.de/blix/
    you can ses the searchbox is on the right of the navigation bar

    Thread Starter akasuna

    (@akasuna)

    Hi curtismchale,Thanks for your advice.

    I will learn CSS !

Viewing 15 replies - 1 through 15 (of 17 total)