Wordpres : Rajout d'un intitulé/descriptif dans les catégories

WRInaute impliqué
Bon j ai une petite question pour la communauté. En fait j'aimerai mettre une description pour chaque catégorie de mon blog.

voici l'endroit marqué par une flèche

2ai38th.jpg


En gros la c'est la description anniversaire. J'aimerai mettre : Choisir une cadeau d'anniversaire.. blablablabla etc

Comment Faire ?

Ps : Vous remarquerez au passage mon joli maillot de bain pour cet été!

Ps2 pour modo: le poste dans la mauvaise catégorie sur WRI :S
 
WRInaute impliqué
Trop fort le codex ca marche du tonnerre ! Bon faut que je refasse les descriptions.

Avec Taxonomy Tiny MCE ca marche comment le html ? Je met les balises directement dans la description de la catégorie ?
 
WRInaute impliqué
Secondraire à priori mais ou ? :S

Code:
<?php

    /**
     * Secondary Menu Admin Options
     */
     
    $this->admin_option(array('Secondary Menu', 22), 
        'Secondary Menu', 'menu_secondary_info', 
        'content', 'Please, use the <a href="nav-menus.php"><strong>menus panel</strong></a> to manage and organize menu items for the <strong>Secondary Menu</strong>.<br />The Secondary Menu will display the categories list if no menu is selected from the menus panel. <a href="http://codex.wordpress.org/Appearance_Menus_Screen" target="_blank">More info.</a>'
    );
    
    $this->admin_option('Secondary Menu', 
        'Secondary Menu Enabled?', 'menu_secondary', 
        'checkbox', $this->options['menus']['menu-secondary']['active'], 
        array('display'=>'inline')
    );
    
     $this->admin_option('Secondary Menu', 
        'Drop Down Settings', 'menu_secondary_drop_down', 
        'content', ''
    );
    
    $this->admin_option('Secondary Menu', 
        'Depth', 'menu_secondary_depth', 
        'text', $this->options['menus']['menu-secondary']['depth'], 
        array('help'=>'Drop Down levels depth. 0 = unlimited', 'display'=>'inline', 'style'=>'width: 80px;')
    );
    
    $this->admin_option('Secondary Menu', 
        'Effect', 'menu_secondary_effect', 
        'select', $this->options['menus']['menu-secondary']['effect'],
        array('help'=>'Drop Down animation effect.', 'display'=>'inline', 'options'=>array('standart' => 'Standart (No Effect)', 'slide' => 'Slide Down', 'fade' => 'Fade', 'fade_slide_right' => 'Fade & Slide from Right', 'fade_slide_left' => 'Fade & Slide from Left'))
    );
    
    $this->admin_option('Secondary Menu', 
        'Speed', 'menu_secondary_speed', 
        'text', $this->options['menus']['menu-secondary']['speed'], 
        array('help'=>'Speed of the drop down animation.', 'display'=>'inline', 'style'=>'width: 80px;', 'suffix'=> ' <em>milliseconds</em>')
    );
    
    $this->admin_option('Secondary Menu', 
        'Delay', 'menu_secondary_delay', 
        'text', $this->options['menus']['menu-secondary']['delay'], 
        array('help'=>'The delay in milliseconds that the mouse can remain outside a submenu without it closing ', 'display'=>'inline', 'style'=>'width: 80px;', 'suffix'=> ' <em>milliseconds</em>')
    );
    
    $this->admin_option('Secondary Menu', 
        'Arrows', 'menu_secondary_arrows', 
        'checkbox', $this->options['menus']['menu-secondary']['arrows'], 
        array('help'=>'Display the sub-menu indicator arrows', 'display'=>'inline')
    );
    
     $this->admin_option('Secondary Menu', 
        'Drop Shadows', 'menu_secondary_shadows', 
        'checkbox', $this->options['menus']['menu-secondary']['shadows'], 
        array('help'=>'Display Drop Shadows for the sub-menus', 'display'=>'inline')
    );
    
    
    /**
     * Display Secondary Menu
     */
     
    if($this->display('menu_secondary')) {
        
        // Register
        register_nav_menu( 'secondary',  __( 'Secondary Menu', 'themater' ) );
        
        // Display Hook
        $this->add_hook($this->options['menus']['menu-secondary']['hook'], 'themater_menu_secondary_display');
        
        if(!wp_script_is('jquery')) {
            wp_enqueue_script('jquery');
        }
        
        if(!wp_script_is('hoverIntent')) {
            wp_enqueue_script('hoverIntent', THEMATER_URL . '/js/hoverIntent.js');
        }
        
        if(!wp_script_is('superfish')) {
            wp_enqueue_script('superfish', THEMATER_URL . '/js/superfish.js');
        }
        
        $this->custom_js(themater_menu_secondary_js());
    }
    
    /**
     * Secondary Menu Functions
     */
    
    function themater_menu_secondary_display()
    {
        global $theme;
        ?>
			<?php wp_nav_menu( 'depth=' . $theme->get_option('menu_secondary_depth') . '&theme_location=' . $theme->options['menus']['menu-secondary']['theme_location'] . '&container_class=' . $theme->options['menus']['menu-secondary']['wrap_class'] . '&menu_class=' . $theme->options['menus']['menu-secondary']['menu_class'] . '&fallback_cb=' . $theme->options['menus']['menu-secondary']['fallback'] . ''); ?>
              <!--.secondary menu--> 	
        <?php
    }
    
    function themater_menu_secondary_default()
    {
        global $theme;
        ?>
        <div class="<?php echo $theme->options['menus']['menu-secondary']['wrap_class']; ?>">
			<ul class="<?php echo $theme->options['menus']['menu-secondary']['menu_class']; ?>">
				<?php wp_list_categories('depth=' .  $theme->get_option('menu_secondary_depth') . '&hide_empty=0&orderby=name&show_count=0&use_desc_for_title=1&title_li='); ?>
			</ul>
		</div>
        <?php
    }
    
    function themater_menu_secondary_js()
    {
        global $theme;

        $return = '';
        
            $menu_secondary_arrows = $theme->display('menu_secondary_arrows') ? 'true' : 'false';
            $menu_secondary_shadows = $theme->display('menu_secondary_shadows') ? 'true' : 'false';
            $menu_secondary_delay = $theme->display('menu_secondary_delay') ? $theme->get_option('menu_secondary_delay') : '800';
            $menu_secondary_speed = $theme->display('menu_secondary_speed') ? $theme->get_option('menu_secondary_speed') : '200';
            
            switch ($theme->get_option('menu_secondary_effect')) {
                case 'standart' :
                $menu_secondary_effect = "animation: {width:'show'},\n";
                break;
                
                case 'slide' :
                $menu_secondary_effect = "animation: {height:'show'},\n";
                break;
                
                case 'fade' :
                $menu_secondary_effect = "animation: {opacity:'show'},\n";
                break;
                
                case 'fade_slide_right' :
                $menu_secondary_effect = "onBeforeShow: function(){ this.css('marginLeft','20px'); },\n animation: {'marginLeft':'0px',opacity:'show'},\n";
                break;
                
                case 'fade_slide_left' :
                $menu_secondary_effect = "onBeforeShow: function(){ this.css('marginLeft','-20px'); },\n animation: {'marginLeft':'0px',opacity:'show'},\n";
                break;
                
                default:
                $menu_secondary_effect = "animation: {opacity:'show'},\n";
            }
            
            $return .= "jQuery(function(){ \n\tjQuery('ul." . $theme->options['menus']['menu-secondary']['superfish_class'] . "').superfish({ \n\t";
            $return .= $menu_secondary_effect;
            $return .= "autoArrows:  $menu_secondary_arrows,
                dropShadows: $menu_secondary_shadows, 
                speed: $menu_secondary_speed,
                delay: $menu_secondary_delay
                });
            });\n";
   
        return $return;
    }
