Title: Ответы пользователя fiorentese | WordPress.org Русский

---

# fiorentese

  [  ](https://ru.wordpress.org/support/users/fiorentese/)

 *   [Профиль](https://ru.wordpress.org/support/users/fiorentese/)
 *   [Начатые темы](https://ru.wordpress.org/support/users/fiorentese/topics/)
 *   [Ответы](https://ru.wordpress.org/support/users/fiorentese/replies/)
 *   [Темы с ответами](https://ru.wordpress.org/support/users/fiorentese/replied-to/)
 *   [Взаимодействия](https://ru.wordpress.org/support/users/fiorentese/engagements/)
 *   [Избранное](https://ru.wordpress.org/support/users/fiorentese/favorites/)

 Поиск ответов:

## Ответы в темах

Просмотр 9 ответов — с 1 по 9 (всего 9)

 *   Форум: [Проблемы и решения](https://ru.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   Тема: [Реклама adsense на WordPress](https://ru.wordpress.org/support/topic/%d1%80%d0%b5%d0%ba%d0%bb%d0%b0%d0%bc%d0%b0-adsense-%d0%bd%d0%b0-wordpress/)
 *  Автор [fiorentese](https://ru.wordpress.org/support/users/fiorentese/)
 * (@fiorentese)
 * [8 лет, 9 месяцев назад](https://ru.wordpress.org/support/topic/%d1%80%d0%b5%d0%ba%d0%bb%d0%b0%d0%bc%d0%b0-adsense-%d0%bd%d0%b0-wordpress/#post-270147)
 * И то через раз. А в теле нет.
 *   Форум: [Проблемы и решения](https://ru.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   Тема: [Слетает мобильная тема после активации WP Super Cache](https://ru.wordpress.org/support/topic/%d1%81%d0%bb%d0%b5%d1%82%d0%b0%d0%b5%d1%82-%d0%bc%d0%be%d0%b1%d0%b8%d0%bb%d1%8c%d0%bd%d0%b0%d1%8f-%d1%82%d0%b5%d0%bc%d0%b0-%d0%bf%d0%be%d1%81%d0%bb%d0%b5-%d0%b0%d0%ba%d1%82%d0%b8%d0%b2%d0%b0%d1%86/)
 *  Автор [fiorentese](https://ru.wordpress.org/support/users/fiorentese/)
 * (@fiorentese)
 * [9 лет, 2 месяца назад](https://ru.wordpress.org/support/topic/%d1%81%d0%bb%d0%b5%d1%82%d0%b0%d0%b5%d1%82-%d0%bc%d0%be%d0%b1%d0%b8%d0%bb%d1%8c%d0%bd%d0%b0%d1%8f-%d1%82%d0%b5%d0%bc%d0%b0-%d0%bf%d0%be%d1%81%d0%bb%d0%b5-%d0%b0%d0%ba%d1%82%d0%b8%d0%b2%d0%b0%d1%86/#post-256371)
 * Спасибо, проблему решил полным установкой плагина hyper cache. Ни каких проблем,
   работает отлично.
 *   Форум: [Проблемы и решения](https://ru.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   Тема: [Помогите разобраться в файле sidebar.php](https://ru.wordpress.org/support/topic/%d0%bf%d0%be%d0%bc%d0%be%d0%b3%d0%b8%d1%82%d0%b5-%d1%80%d0%b0%d0%b7%d0%be%d0%b1%d1%80%d0%b0%d1%82%d1%8c%d1%81%d1%8f-%d0%b2-%d1%84%d0%b0%d0%b9%d0%bb%d0%b5-sidebar-php/)
 *  Автор [fiorentese](https://ru.wordpress.org/support/users/fiorentese/)
 * (@fiorentese)
 * [9 лет, 9 месяцев назад](https://ru.wordpress.org/support/topic/%d0%bf%d0%be%d0%bc%d0%be%d0%b3%d0%b8%d1%82%d0%b5-%d1%80%d0%b0%d0%b7%d0%be%d0%b1%d1%80%d0%b0%d1%82%d1%8c%d1%81%d1%8f-%d0%b2-%d1%84%d0%b0%d0%b9%d0%bb%d0%b5-sidebar-php/#post-234340)
 * Вот файл init.php
 *     ```
       <?php
       /** Core Theme Framework */
       class Contango {
   
       	/** Constructor Method */
       	function __construct() {
   
       		/** Define a Global variable Standard Class */
       		global $contango;
       		$contango = new stdClass;
   
       		/** Define framework, parent theme, and child theme constants. */
       		add_action( 'after_setup_theme', array( &$this, 'constants' ), 1 );
   
       		/** Load the core functions required by the rest of the framework. */
       		add_action( 'after_setup_theme', array( &$this, 'core' ), 2 );
   
       		/** Language functions and translations setup. */
       		add_action( 'after_setup_theme', array( &$this, 'i18n' ), 3 );
   
       		/** Load the framework functions. */
       		add_action( 'after_setup_theme', array( &$this, 'functions' ), 12 );
   
       		/** Load admin files. */
       		add_action( 'wp_loaded', array( &$this, 'admin' ) );		
   
       	}
   
       	/** Define Constant Paths */
       	function constants() {
   
       		/** Directory Location Constants */
   
       		/** Sets the path to the parent theme directory. */
       		define( 'CONTANGO_DIR', trailingslashit( get_template_directory() ) );
       		define( 'CONTANGO_LIB_DIR', trailingslashit( CONTANGO_DIR . 'lib' ) );
   
       		define( 'CONTANGO_FUNCTIONS_DIR', trailingslashit( CONTANGO_LIB_DIR . 'functions' ) );
       		define( 'CONTANGO_ADMIN_DIR', trailingslashit( CONTANGO_LIB_DIR . 'admin' ) );
       		define( 'CONTANGO_JS_DIR', trailingslashit( CONTANGO_LIB_DIR . 'js' ) );
       		define( 'CONTANGO_CSS_DIR', trailingslashit( CONTANGO_LIB_DIR . 'css' ) );
   
       		/** URI Location Constants */
   
       		/** Sets the path to the parent theme directory URI. */
       		define( 'CONTANGO_URI', trailingslashit( get_template_directory_uri() ) );
       		define( 'CONTANGO_LIB_URI', trailingslashit( CONTANGO_URI . 'lib' ) );
   
       		define( 'CONTANGO_ADMIN_URI', trailingslashit( CONTANGO_LIB_URI . 'admin' ) );
       		define( 'CONTANGO_JS_URI', trailingslashit( CONTANGO_LIB_URI . 'js' ) );
       		define( 'CONTANGO_CSS_URI', trailingslashit( CONTANGO_LIB_URI . 'css' ) );
   
       	}
   
       	/** Loads the core framework functions. */
       	function core() {
   
       		/** Load the core framework functions. */
       		require_once( CONTANGO_FUNCTIONS_DIR . 'core.php' );
   
       	}
   
       	/** Loads translation files */
       	function i18n() {
   
       		/** Translations can be filed in the /languages/ directory */
       		load_theme_textdomain( 'contango', CONTANGO_DIR . 'languages' );
   
       	}
   
       	/** Loads the framework functions. */
       	function functions() {
   
       		/** Load media-related functions. */
       		require_once( CONTANGO_FUNCTIONS_DIR . 'media.php' );
   
       		/** Load utility functions. */
       		require_once( CONTANGO_FUNCTIONS_DIR . 'utility.php' );
   
       		/** Load theme settings functions. */
       		require_once( CONTANGO_FUNCTIONS_DIR . 'settings.php' );
   
       		/** Load menus functions. */
       		require_once( CONTANGO_FUNCTIONS_DIR . 'menus.php' );		
   
       		/** Load sidebars functions. */
       		require_once( CONTANGO_FUNCTIONS_DIR . 'sidebars.php' );
   
       		/** Load featured image functions. */
       		require_once( CONTANGO_FUNCTIONS_DIR . 'featured-image.php' );
   
       		/** Load custom header functions. */
       		require_once( CONTANGO_FUNCTIONS_DIR . 'custom-header.php' );
   
       	}
   
       	/** Load admin files for the framework. */
       	function admin() {
   
       		/* Check if in the WordPress admin. */
       		if ( is_admin() ) {
   
       			/* Load the main admin file. */
       			require_once( CONTANGO_ADMIN_DIR . 'admin.php' );
   
       		}
       	}	
       ```
   
 * За сайдбар здесь отвечает эта строка:
 * `require_once( CONTANGO_FUNCTIONS_DIR . 'sidebars.php' );`
 * Но, что это значит?
 * **register_sidebar** прописан только в sidebar.php. По крайней мере в других 
   файлах я его найти не могу.
 *   Форум: [Проблемы и решения](https://ru.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   Тема: [Помогите разобраться в файле sidebar.php](https://ru.wordpress.org/support/topic/%d0%bf%d0%be%d0%bc%d0%be%d0%b3%d0%b8%d1%82%d0%b5-%d1%80%d0%b0%d0%b7%d0%be%d0%b1%d1%80%d0%b0%d1%82%d1%8c%d1%81%d1%8f-%d0%b2-%d1%84%d0%b0%d0%b9%d0%bb%d0%b5-sidebar-php/)
 *  Автор [fiorentese](https://ru.wordpress.org/support/users/fiorentese/)
 * (@fiorentese)
 * [9 лет, 9 месяцев назад](https://ru.wordpress.org/support/topic/%d0%bf%d0%be%d0%bc%d0%be%d0%b3%d0%b8%d1%82%d0%b5-%d1%80%d0%b0%d0%b7%d0%be%d0%b1%d1%80%d0%b0%d1%82%d1%8c%d1%81%d1%8f-%d0%b2-%d1%84%d0%b0%d0%b9%d0%bb%d0%b5-sidebar-php/#post-234337)
 * Дело в том, что тот что есть сайдбар не зарегистрирован в functions.php
 * Вот код
 *     ```
       <?php
       /** Load the Core Files */
       require_once( trailingslashit( get_template_directory() ) . 'lib/init.php' );
       new Contango();
   
       /** Do theme setup on the 'after_setup_theme' hook. */
       add_action( 'after_setup_theme', 'contango_theme_setup' );
   
       /** Theme setup function. */
       function contango_theme_setup() {
   
       	/** Add theme support for Feed Links. */
       	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' );
   
       	/** Post Formats */
       	add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'video' ) );
   
       	/** Add theme support for Custom Background. */
       	add_theme_support( 'custom-background', array( 'default-color' => 'e9e9e9', 'default-image' => '%s/images/bg-pattern.png', 'wp-head-callback' => 'contango_custom_background_callback' ) );
   
       	/** Set content width. */
       	contango_set_content_width( 580 );
   
       	/** Add custom image sizes. */
       	add_action( 'init', 'contango_add_image_sizes' );
   
       }
   
       /** Adds custom image sizes */
       function contango_add_image_sizes() {
       	add_image_size( 'featured', 200, 180, true );
       }
   
       /**
        * This is a fix for when a user sets a custom background color with no custom background image.  What
        * happens is the theme's background image hides the user-selected background color.  If a user selects a
        * background image, we'll just use the WordPress custom background callback.
        *
        * @link http://core.trac.wordpress.org/ticket/16919
        */
       function contango_custom_background_callback() {
   
       	/* Get the background image. */
       	$image = get_background_image();
   
       	/* If there's an image, just call the normal WordPress callback. We won't do anything here. */
       	if ( !empty( $image ) ) {
       		_custom_background_cb();
       		return;
       	}
   
       	/* Get the background color. */
       	$color = get_background_color();
   
       	/* If no background color, return. */
       	if ( empty( $color ) ) {
       		return;
       	}
   
       	/* Use 'background' instead of 'background-color'. */
       	$style = "background: #{$color};";
   
       ?>
       <style type="text/css">body.custom-background { <?php echo trim( $style ); ?> }</style>
       <?php
       }
       ```
   
 * Выходит так, что functions.php не отвечает за сайдбарды.
 *   Форум: [Проблемы и решения](https://ru.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   Тема: [В мобильной версии сайта не отображаются виджеты](https://ru.wordpress.org/support/topic/%d0%b2-%d0%bc%d0%be%d0%b1%d0%b8%d0%bb%d1%8c%d0%bd%d0%be%d0%b9-%d0%b2%d0%b5%d1%80%d1%81%d0%b8%d0%b8-%d1%81%d0%b0%d0%b9%d1%82%d0%b0-%d0%bd%d0%b5-%d0%be%d1%82%d0%be%d0%b1%d1%80%d0%b0%d0%b6%d0%b0%d1%8e/)
 *  Автор [fiorentese](https://ru.wordpress.org/support/users/fiorentese/)
 * (@fiorentese)
 * [9 лет, 10 месяцев назад](https://ru.wordpress.org/support/topic/%d0%b2-%d0%bc%d0%be%d0%b1%d0%b8%d0%bb%d1%8c%d0%bd%d0%be%d0%b9-%d0%b2%d0%b5%d1%80%d1%81%d0%b8%d0%b8-%d1%81%d0%b0%d0%b9%d1%82%d0%b0-%d0%bd%d0%b5-%d0%be%d1%82%d0%be%d0%b1%d1%80%d0%b0%d0%b6%d0%b0%d1%8e/#post-229206)
 * Я бы так не сказал. Очень неудобный просмотр без мобильной версии.
 *   Форум: [Проблемы и решения](https://ru.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   Тема: [Не могу убрать кликабельную дату в комментариях](https://ru.wordpress.org/support/topic/%d0%bd%d0%b5-%d0%bc%d0%be%d0%b3%d1%83-%d1%83%d0%b1%d1%80%d0%b0%d1%82%d1%8c-%d0%ba%d0%bb%d0%b8%d0%ba%d0%b0%d0%b1%d0%b5%d0%bb%d1%8c%d0%bd%d1%83%d1%8e-%d0%b4%d0%b0%d1%82%d1%83-%d0%b2-%d0%ba%d0%be%d0%bc/)
 *  Автор [fiorentese](https://ru.wordpress.org/support/users/fiorentese/)
 * (@fiorentese)
 * [9 лет, 11 месяцев назад](https://ru.wordpress.org/support/topic/%d0%bd%d0%b5-%d0%bc%d0%be%d0%b3%d1%83-%d1%83%d0%b1%d1%80%d0%b0%d1%82%d1%8c-%d0%ba%d0%bb%d0%b8%d0%ba%d0%b0%d0%b1%d0%b5%d0%bb%d1%8c%d0%bd%d1%83%d1%8e-%d0%b4%d0%b0%d1%82%d1%83-%d0%b2-%d0%ba%d0%be%d0%bc/#post-227577)
 * Всё, спасибо! Получилось изменить.
 *   Форум: [Проблемы и решения](https://ru.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   Тема: [Не могу убрать кликабельную дату в комментариях](https://ru.wordpress.org/support/topic/%d0%bd%d0%b5-%d0%bc%d0%be%d0%b3%d1%83-%d1%83%d0%b1%d1%80%d0%b0%d1%82%d1%8c-%d0%ba%d0%bb%d0%b8%d0%ba%d0%b0%d0%b1%d0%b5%d0%bb%d1%8c%d0%bd%d1%83%d1%8e-%d0%b4%d0%b0%d1%82%d1%83-%d0%b2-%d0%ba%d0%be%d0%bc/)
 *  Автор [fiorentese](https://ru.wordpress.org/support/users/fiorentese/)
 * (@fiorentese)
 * [9 лет, 11 месяцев назад](https://ru.wordpress.org/support/topic/%d0%bd%d0%b5-%d0%bc%d0%be%d0%b3%d1%83-%d1%83%d0%b1%d1%80%d0%b0%d1%82%d1%8c-%d0%ba%d0%bb%d0%b8%d0%ba%d0%b0%d0%b1%d0%b5%d0%bb%d1%8c%d0%bd%d1%83%d1%8e-%d0%b4%d0%b0%d1%82%d1%83-%d0%b2-%d0%ba%d0%be%d0%bc/#post-227569)
 * Убираю полностью этот код
 *     ```
       sprintf( '<a href="%1$s"><span pubdate datetime="%2$s">%3$s</span></a>', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), sprintf( '%1$s at %2$s', get_comment_date(), get_comment_time() ) ),
       								__( 'said:', 'contango' )
       ```
   
 * И сайт перестаёт открываться. Восстанавливаю и тогда всё в порядке.
 *   Форум: [Проблемы и решения](https://ru.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   Тема: [Не могу убрать кликабельную дату в комментариях](https://ru.wordpress.org/support/topic/%d0%bd%d0%b5-%d0%bc%d0%be%d0%b3%d1%83-%d1%83%d0%b1%d1%80%d0%b0%d1%82%d1%8c-%d0%ba%d0%bb%d0%b8%d0%ba%d0%b0%d0%b1%d0%b5%d0%bb%d1%8c%d0%bd%d1%83%d1%8e-%d0%b4%d0%b0%d1%82%d1%83-%d0%b2-%d0%ba%d0%be%d0%bc/)
 *  Автор [fiorentese](https://ru.wordpress.org/support/users/fiorentese/)
 * (@fiorentese)
 * [9 лет, 11 месяцев назад](https://ru.wordpress.org/support/topic/%d0%bd%d0%b5-%d0%bc%d0%be%d0%b3%d1%83-%d1%83%d0%b1%d1%80%d0%b0%d1%82%d1%8c-%d0%ba%d0%bb%d0%b8%d0%ba%d0%b0%d0%b1%d0%b5%d0%bb%d1%8c%d0%bd%d1%83%d1%8e-%d0%b4%d0%b0%d1%82%d1%83-%d0%b2-%d0%ba%d0%be%d0%bc/#post-227506)
 * Так и не нашёл. Вот снимок [http://clip2net.com/s/3EBgepW](http://clip2net.com/s/3EBgepW)
   диспечера файлов. Куда мне перейти что бы найти папку contango?
    -  Ответ изменён 9 лет, 11 месяцев назад пользователем [fiorentese](https://ru.wordpress.org/support/users/fiorentese/).
 *   Форум: [Проблемы и решения](https://ru.wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   Тема: [Не могу убрать кликабельную дату в комментариях](https://ru.wordpress.org/support/topic/%d0%bd%d0%b5-%d0%bc%d0%be%d0%b3%d1%83-%d1%83%d0%b1%d1%80%d0%b0%d1%82%d1%8c-%d0%ba%d0%bb%d0%b8%d0%ba%d0%b0%d0%b1%d0%b5%d0%bb%d1%8c%d0%bd%d1%83%d1%8e-%d0%b4%d0%b0%d1%82%d1%83-%d0%b2-%d0%ba%d0%be%d0%bc/)
 *  Автор [fiorentese](https://ru.wordpress.org/support/users/fiorentese/)
 * (@fiorentese)
 * [9 лет, 11 месяцев назад](https://ru.wordpress.org/support/topic/%d0%bd%d0%b5-%d0%bc%d0%be%d0%b3%d1%83-%d1%83%d0%b1%d1%80%d0%b0%d1%82%d1%8c-%d0%ba%d0%bb%d0%b8%d0%ba%d0%b0%d0%b1%d0%b5%d0%bb%d1%8c%d0%bd%d1%83%d1%8e-%d0%b4%d0%b0%d1%82%d1%83-%d0%b2-%d0%ba%d0%be%d0%bc/#post-227499)
 * Не могу найти этот файл. Примерно пут к contango/lib/functions/utility.php подскажите,
   пожалуйста.

Просмотр 9 ответов — с 1 по 9 (всего 9)