صفحه 2 از 2 نخستنخست 12
نمایش نتایج: از شماره 11 تا 14 , از مجموع 14

موضوع: مشکل با Structured Data > hentry گوگل وبمستر

  1. #11
    عضو انجمن mojtaba05 آواتار ها
    تاریخ عضویت
    Apr 2015
    نوشته ها
    200
    تشکر تشکر کرده 
    120
    تشکر تشکر شده 
    164
    تشکر شده در
    140 پست

    پیش فرض پاسخ : مشکل با Structured Data > hentry گوگل وبمستر

    نقل قول نوشته اصلی توسط REDSTARRRRRR نمایش پست ها
    واقعا ممنونم به خاظر پاسخدهیتون
    ولی با عرضمعذرت من این کد رو کجای تابع function باید قرار بدم؟ یعنی باید دقیقا همین کد رو در تابع فانکشن بذارم تا مشکل رفع بشه؟

    به انتهای فایل functions.php و قبل از بسته شدن تگ پی اچ پی اضافه کنید.
    توجه داشته باشید که خطاها به مرور در گوگل وبمستر کاهش پیدا می کنند، به صورت فوری نیست.

  2. # ADS




     

  3. #12
    عضو جدید
    تاریخ عضویت
    Sep 2017
    نوشته ها
    7
    تشکر تشکر کرده 
    0
    تشکر تشکر شده 
    0
    تشکر شده در
    0 پست

    پیش فرض پاسخ : مشکل با Structured Data > hentry گوگل وبمستر

    نقل قول نوشته اصلی توسط mojtaba05 نمایش پست ها
    به انتهای فایل functions.php و قبل از بسته شدن تگ پی اچ پی اضافه کنید.
    توجه داشته باشید که خطاها به مرور در گوگل وبمستر کاهش پیدا می کنند، به صورت فوری نیست.
    با عرض معذرت من نفهمیدم کجاش باید اضافه کنم. لطفا کمک کنید


    if ( ! function_exists( 'purelife_setup' ) ) :


    function purelife_setup() {


    load_theme_textdomain( 'purelife', get_template_directory() . '/languages' );


    // Add default posts and comments RSS feed links to head.
    add_theme_support( 'automatic-feed-links' );


    /*
    * Let WordPress manage the document title.
    * By adding theme support, we declare that this theme does not use a
    * hard-coded <title> tag in the document head, and expect WordPress to
    * provide it for us.
    */
    add_theme_support( 'title-tag' );


    /*
    * Enable support for Post Thumbnails on posts and pages.
    *
    * @link https://developer.wordpress.org/them...st-thumbnails/
    */
    add_theme_support( 'post-thumbnails' );


    // This theme uses wp_nav_menu() in one location.
    register_nav_menus( array(
    'primary' => esc_html__( 'Primary Menu', 'purelife' ),
    'secondary' => esc_html__( 'Secondary Menu', 'purelife' ),
    'footer' => esc_html__( 'Footer Menu', 'purelife' ),
    ) );


    /*
    * Switch default core markup for search form, comment form, and comments
    * to output valid HTML5.
    */
    add_theme_support( 'html5', array(
    'search-form',
    'comment-form',
    'comment-list',
    'gallery',
    'caption',
    ) );


    // Set up the WordPress core custom background feature.
    add_theme_support( 'custom-background', apply_filters( 'purelife_custom_background_args', array(
    'default-color' => 'ffffff',
    'default-image' => '',
    ) ) );


    add_editor_style();
    }
    endif;
    add_action( 'after_setup_theme', 'purelife_setup' );


    /**
    * Set the content width in pixels, based on the theme's design and stylesheet.
    *
    * Priority 0 to make it available to lower priority callbacks.
    *
    * @global int $content_width
    */
    function purelife_content_width() {
    $GLOBALS['content_width'] = apply_filters( 'purelife_content_width', 760 );
    }
    add_action( 'after_setup_theme', 'purelife_content_width', 0 );


    /**
    * Register widget area.
    *
    * @link https://developer.wordpress.org/them...ring-a-sidebar
    */
    function purelife_sidebar_init() {


    register_sidebar( array(
    'name' => esc_html__( 'Sidebar', 'purelife' ),
    'id' => 'sidebar-1',
    'description' => esc_html__( 'Add widgets here.', 'purelife' ),
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h2 class="widget-title">',
    'after_title' => '</h2>',
    ) );


    register_sidebar( array(
    'name' => esc_html__( 'Footer Column 1', 'purelife' ),
    'id' => 'footer-1',
    'description' => esc_html__( 'Add widgets here.', 'purelife' ),
    'before_widget' => '<div id="%1$s" class="widget footer-widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
    ) );
    register_sidebar( array(
    'name' => esc_html__( 'Footer Column 2', 'purelife' ),
    'id' => 'footer-2',
    'description' => esc_html__( 'Add widgets here.', 'purelife' ),
    'before_widget' => '<div id="%1$s" class="widget footer-widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
    ) );
    register_sidebar( array(
    'name' => esc_html__( 'Footer Column 3', 'purelife' ),
    'id' => 'footer-3',
    'description' => esc_html__( 'Add widgets here.', 'purelife' ),
    'before_widget' => '<div id="%1$s" class="widget footer-widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
    ) );
    register_sidebar( array(
    'name' => esc_html__( 'Footer Column 4', 'purelife' ),
    'id' => 'footer-4',
    'description' => esc_html__( 'Add widgets here.', 'purelife' ),
    'before_widget' => '<div id="%1$s" class="widget footer-widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
    ) );


    register_sidebar( array(
    'name' => esc_html__( 'Header Advertisement', 'purelife' ),
    'id' => 'header-ad',
    'description' => esc_html__( 'Drag the "Advertisement" widget here.', 'purelife' ),
    'before_widget' => '<div id="%1$s" class="header-ad %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
    ) );


    }
    add_action( 'widgets_init', 'purelife_sidebar_init' );


    /**
    * Implement the Custom Header feature.
    */
    require get_template_directory() . '/inc/custom-header.php';


    /**
    * Custom template tags for this theme.
    */
    require get_template_directory() . '/inc/template-tags.php';


    /**
    * Custom functions that act independently of the theme templates.
    */
    require get_template_directory() . '/inc/extras.php';


    /**
    * Customizer additions.
    */


    require get_template_directory() . '/admin/customizer-library.php';


    require get_template_directory() . '/admin/customizer-options.php';


    require get_template_directory() . '/admin/styles.php';


    require get_template_directory() . '/admin/mods.php';


    require get_template_directory() . '/inc/customizer.php';


    /**
    * Load Jetpack compatibility file.
    */
    require get_template_directory() . '/inc/jetpack.php';


    /**
    * Load plugins.
    */
    require get_template_directory() . '/inc/plugins.php';


    /**
    * Enqueues scripts and styles.
    */
    function purelife_scripts() {


    // load jquery if it isn't


    //wp_enqueue_script('jquery');
    wp_enqueue_script('jquery', get_stylesheet_directory_uri() . '/assets/js/jquery.js', array(), '', true );


    // Enqueues Javascripts
    wp_enqueue_script( 'superfish', get_stylesheet_directory_uri() . '/assets/js/superfish.js', array(), '', true );
    wp_enqueue_script( 'modernizr', get_stylesheet_directory_uri() . '/assets/js/modernizr.min.js',array(), '', true );
    wp_enqueue_script( 'html5', get_template_directory_uri() . '/assets/js/html5.js', array(), '', true );
    wp_enqueue_script( 'match-height', get_template_directory_uri() . '/assets/js/jquery.matchHeight-min.js', array(), '', true );
    wp_enqueue_script( 'sticky', get_template_directory_uri() . '/assets/js/jquery.sticky.js', array(), '', true );
    wp_enqueue_script( 'custom', get_stylesheet_directory_uri() . '/assets/js/jquery.custom.js', array(), '20170228', true );


    // Enqueues CSS styles
    wp_enqueue_style( 'purelife-style', get_stylesheet_uri(), array(), '20161209' );
    wp_enqueue_style( 'superfish-style', get_template_directory_uri() . '/assets/css/superfish.css' );
    wp_enqueue_style( 'genericons-style', get_template_directory_uri() . '/genericons/genericons.css' );




    if ( get_theme_mod( 'site-layout', 'choice-1' ) == 'choice-1' ) {
    wp_enqueue_style( 'responsive-style', get_template_directory_uri() . '/responsive.css', array(), '20161209' );
    }

    if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    wp_enqueue_script( 'comment-reply' );
    }
    }
    add_action( 'wp_enqueue_scripts', 'purelife_scripts' );


    /**
    * Post Thumbnails.
    */
    if ( function_exists( 'add_theme_support' ) ) {
    add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size( 300, 300, true ); // default Post Thumbnail dimensions (cropped)
    add_image_size( 'post_thumb', 700, 400, true ); //
    }


    /**
    * Registers custom widgets.
    */
    function purelife_widgets_init() {


    require trailingslashit( get_template_directory() ) . 'inc/widgets/widget-popular.php';
    register_widget( 'purelife_Popular_Widget' );


    require trailingslashit( get_template_directory() ) . 'inc/widgets/widget-recent.php';
    register_widget( 'purelife_Recent_Widget' );


    require trailingslashit( get_template_directory() ) . 'inc/widgets/widget-random.php';
    register_widget( 'purelife_Random_Widget' );


    require trailingslashit( get_template_directory() ) . 'inc/widgets/widget-views.php';
    register_widget( 'purelife_Views_Widget' );


    require trailingslashit( get_template_directory() ) . 'inc/widgets/widget-social.php';
    register_widget( 'purelife_Social_Widget' );


    require trailingslashit( get_template_directory() ) . 'inc/widgets/widget-ad.php';
    register_widget( 'purelife_Ad_Widget' );


    require trailingslashit( get_template_directory() ) . 'inc/widgets/widget-newsletter.php';
    register_widget( 'purelife_Newsletter_Widget' );


    }
    add_action( 'widgets_init', 'purelife_widgets_init' );


    /* Fix PHP warning */
    function _get($str){
    $val = !empty($_GET[$str]) ? $_GET[$str] : null;
    return $val;
    }

  4. #13
    عضو انجمن mojtaba05 آواتار ها
    تاریخ عضویت
    Apr 2015
    نوشته ها
    200
    تشکر تشکر کرده 
    120
    تشکر تشکر شده 
    164
    تشکر شده در
    140 پست

    پیش فرض پاسخ : مشکل با Structured Data > hentry گوگل وبمستر

    اگه انتهای فایل تگ بسته پی اچ پی ?> نداره، به آخر فایل اضافه کنید.

  5. #14
    عضو جدید
    تاریخ عضویت
    Sep 2017
    نوشته ها
    7
    تشکر تشکر کرده 
    0
    تشکر تشکر شده 
    0
    تشکر شده در
    0 پست

    پیش فرض پاسخ : مشکل با Structured Data > hentry گوگل وبمستر

    نقل قول نوشته اصلی توسط mojtaba05 نمایش پست ها
    اگه انتهای فایل تگ بسته پی اچ پی ?> نداره، به آخر فایل اضافه کنید.
    کل کد داخل تابع همین بود
    اول کد انگاری برای کدنویسی <؟ نیست؟

صفحه 2 از 2 نخستنخست 12

اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

موضوعات مشابه

  1. مشکل عجیب در Structured Data گوگل وبمستر
    توسط RaceF1 در انجمن Wordpress
    پاسخ ها: 0
    آخرين نوشته: March 4th, 2018, 14:56
  2. پاسخ ها: 2
    آخرين نوشته: November 13th, 2017, 20:40
  3. مشکل گوگل وب مستر We do not detect any structured data on your site.
    توسط kurdcoffee در انجمن سوالات و مشکلات
    پاسخ ها: 2
    آخرين نوشته: January 6th, 2017, 15:19
  4. آموزش کامل دیتا هایلایتر (Data highlighter) وبمستر تولز | وبگردی
    توسط tabtak در انجمن مباحث و منابع آموزشی
    پاسخ ها: 0
    آخرين نوشته: September 3rd, 2015, 11:23
  5. خطلی گوگل وبمستر --- No data available
    توسط persianboy در انجمن مباحث دیگر
    پاسخ ها: 1
    آخرين نوشته: August 23rd, 2012, 13:20

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •