رفتن به مطلب

mikhak

عضو سایت
  • تعداد ارسال‌ها

    119
  • تاریخ عضویت

  • آخرین بازدید

نوشته‌ها ارسال شده توسط mikhak

  1. من کجا را امتحان کنم؟

    برای مطلبتون برچسب انتخاب کنید

    در پیشخوان

    نوشته ها

    همه نوشته ها

    از گوشه سمت چپ بالای سایت روی تنظیمات بزنید و گزینه برچسب ها را تیکدار کنید از صفحه یک اسکرین تهیه کنید که مطلبی که برچسب دارد را مشخص کرده باشد و همراه با نشانی پیوند یکتای همون مطلب بگذارید اینجا

    دوست عزیز من فرق بودن یا نبودن برچسب رو میدونم مطالبی که برچسب داره رو نشون نمیده وگرنه من خودم میدونم اگه برچسب نداشته باشه نشون نمیده . مشکل اینجاست که برچسبها را کلا نشون نمیده .

  2. کد index


    <?php get_header(); ?>
    <?php get_sidebar('top'); ?>
    <?php
    if (have_posts()) {
    /* Display navigation to next/previous pages when applicable */
    if (theme_get_option('theme_' . (theme_is_home() ? 'home_' : '') . 'top_posts_navigation')) {
    theme_page_navigation();
    }
    /* Start the Loop */
    while (have_posts()) {
    the_post();
    get_template_part('content', get_post_format());
    }
    /* Display navigation to next/previous pages when applicable */
    if (theme_get_option('theme_bottom_posts_navigation')) {
    theme_page_navigation();
    }
    } else {
    theme_404_content();
    }
    ?>
    <?php get_sidebar('bottom'); ?>
    <?php get_footer(); ?>

    کد single:


    <?php
    /**
    *
    * single.php
    *
    * The single post template. Used when a single post is queried.
    *
    */
    get_header();
    ?>
    <?php get_sidebar('top'); ?>
    <?php
    if (have_posts()) {
    /* Display navigation to next/previous posts when applicable */
    if (theme_get_option('theme_top_single_navigation')) {
    theme_post_navigation(
    array(
    'prev_link' => theme_get_previous_post_link('« %link'),
    'next_link' => theme_get_next_post_link('%link »')
    )
    );
    }
    while (have_posts()) {
    the_post();
    get_template_part('content', 'single');
    }
    /* Display navigation to next/previous posts when applicable */
    if (theme_get_option('theme_bottom_single_navigation')) {
    theme_post_navigation(
    array(
    'prev_link' => theme_get_previous_post_link('« %link'),
    'next_link' => theme_get_next_post_link('%link »')
    )
    );
    }
    } else {
    theme_404_content();
    }
    ?>
    <?php get_sidebar('bottom'); ?>
    <?php get_footer(); ?>

    کد conten-single.php


    <?php
    /**
    *
    * content*.php
    *
    * The post format template. You can change the structure of your posts or add/remove post elements here.
    *
    * 'id' - post id
    * 'class' - post class
    * 'thumbnail' - post icon
    * 'title' - post title
    * 'before' - post header metadata
    * 'content' - post content
    * 'after' - post footer metadata
    *
    * To create a new custom post format template you must create a file "content-YourTemplateName.php"
    * Then copy the contents of the existing content.php into your file and edit it the way you want.
    *
    * Change an existing get_template_part() function as follows:
    * get_template_part('content', 'YourTemplateName');
    *
    */
    global $post;
    theme_post_wrapper(
    array(
    'id' => theme_get_post_id(),
    'class' => theme_get_post_class(),
    'title' => theme_get_meta_option($post->ID, 'theme_show_post_title') ? get_the_title() : '',
    'heading' => theme_get_option('theme_single_article_title_tag'),
    'before' => theme_get_metadata_icons('date,author,edit', 'header'),
    'content' => theme_get_content(),
    'after' => theme_get_metadata_icons('', 'footer'),
    'comments' => theme_get_comments()
    )
    );
    ?>

  3. با سلام

    دوست عزیز چرا وقتی کد زیر رو در قالبتون ( فایل فانکشن ) میذارم خطا میده ؟


    /** Auto-Generate ALT tag for images */
    function image_alt_tag($content)
    {global $post;preg_match_all('/<img (.*?)\/>/', $content, $images);
    if(!is_null($images)) {foreach($images[1] as $index => $value)
    {if(!preg_match('/alt=/', $value)){
    $new_img = str_replace('<img', '<img alt="'.get_the_title().'"', $images[0][$index]);
    $content = str_replace($images[0][$index], $new_img, $content);}}}
    return $content;
    }
    add_filter('the_content', 'image_alt_tag', 99999);

  4. با سلام

    دوستان من یک قالب رایگان دارم که خیلی خوب هست منتها برچسب نداره .

    لینک دانلود :

    Theme-Tafrihi-[Web-Master]

    میخواستم خودم اضافش کنم که کد مربوطه رو گذاشتم ولی ارور میده . اومدم اون کد برچسبها را آخرین خط گذاشتم که اونم خارج از کادر پست دراومد و شکل خوبی به خودش نگرفت :

    کد HTML:

    <?php

    /**

    *

    * content*.php

    *

    * The post format template. You can change the structure of your posts or add/remove post elements here.

    *

    * 'id' - post id

    * 'class' - post class

    * 'thumbnail' - post icon

    * 'title' - post title

    * 'before' - post header metadata

    * 'content' - post content

    * 'after' - post footer metadata

    *

    * To create a new custom post format template you must create a file "content-YourTemplateName.php"

    * Then copy the contents of the existing content.php into your file and edit it the way you want.

    *

    * Change an existing get_template_part() function as follows:

    * get_template_part('content', 'YourTemplateName');

    *

    */

    global $post;

    theme_post_wrapper(

    array(

    'id' => theme_get_post_id(),

    'class' => theme_get_post_class(),

    'title' => theme_get_meta_option($post->ID, 'theme_show_post_title') ? get_the_title() : '',

    'heading' => theme_get_option('theme_single_article_title_tag'),

    'before' => theme_get_metadata_icons('date,author,edit', 'header'),

    'content' => theme_get_content(),

    'after' => theme_get_metadata_icons('', 'footer'),

    )

    );

    ?>

    <?php the_tags('برچسب ها: ', ', ', '<br />'); ?>

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

    <?php the_tags('برچسب ها: ', ', ', '<br />'); ?>

    قبل از

    'after' => theme_get_metadata_icons('', 'footer'),

     winksmiley02.gif

    );

    بذارم که ارور میده .

    لطفا کمکم کنید .

    خیلی خیلی ازتون ممنون .

×
×
  • اضافه کردن...