Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Oct 2007
    Messaggi
    87

    [wordpress] sidebar con immagini

    Ciao a tutti!
    Premetto che mi sono avvicinato da poco a wordpress...ho un problemino con la sidebar!

    Ho modificato il file sidebar.php per poter inserire un'intestazione grafica al menu (cioè un immagine sopra a "pagine" e "articoli").


    ecco il file sidebar.php
    Codice PHP:
        <div id="sidebar">
            <ul> 
                <?php     /* Widgetized sidebar, if you have the plugin installed. */
                        
    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
                [*]
                    <?php include (TEMPLATEPATH '/searchform.php'); ?>
                 

                <!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
                [*]<h2><?php _e('Author''kubrick'); ?></h2>
                

    A little something about you, the author. Nothing lengthy, just an overview.</p>
                
                -->

                <?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()) { ?>
                

    <?php printf(__('You are currently browsing the archives for the %s category.''kubrick'), single_cat_title(''false)); ?></p>

                <?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
                

    <?php printf(__('You are currently browsing the [url="%1$s/"]%2$s[/url] blog archives for the day %3$s.''kubrick'), get_bloginfo('url'), get_bloginfo('name'), get_the_time(__('l, F jS, Y''kubrick'))); ?></p>

                <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
                

    <?php printf(__('You are currently browsing the [url="%1$s/"]%2$s[/url] blog archives for %3$s.''kubrick'), get_bloginfo('url'), get_bloginfo('name'), get_the_time(__('F, Y''kubrick'))); ?></p>

                <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
                

    <?php printf(__('You are currently browsing the [url="%1$s/"]%2$s[/url] blog archives for the year %3$s.''kubrick'), get_bloginfo('url'), get_bloginfo('name'), get_the_time('Y')); ?></p>

                <?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
                

    <?php printf(__('You have searched the [url="%1$s/"]%2$s[/url] blog archives for [b]‘%3$s’[/b]. If you are unable to find anything in these search results, you can try one of these links.''kubrick'), get_bloginfo('url'), get_bloginfo('name'), wp_specialchars(get_search_query(), true)); ?></p>

                <?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
                

    <?php printf(__('You are currently browsing the [url="%1$s/"]%2$s[/url] blog archives.''kubrick'), get_bloginfo('url'), get_bloginfo('name')); ?></p>

                <?php ?>

                 <?php }?>
                
                <?php wp_list_pages('title_li=<div id="menu_pag">' '</div>' ); ?>

                <?php wp_list_categories('show_count=0&title_li=<div id="menu_pro">' '</div>'); ?>
                
                <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
                    <?php wp_list_bookmarks(); ?>

                    
                <?php ?>

                <?php endif; ?>
            [/list]
        </div>
    e nel file style.css assegno ai div "menu_pag" e "menu_pro" lo stile così:

    Codice PHP:
    /*Begin Sidebar */
        #sidebar {     
                      
    padding20px 0 10px 0;
                      
    margin-left545px;
                      
    width190px;


    #sidebar form {
                       
    margin0;
    }

    #menu_pag{
                        
    height:30px;
                        
    width:200px;
                        
    background-image:url(images/sf_menu_pag.jpg);
    }

    #menu_pro{
                     
    height:30px;
                     
    width:200px;
                     
    background-image:url(images/sf_menu_pro.jpg);
    }
     
    /* End Sidebar */ 
    Il problema è che in locale mi funziona tutto correttamente, ma appeno l'ho caricato nello spazio web non mi funziona, non mi visualizza le immagini di intestazione del menu!!!

    Sapreste dirmi perchè?

    Grazie in anticipo
    StLuca

  2. #2

    Re: [wordpress] sidebar con immagini

    Originariamente inviato da StLuca
    Ciao a tutti!
    Premetto che mi sono avvicinato da poco a wordpress...ho un problemino con la sidebar!

    Ho modificato il file sidebar.php per poter inserire un'intestazione grafica al menu (cioè un immagine sopra a "pagine" e "articoli").


    ecco il file sidebar.php

    codice:
    etc..

    Il problema è che in locale mi funziona tutto correttamente, ma appeno l'ho caricato nello spazio web non mi funziona, non mi visualizza le immagini di intestazione del menu!!!

    Sapreste dirmi perchè?

    Grazie in anticipo
    StLuca
    controlla il path delle immagini
    Soluzioni di Web marketing, CMS, Temi wordpress, grafica e molto altro

    -----
    Ogni topic aperto con un titolo errato fa perdere un capello al moderatore che lo dovrà sistemare.. se non vuoi contribuire alla calvizia dei moderatori apri 3D a norma di regolamento, e prima fai una ricerca! No pvt tecnici!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.