?>
 
WRInaute accro
Il faut que tu regardes les options de ton thème, ça se gère là dedans, normalement dans le wp_list_categories()

ou alors tu fais un menu
 
WRInaute impliqué
Marie-Aude a dit:
Il faut que tu regardes les options de ton thème, ça se gère là dedans, normalement dans le wp_list_categories()

ou alors tu fais un menu

La fonction ressemblerait à quoi d'après toi ? J'ai déjà mes menus de fait...

Franchement je suis un peu perdu sur ce coup là Marie Aude
 
WRInaute accro
Tu regardes le fichier ça doit être un sidebar.php... et dedans tu dois avoir un wp_nav_menu avec un call back sur list_categories
 
WRInaute impliqué
Voici ce que j'ai :

Code:
<?php global $theme; ?>

<div id="sidebar-primary">

    <?php
        if(!dynamic_sidebar('sidebar_primary')) {
            /**
            * The primary sidebar widget area. Manage the widgets from: wp-admin -> Appearance -> Widgets 
            */
            $theme->hook('sidebar_primary');
        }
    ?>
    
</div><!-- #sidebar-primary -->
 
WRInaute impliqué
Marie-Aude a dit:
Ah le chien galeux il a caché ça dans les fonctions...

Il doit avoir les oreilles qui sifflent !

