انجمن


مخفی کردن دسته ها"لطفن سریع"  (۴ نوشته)

  • iman

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۶
    تشکر شده: ۴۲ بار
    # نوشته شده: ۱۳ سال پیش
    ۲۹ بهمن ۱۳۸۹ - ۱۵:۱۹

    سلام من می خوام تنها قسمتی از دسته ها مخفی باشه و دیده نشه
    آیا راهی هست فقط اگه میشه بهم بگین چون مسیله حیاتی هست.
    به طور مثال :

    * كليپ هاي موبايل
    o كليپ هاي تردستي
    o كليپ هاي خنده دار
    o كليپ هاي دوربين مخفي
    o كليپ هاي ديدني
    * چند رسانه اي
    o كليپ هاي رقص
    o كليپ هاي عجيب و جالب
    o كليپ هاي ورزشي
    حالا می خوام مثلن چند رسانه ای نمایش داده نشه اما حذف هم نشه؟

  • بهروز ازند

    آفلاین
    عضو
    تعداد نوشته‌ها: ۵۱۹
    تشکر شده: ۷۹۹ بار
    # نوشته شده: ۱۳ سال پیش
    ۲۹ بهمن ۱۳۸۹ - ۱۶:۰۷

    از ابزار فهرست دلخواه استفاده کن
    اگه نخواستی از این کد استفاده کن
    <?php wp_list_categories('exclude=10'); ?>
    به جای عدد 10 از id دسته مورد نظرت استفاده کن
    اینم بقیه پارامتراش چون codex بستس همشو گذاشتم

    Parameters
    
    show_option_all
        (string) A non-blank value causes the display of a link to all categories if the style is set to list. The default value is not to display a link to all. 
    
    orderby
        (string) Sort categories alphabetically, by unique Category ID, or by the count of posts in that Category. The default is sort by category name. Valid values:
    
            * ID
            * name - Default
            * slug
            * count
            * term_group 
    
    order
        (string) Sort order for categories (either ascending or descending). The default is ascending. Valid values:
    
            * ASC - Default
            * DESC 
    
    show_last_updated
        (boolean) Should the last updated timestamp for posts be displayed (TRUE) or not (FALSE). Defaults to FALSE.
    
            * 1 (True)
            * 0 (False) - Default 
    
    style
        (string) Style to display the categories list in. A value of list displays the categories as list items while none generates no special display method (the list items are separated by  tags). The default setting is list (creates list items for an unordered list). See the markup section for more. Valid values:
    
            * list - Default
            * none 
    
    show_count
        (boolean) Toggles the display of the current count of posts in each category. The default is false (do not show post counts). Valid values:
    
            * 1 (True)
            * 0 (False) - Default 
    
    hide_empty
        (boolean) Toggles the display of categories with no posts. The default is true (hide empty categories). Valid values:
    
            * 1 (True) - Default
            * 0 (False) 
    
    use_desc_for_title
        (boolean) Sets whether a category's description is inserted into the title attribute of the links created (i.e. <a>Category Description" href="...). The default is true (category descriptions will be inserted). Valid values:
    
            * 1 (True) - Default
            * 0 (False) 
    
    child_of
        (integer) Only display categories that are children of the category identified by this parameter. There is no default for this parameter. 
    
    feed
        (string) Display a link to each category's rss-2 feed and set the link text to display. The default is no text and no feed displayed. 
    
    feed_type
        (string) 
    
    feed_image
        (string) Set a URI for an image (usually an rss feed icon) to act as a link to each categories' rss-2 feed. This parameter overrides the feed parameter. There is no default for this parameter. 
    
    exclude
        (string) Exclude one or more categories from the results. This parameter takes a comma-separated list of categories by unique ID, in ascending order. See the example. The child_of parameter is automatically set to false. 
    
    exclude_tree
        (string) Exclude category-tree from the results. This parameter added at Version 2.7.1 
    
    include
        (string) Only include the categories detailed in a comma-separated list by unique ID, in ascending order. See the example. 
    
    hierarchical
        (boolean) Display sub-categories as inner list items (below the parent list item) or inline. The default is true (display sub-categories below the parent list item). Valid values:
    
            * 1 (True) - Default
            * 0 (False) 
    
    title_li
        (string) Set the title and style of the outer list item. Defaults to "Categories". If present but empty, the outer list item will not be displayed. See below for examples. 
    
    number
        (integer) Sets the number of Categories to display. This causes the SQL LIMIT value to be defined. Default to no LIMIT. 
    
    echo
        (boolean) Show the result or keep it in a variable. The default is true (display the categories organized). This parameter added at Version 2.3 Valid values:
    
            * 1 (True) - Default
            * 0 (False) 
    
    depth
        (integer) This parameter controls how many levels in the hierarchy of Categories are to be included in the list of Categories. The default value is 0 (display all Categories and their children). This parameter added at Version 2.5
    
            * 0 - All Categories and child Categories (Default).
            * -1 - All Categories displayed in flat (no indent) form (overrides hierarchical).
            * 1 - Show only top level Categories
            * n - Value of n (some number) specifies the depth (or level) to descend in displaying Categories 
    
    current_category
        (integer) Allows you to force the "current-cat" to appear on uses of wp_list_categories that are not on category archive pages. Normally, the current-cat is set only on category archive pages. If you have another use for it, or want to force it to highlight a different category, this overrides what the function thinks the "current" category is. This parameter added at Version 2.6 
    
    pad_counts
        (boolean) Calculates link or post counts by including items from child categories. If show_counts and hierarchical are true this is automatically set to true. This parameter added at Version 2.9 Valid values:
    
            * 1 (true)
            * 0 (false) - default 
    
    taxonomy
        (string) Taxonomy to return. This parameter added at Version 3.0 Valid values:
    
            * category - default
            * taxonomy - or any registered taxonomy 
    
    walker
        (object) Walker class to render the list with. Valid values:
    
            * object - an instance of a class that extends either Walker_Category or Walker

    البته این سوال به نظرم خیلی تکراری اومد

    کاربران زیر به‌خاطر این نوشته تشکر کرده‌اند:
    Saeed Fard - iman
  • iman

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۶
    تشکر شده: ۴۲ بار
    # نوشته شده: ۱۳ سال پیش
    ۲۹ بهمن ۱۳۸۹ - ۲۱:۲۳

    سلام کدهای سایدبار راست و استایل رو میذارم تا خودتون درست کنن ممنون :

    /*
    Theme Name : MagicP30
    Test on: IE 6.x, IE 7.x, IE 8.x, Firefox 3.x, Opera 10.x, Safari 4.x, Chrome 1.x
    */
    body{
    	background:url(images/backround.gif) repeat #081A37;
    	font:11px tahoma;
    }
    img{
    	border:none;
    }
    input,select,table,button{
    	font:11px tahoma;
    }
    textarea{
    	border:1px solid #0A2E52;
    	background-color:#DCEEFF;
    	font:11px tahoma;
    	color:#000;
    }
    input{
    	border:1px solid #0A2E52;
    	color:#000;
    	background-color:#DCEEFF;
    }
    #h{
    	display:inline;
    }
    h1{
    	font-size:16px;
    }
    h2{
    	font-size:15px;
    }
    h3{
    	font-size:14px;
    }
    h4{
    	font-size:13px;
    }
    h5{
    	font-size:12px;
    }
    h6{
    	font-size:11px;
    }
    .hide{
    	display:none;
    }
    #content{
    	height:auto;
    	width:960px;
    	overflow:hidden !important; overflow:visible;
    	margin:10px auto 10px auto;
    }
    #content-head{
    	background:url(images/top.gif) no-repeat;
    	height:10px;
    	width:960px;
    	overflow:hidden !important; overflow:visible;
    }
    #content-side{
    	background-color:#fff;
    	height:100%;
    	width:960px;
    	overflow:hidden !important; overflow:visible;
    }
    #content-foot{
    	background:url(images/down.gif) no-repeat;
    	height:10px;
    	width:960px;
    	overflow:hidden !important; overflow:visible;
    }
    #header{
    	background:url(images/header.jpg) no-repeat;
    	margin:0 15px 0 15px;
    	height:222px;
    }
    #search{
    	float:left;
    	height:27px;
    	width:190px;
    	margin-left:10px;
    	margin-top:2px;
    }
    .search-input{
    	background:none;
            height:15px;
    	width:110px;
    	color:#000;
    	border:none;
    	padding-top:1px;
    	font-size:10px;
    	padding-right: 45px !important; padding-right: 55px ;
    }
    .search-button{
    	background:none;
    	height:20px;
    	width:20px;
    	border:none;
    	padding-top:4px;
    	padding-right:5px;
    	cursor:pointer;
    }
    #nav{
    	background:url(images/menu.gif) no-repeat;
    	height:42px;
    	width:930px;
    	margin:10px auto 0 auto;
    }
    #nav ul{
    	list-style-type:none;margin:0;padding:4px 15px
    }
    #nav ul li{
    	float:right
    }
    #nav ul li a{
    	color:#fff;display:block;font-family:tahoma;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;line-height:14px;margin:5px 5px 0;padding:0 0 5px 5px;text-align:center;text-decoration:none
    }
    #nav ul li a  span{
    	display:block;padding:5px 5px 4px 0
    	}
    #nav ul li a:hover,.sub-menu ul li a:active{
    	background:transparent url(images/style/nav-highligh-bg-left.gif) no-repeat scroll left top
    }
    #nav ul li a:hover span{
    	background:#fff url(images/style/nav-highligh-bg.gif) no-repeat scroll right top;color:#000
    }
    #nav  .active div span{
    	background:#fff url(images/style/nav-highligh-bg.gif) no-repeat scroll right top;display:block;padding:3px 3px 2px 0
    }
    #rightcol{
    	height:auto;
    	width:200px;
    	float:right;
    	padding:15px !important; padding:15px 10px 15px 15px;
    	color:#395A91;
    }
    #rightcol-ads{
    	background:url(images/colum-ads.gif) no-repeat;
    	height:16px;
    	width:200px;
    }
    #rightcol-category{
    	background:url(images/colum-category.gif) no-repeat;
    	height:16px;
    	width:200px;
    }
    #rightcol-friends{
    	background:url(images/colum-friends.gif) no-repeat;
    	height:16px;
    	width:200px;
    }
    #rightcol-info{
    	background:url(images/colum-info.gif) no-repeat;
    	height:16px;
    	width:200px;
    }
    #rightcol-body{
    	background:url(images/menu-side.gif) repeat-y;
    	height:auto;
    	width:200px;
    }
    #rightcol-btext{
    	padding:8px;
    }
    #rightcol-down{
    	background:url(images/menu-down.gif) no-repeat;
    	height:11px;
    	width:200px;
    	padding-bottom:10px;
    }
    #rightcol ul{
    	list-style-type:none;
    	margin:0px;
    	padding:0px;
    }
    #rightcol ul li{
    	display:block;
    	background:url(images/arrow.gif) no-repeat right 5px;
    	padding:0 10px 0 0;
    }
    #rightcol li{
    	padding:0 8px 0 0;
    	display:block;
    	background:url(images/arrow.gif) no-repeat right 6px;
    }
    #rightcol ul li ul li{
    	background:url(images/point.gif) right 5px no-repeat;
    	padding:0 10px 0 0;
    	margin:0 10px 0 0;
    	font-weight:100;
    }
    #rightcol a{
    	color:#395A91;
    	text-decoration:none;
    }
    #rightcol a:hover{
    	color:#FF6C00;
    	text-decoration:none;
    }
    #linkdump{
    	height:auto;
    	width:500px;
    	margin: 0 auto 10px auto;
    }
    #linkdump-up{
    	background:url(images/center-menu-up.gif) left no-repeat;
    	height:16px;
    	width:500px;
    }
    #linkdump-body{
    	background:url(images/center-menu-side.gif) left repeat-y;
           &nbsp;height:auto;
    	width:500px;
    }
    #linkdump-down{
    	background:url(images/center-menu-down.gif);
    	height:13px !important; height:11px;
    	width:500px;
    }
    #linkdump ul{
    	list-style-type:none;
    	margin:0px;
    	padding:0 10px;
    }
    #linkdump ul li{
    	padding:0 12px 0 0;
    	display:block;
    	background:url(images/ads-arrow.gif) no-repeat right 3px;
    }
    #linkdump a{
    	color:#395A91;
    	text-decoration:none;
    }
    #linkdump a:hover{
    	color:#FF6C00;
    	text-decoration:none;
    }
    #centercol{
    	height:auto;
    	width:500px !important; width:490px;
    	float:right;
    	padding:10px 0 10px 0 !important; padding:10px 4px 10px 6px;
    	color:#333;
    }
    #centercol-up{
    	background:url(images/center-up.gif) no-repeat !important; background:url(images/center-up-ie.gif) no-repeat;
    	height:5px;
    	width:500px !important; width:502px;
    }
    #centercol-body{
    	height:auto;
    	width:498px !important; width:488px;
    	border-right:1px solid #A9CDEF;
    	border-left:1px solid #A9CDEF;
    }
    #centercol-down{
    	background:url(images/center-foot.gif) no-repeat !important; background:url(images/center-foot-ie.gif) no-repeat;
    	height:5px;
    	width:500px !important; width:502px;
    	padding-bottom:10px;
    }
    #centercol a{
    	color:#333;
    	text-decoration:none;
    }
    #centercol a:hover{
    	color:#FF6C00;
    	text-decoration:none;
    }
    #entry{
    	height:auto;
    	width:500px !important; width:480px;
    }
    .entry{
    	padding:5px !important; padding:0px;
    	height:auto;
    	width:490px;
    }
    .entry-header{
    	padding:5px;
    	height:auto;
    	width:490px;
    	font-weight:bold;
    }
    .entry-body{
    	padding:5px;
    	height:auto;
    	width:480px;
    }
    .entry-hit{
    	font-size:10px;
    	text-align:left;
            padding-left:4px !important; padding-left:4px;
    	width:485px !important; width:496px;
    	border-top:dotted 1px #A9CDEF;
    	color:#666;
    }
    .entry-footer{
    	height:auto;
    	width:485px !important; width:500px;
    	border-top:dotted 1px #A9CDEF;
    	font-size:10px;
    	color:#666;
    }
    #leftcol{
    	height:auto;
    	width:200px;
    	float:left;
    	padding:15px !important; padding:15px 10px 15px 10px;
    	color:#395A91;
    }
    #leftcol-ads{
    	background:url(images/colum-ads.gif) no-repeat;
    	height:16px;
    	width:200px;
    }
    #leftcol-last{
    	background:url(images/colum-last-posts.gif) no-repeat;
    	height:16px;
    	width:200px;
    }
    #leftcol-top{
    	background:url(http://clipchi3gp.persiangig.com/image/%D8%B3.gif) no-repeat;
    	height:16px;
    	width:200px;
    }
    #leftcol-random{
    	background:url(images/colum-random.gif) no-repeat;
    	height:16px;
    	width:200px;
    }
    
    #leftcol-archive{
    	background:url(images/colum-monthly-archive.gif) no-repeat;
    	height:16px;
    	width:200px;
    }
    
    #leftcol-body{
    	background:url(images/menu-side.gif) repeat-y;
    	height:auto;
    	width:200px;
    }
    #leftcol-btext{
    	padding:8px;
    }
    #leftcol-down{
    	background:url(images/menu-down.gif) no-repeat;
    	height:11px;
    	width:200px;
    	padding-bottom:10px;
    }
    #leftcol ul{
    	list-style-type:none;
    	margin:0px;
    	padding:0px;
    }
    #leftcol li{
    	background:url(images/left-arrow.gif) right 5px no-repeat;
    	display:block;
    	padding:0 13px 0 0;
    }
    #leftcol a{
    	color:#395A91;
    	text-decoration:none;
    }
    #leftcol a:hover{
    	color:#FF6C00;
    	text-decoration:none;
    }
    #footer{
    	height:auto;
    	width:930px;
    	float:right;
    	padding:0 15px 0 15px;
    	color:#395A91;
    	font:11px Arial;
    }
    #footer-up{
    	background:url(images/foot-up.gif) left no-repeat !important; background:url() left no-repeat;
    	height:6px;
    	width:930px;
    }
    #footer-body{
    	background-color:#DFF4FE;
    	height:auto;
    	width:930px;
    	color:#395A91;
    }
    #footer-down{
    	background:url(images/foot-down.gif) left no-repeat !important; background:url() left no-repeat;
    	height:6px;
    	width:930px;
    }
    #footer a{
    	color:#395A91;
    	text-decoration:none;
    }
    #footer a:hover {
    	color:#FF6C00;
    	text-decoration:none;
    }
    #comment{
    	height:auto;
    	width:500px;
    	padding-top:10px;
    }
    #comment-up{
    	border-bottom:1px solid #A9CDEF;
    	height:auto;
    	width:500px;
    }
    #comment-body{
    	padding:5px;
    	height:auto;
    	width:490px;
    }
    .comment-up{
    	background:url(images/comment-up.gif) left no-repeat;
    	height:10px;
    	width:490px;
    }
    .comment-body{
    	height:auto;
    	width:490px;
    	background-color:#E4F4FD;
    }
    .comment-btext{
    	padding-right:10px;
    	width:480px;
    	height:auto;
    }
    .comment-down{
    	background:url(images/comment-down.gif) left no-repeat;
    	height:10px;
    	width:490px;
    }
    .comment-gravatar{
    	padding-left:10px;
    	float:left;
    }
    .comment-gravatar img{
    	border: 1px solid #A9CDEF;
    	padding: 2px;
    }
    #comment-down{
    	border-bottom:1px solid #A9CDEF;
    	height:auto;
    	width:500px;
    }
    <div id="rightcol">
                <div id="rightcol-ads"></div>
                <div id="rightcol-body">
                  <div id="rightcol-btext">
                    <center>
                      <?php include (TEMPLATEPATH . "/top-right-ads.php"); ?>
    
                    </center>
                  </div>
                </div>
                <div id="rightcol-down"></div>
                <div id="rightcol-category"></div>
                <div id="rightcol-body">
                  <div id="rightcol-btext">
                    <ul>
                      <?php wp_list_cats('sort_column=NAME&optioncount=0&hierarchical=1'); ?>
                    </ul>
                  </div>
                </div>
                <div id="rightcol-down"></div>
                <div id="rightcol-info"></div>
                <div id="rightcol-body">
                  <div id="rightcol-btext">
                    <ul>
    
                  </div>
                </div>
                <div id="rightcol-down"></div>
              </div>
  • iman

    آفلاین
    عضو
    تعداد نوشته‌ها: ۱۷۶
    تشکر شده: ۴۲ بار
    # نوشته شده: ۱۳ سال پیش
    ۲۹ بهمن ۱۳۸۹ - ۲۱:۳۶

    سلام حل شد دمت گرم یه سایتو از فیلتر شدن نجات دادی

درباره‌ی این موضوع