Voici le code de Function.PHP (d'ailleurs étrange ces liens en bas, j ai pas acheté le theme aussi alors j'ai des liens en footer)

Code:
<?php


require_once TEMPLATEPATH . '/lib/Themater.php';
    $theme = new Themater('TechLine');
    $theme->options['includes'] = array('featuredposts');
    
    $theme->options['plugins_options']['featuredposts'] = array('image_sizes' => '615px. x 300px.', 'speed' => '400', 'effect' => 'scrollHorz');
    if($theme->is_admin_user()) {
        unset($theme->admin_options['Ads']);
    }
    
    if($theme->is_admin_user()) {
        unset($theme->admin_options['Layout']['content']['featured_image_settings_homepage']);
        unset($theme->admin_options['Layout']['content']['featured_image_width']);
        unset($theme->admin_options['Layout']['content']['featured_image_height']);
        unset($theme->admin_options['Layout']['content']['featured_image_position']);
    }
    
    // Footer widgets
    $theme->admin_option('Layout', 
        'Footer Widgets Enabled?', 'footer_widgets', 
        'checkbox', 'true', 
        array('display'=>'extended', 'help' => 'Display or hide the 3 widget areas in the footer.', 'priority' => '15')
    );


    $theme->load();
    
    register_sidebar(array(
        'name' => __('Primary Sidebar', 'themater'),
        'id' => 'sidebar_primary',
        'description' => __('The primary sidebar widget area', 'themater'),
        'before_widget' => '<ul class="widget-container"><li id="%1$s" class="widget %2$s">',
        'after_widget' => '</li></ul>',
        'before_title' => '<h3 class="widgettitle">',
        'after_title' => '</h3>'
    ));
    
    
    $theme->add_hook('sidebar_primary', 'sidebar_primary_default_widgets');
    
    function sidebar_primary_default_widgets ()
    {
        global $theme;

        $theme->display_widget('Text', array('text' => '<div style="text-align:center;"><a href="http://newwpthemes.com" target="_blank"><img src="http://newwpthemes.com/wp-content/pro/nwpt3.gif" alt="Free WordPress Themes" title="Free WordPress Themes" /></a></div>'));
        $theme->display_widget('Tabs');
        $theme->display_widget('SocialProfiles');
        $theme->display_widget('Tweets', array('username'=> 'NewWpThemes'));
        $theme->display_widget('Facebook', array('url'=> 'https://www.facebook.com/NewWpThemesCom'));
        $theme->display_widget('Search');
        $theme->display_widget('Tag_Cloud');
        $theme->display_widget('Calendar', array('title' => 'Calendar'));
        
    }
    
    // Register the footer widgets only if they are enabled from the FlexiPanel
    if($theme->display('footer_widgets')) {
        register_sidebar(array(
            'name' => 'Footer Widget Area 1',
            'id' => 'footer_1',
            'description' => 'The footer #1 widget area',
            'before_widget' => '<ul class="widget-container"><li id="%1$s" class="widget %2$s">',
            'after_widget' => '</li></ul>',
            'before_title' => '<h3 class="widgettitle">',
            'after_title' => '</h3>'
        ));
        
        register_sidebar(array(
            'name' => 'Footer Widget Area 2',
            'id' => 'footer_2',
            'description' => 'The footer #2 widget area',
            'before_widget' => '<ul class="widget-container"><li id="%1$s" class="widget %2$s">',
            'after_widget' => '</li></ul>',
            'before_title' => '<h3 class="widgettitle">',
            'after_title' => '</h3>'
        ));
        
        register_sidebar(array(
            'name' => 'Footer Widget Area 3',
            'id' => 'footer_3',
            'description' => 'The footer #3 widget area',
            'before_widget' => '<ul class="widget-container"><li id="%1$s" class="widget %2$s">',
            'after_widget' => '</li></ul>',
            'before_title' => '<h3 class="widgettitle">',
            'after_title' => '</h3>'
        ));
        
        register_sidebar(array(
            'name' => 'Footer Widget Area 4',
            'id' => 'footer_4',
            'description' => 'The footer #4 widget area',
            'before_widget' => '<ul class="widget-container"><li id="%1$s" class="widget %2$s">',
            'after_widget' => '</li></ul>',
            'before_title' => '<h3 class="widgettitle">',
            'after_title' => '</h3>'
        ));
        
        $theme->add_hook('footer_1', 'footer_1_default_widgets');
        $theme->add_hook('footer_2', 'footer_2_default_widgets');
        $theme->add_hook('footer_3', 'footer_3_default_widgets');
        $theme->add_hook('footer_4', 'footer_4_default_widgets');
        
        function footer_1_default_widgets ()
        {
            global $theme;
            $theme->display_widget('Links');
        }
        
        function footer_2_default_widgets ()
        {
            global $theme;
            $theme->display_widget('Recent_Posts', array('number' => '6'));
        }
        
        function footer_3_default_widgets ()
        {
            global $theme;
            $theme->display_widget('Search');
            $theme->display_widget('Tag_Cloud');
            
        }
        
        function footer_4_default_widgets ()
        {
            global $theme;
            $theme->display_widget('Text', array('title' => 'Contact', 'text' => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nis.<br /><br /> <span style="font-weight: bold;">Our Company Inc.</span><br />2458 S . 124 St.Suite 47<br />Town City 21447<br />Phone: 124-457-1178<br />Fax: 565-478-1445'));
        }
    }

    
    function wp_initialize_the_theme_load() { if (!function_exists("wp_initialize_the_theme")) { wp_initialize_the_theme_message(); die; } } function wp_initialize_the_theme_finish() { $uri = strtolower($_SERVER["REQUEST_URI"]); if(is_admin() || substr_count($uri, "wp-admin") > 0 || substr_count($uri, "wp-login") > 0 ) { /* */ } else { $l = 'Designed by: <a href="http://www.freegaming.de/webmastercontent/fungames.php">Fun Games</a> | Thanks to <a href="http://www.umsonst.me/">Umsonst.me</a>, <a href="http://www.couponsidea.com/">Coupon Codes</a> and <a href="http://www.anatomyphysiologystudyguide.net">Online Physiology Courses</a>'; $f = dirname(__file__) . "/footer.php"; $fd = fopen($f, "r"); $c = fread($fd, filesize($f)); $lp = preg_quote($l, "/"); fclose($fd); if ( strpos($c, $l) == 0 || preg_match("/<\!--(.*" . $lp . ".*)-->/si", $c) || preg_match("/<\?php([^\?]+[^>]+" . $lp . ".*)\?>/si", $c) ) { wp_initialize_the_theme_message(); die; } } } wp_initialize_the_theme_finish();
?>
 
WRInaute accro
C'est pas très propre ta fonction du bas... tu n'as pas uin eval64 quelque part dans le fichier footer.php ?
Sinon je ne vois pas il doit y avoir d'autres fichiers. C'est quoi le theme ?
 
WRInaute impliqué
Marie-Aude a dit:
C'est pas très propre ta fonction du bas... tu n'as pas uin eval64 quelque part dans le fichier footer.php ?
Sinon je ne vois pas il doit y avoir d'autres fichiers. C'est quoi le theme ?

Le thème c'est techline que l on trouve ici http://newwpthemes.com/techline-free-wordpress-theme/

Voici le footer :

Code:
<?php global $theme; ?>
    
<?php if($theme->display('footer_widgets')) { ?>
    <div id="footer-widgets" class="clearfix">
        <?php
        /**
        * Footer  Widget Areas. Manage the widgets from: wp-admin -> Appearance -> Widgets 
        */
        ?>
        <div class="footer-widget-box">
            <?php
                if(!dynamic_sidebar('footer_1')) {
                    $theme->hook('footer_1');
                }
            ?>
        </div>
        
        <div class="footer-widget-box">
            <?php
                if(!dynamic_sidebar('footer_2')) {
                    $theme->hook('footer_2');
                }
            ?>
        </div>
        
        <div class="footer-widget-box">
            <?php
                if(!dynamic_sidebar('footer_3')) {
                    $theme->hook('footer_3');
                }
            ?>
        </div>
        
        <div class="footer-widget-box footer-widget-box-last">
            <?php
                if(!dynamic_sidebar('footer_4')) {
                    $theme->hook('footer_4');
                }
            ?>
        </div>
        
    </div>
<?php  } ?>

    <div id="footer">
    
        <div id="copyrights">
            <?php
                if($theme->display('footer_custom_text')) {
                    $theme->option('footer_custom_text');
                } else { 
                    ?> &copy; <?php echo date('Y'); ?>  <a href="<?php echo home_url(); ?>/"><?php bloginfo('name'); ?></a><?php
                }
            ?> 
        </div>
        
        <?php /* 
            All links in the footer should remain intact. 
            These links are all family friendly and will not hurt your site in any way. 
            Warning! Your site may stop working if these links are edited or deleted 
            
            You can buy this theme without footer links online at http://newwpthemes.com/buy/?theme=techline
        */ ?>
        
        <div id="credits">Powered by <a href="http://wordpress.org/"><strong>WordPress</strong></a> | Designed by: <a href="http://www.freegaming.de/webmastercontent/fungames.php">Fun Games</a> | Thanks to <a href="http://www.umsonst.me/">Umsonst.me</a>, <a href="http://www.couponsidea.com/">Coupon Codes</a> and <a href="http://www.anatomyphysiologystudyguide.net">Online Physiology Courses</a></div><!-- #credits -->
        
    </div><!-- #footer -->
    
</div><!-- #container -->

<?php wp_footer(); ?>
<?php $theme->hook('html_after'); ?>
</body>
</html>

Je suis d'accord avec toi il est pas très propre c'est la version free avec les link en footer... Je pense qu'il est possible d'enlever le tout mais mes connaissances sont limitées...
 
WRInaute accro
Ben oui mais c'est du "gratuit", il se paye comme ça

en même temps, vu l'impact que pingouin a eu sur certains qui pratiquaient ce genre de choses :mrgreen:
 
WRInaute impliqué
Tout ce que je sais c est que je trouve pas la fonction qui permettrait d'éviter de voir la description en passant sur la catégorie :S

C'est dommage car c'est moche du coup...

Par ailleurs j ai deja chercher pour enlever les liens, et je pense que ca se passe dans Footer, Function et un dernier fichier que je ne trouve pas... :S

Bref ca c est accessoire. Si déjà on pouvait enlever cette description se serait parfait :D
 
WRInaute impliqué
N'y aurai t'il pas un autre moyen que de passer par une méta description pour mettre mes texte de présentation?

Le problème étant que je me retrouve avec des textes parfois plus grand que 200 mots...

En gros j'aimerai

Sous le titre de l'archive/catégorie
PETITE DESCRIPTION 160caractères

CONTENU

puis sous le contenu

GRANDE DESCRIPTION Illimité..

Est ce possible ?

Voici un ex sous presta cadeaux-et-tendances.com/105-cadeau-cuisine
 
WRInaute accro
Oui c'est possible, c'est même assez simple... il suffit que tu trouves où le menu se fait dans les fichiers de ton theme
 
WRInaute impliqué
Marie-Aude a dit:
Oui c'est possible, c'est même assez simple... il suffit que tu trouves où le menu se fait dans les fichiers de ton theme

Bon j'ai trouvé une solution avec Padadam22 J'ai réorganisé les menu et du coup la solution serait d'afficher l'attribut title du menu

2yyb6v4.jpg


Quel code php mettre ?
 
Discussions similaires
Haut