plugin-icon

Woody code snippets — Insert Header Footer Code, AdSense Ads

Вы можете добавить код в header и footer, редактировать код PHP, работать с условной логикой (вставка видео, медиа-контента, текста, рекламы)
Рейтинги
4.5
Последние изменения
June 13, 2024
Версия
2.5.1
Активные установки
70K
Woody code snippets — Insert Header Footer Code, AdSense Ads

Need professional support?

Get starting FREE support Get starting PREMIUM support

  • Забудьте о повторном копировании одного и того же содержимого!
  • Хватит добавлять PHP код в файл functions.php WordPress!
  • Хватит добавлять Google Analytics, Яндекс.Метрику и внешний код в header и footer PHP файлов!
  • Не тратьте время на изменение 100 страниц повторяющегося контента!

Woody Code Snippets will make your life so much easier. The plugin helps to create and store code snippets or duplicated text in a special library at the admin bar of your website. Use the shortcode to add a snippet anywhere on your website. Or do it automatically, for example: head, footer and post injections. You can show or hide code snippets using conditional logic.

Зачем вам нужен этот плагин?

  • Добавляйте header и footer
  • Вы можете подключить Google AdSense, разместить Яндекс. Директ, Media.net и контекстную рекламу Amazon Native Shopping.
  • Insert Google Analytic Tracking code, Yandex Metrika Tracking Code, Yandex Counter to Header, Footer.
  • Добавляйте сниппеты PHP кода и выполняйте их на сайте. Регистрируйте РНР функции, классы, глобальные переменные в любом месте.
  • Вы можете добавить виджеты соцсетей и внешних ресурсов.
  • Вам доступна вставка кода в WordPress: пиксели Facebook, VK, конверсии Google, скрипты Facebook и теги og:image в Facebook.
  • Показать или скрыть сниппеты кода по условной логике.
  • Вы можете сохранять шаблоны записей, конструкторы страниц, цитаты и галереи для повторного использования на сайте.
  • Roll back changes with Code Revisions (Premium)
  • Cloud storage for snippets (Premium)
  • Synchronize snippets between your sites using the cloud (Coming soon)
  • Ready-made snippets in our cloud that will help you solve some of your cases (Premium)

Need premium features?

Get Premium version

Как это работает?

Пример №1

Вы можете создать новый JavaScript сниппет и добавить код, который нужно разместить на сайте. HTML редактор сниппета подсвечивает ошибки в синтаксисе и показывает подсказки. Вам нужно только определить место, куда добавить код. Например, можете разместить код в header, footer или на всех страницах. Если добавить Google Analytics WordPress или подключить Яндекс Метрику, то сниппет будет отлично с ними работать. Создайте дополнительное условие: не показывать этот код администратору. Так вы обезопасите сайт от попыток подбора ролей пользователей.

Пример №2

Вы можете создать текстовый сниппет и добавить повторяющийся текст или шаблон. Вы можете добавить шорткод формы обратной связи, если она универсальна для всех страниц сайта. Теперь вы можете задавать условия для показа содержимого только зарегистрированным пользователям. Сохраните текстовый сниппет и продолжайте редактировать HTML страниц. При использовании редактора Gutenberg выберите специальный блок. В Classic Editor нажмите на иконку плагина и добавьте шорткод нового спиппета. Как вы видите, работать со сниппетами — очень просто!

Список всех функций плагина:

  • Управление кодом footer/header
  • Удобный и понятный редактор кода с подсветкой синтаксиса.
  • Создать текстовую рекламу с графикой в классическом редакторе TinyMCE.
  • Используйте шорткоды для размещения сниппета в любом месте сайта.
  • Используйте специальные блоки для добавления сниппета в Gutenberg.
  • Вы можете передавать содержимое и дополнительные атрибуты в сниппет через шорткоды или специальные блоки (редактор Gutenberg).
  • Размещайте сниппеты записей на всех страницах.
  • Обработчик PHP: запускайте PHP код везде или только для определенного шорткода.
  • Используйте JavaScript, CSS и HTML для создания сниппетов кода.
  • Неограниченное количество сниппетов кода.
  • Использовать шорткоды других плагинов.
  • Показать или скрыть сниппеты кода по условной логике.
  • Экспорт/импорт сниппетов кода.

Где можно автоматически размещать сниппет на сайте?

Весь сайт:

Вставка HTML для header и footer на всех страницах:

  • Добавить header — код сниппета добавляется в исходный код header перед тегом </head> .
  • Добавить footer — код сниппета добавляется в исходный код footer перед тегом </body>.

Вставка PHP в записи, страницы, произвольные записи:

  • Добавьте рекламу перед записью — сниппет записи добавляет в исходных код перед тегом </head> .
  • Добавьте рекламу перед содержимым — сниппет страницы добавляется перед содержимым записи/страницы.
  • Добавьте рекламу перед абзацем — сниппет записи добавляется перед определенным абзацем. Количество абзацев задается в поле Location number.
  • Добавляйте рекламу после абзаца — сниппет записи добавляется после определенного абзаца. Количество абзацев задается в поле Location number.
  • Добавьте рекламу после содержимого — сниппет страницы добавляется после содержимого записи/страницы.
  • Добавляйте рекламу после записи — сниппет добавляется после записи/страницы.

Добавляйте в категории, архивы, теги, таксономии:

  • Добавьте AdSense перед анонсом — сниппет добавляется перед анонсом записи/страницы.
  • Добавьте AdSense после анонса — сниппет добавляется после анонса записи/страницы.
  • Добавьте AdSense между записями — сниппет добавляется между записями.
  • Добавляйте AdSense перед записью — сниппет добавляется перед определенной записью. Количество записей задается в поле Location number.
  • Добавляйте AdSense после записи — сниппет добавляется после определенной записи. Количество записей задается в поле Location number.

Insert to Woocommerce pages: (Premium)

  • Before the list of products — Snippet will be placed before the list of products.
  • After the list of products — Snippet will be placed after the list of products.
  • Before a single product — Snippet will be placed before a single product
  • After a single product — Snippet will be placed after a single product
  • Before a single product summary — Snippet will be placed before a single product summary
  • After a single product summary — Snippet will be placed after a single product summary
  • After a product title — Snippet will be placed after a product title
  • After a product price — Snippet will be placed after a product price
  • After a product excerpt — Snippet will be placed after a product excerpt

  • Добавляйте AdSense после записи — сниппет добавляется после определенной записи. Количество записей задается в поле Location number.

Какие опции условной логики для показа сниппета?

User: — Role — Registration Date — Cookie Name — Current Page — Current Referrer Location: — Post Type — Taxonomy page — Taxonomy of the page — Page Technology (Premium): — AddBlocker — Browser — Use cookie — Use JavaScript — Operation system — Device type Auditory (Premium): — User country (Use Webnet77 or MaxMind geo ip base) — Viewing depth — Attendance by time of day — Total number of visits

Рекомендуем плагины

НУЖНА ПОДДЕРЖКА? ОБРАЩАЙТЕСЬ

Мы предоставляем бесплатную поддержку этого плагина. При возникновении проблем, создайте запрос на поддержку. Мы вам поможем!

  1. Получить бесплатную поддержку
  2. Documentation

We are very need for your help with translating Woody Code Snippets plugin into your native language. We want to make it international and understandable for everyone. Please contact us via email inside the plugin, or create a topic on our support forum if you can help with the translations. In exchange for your help, we will give you better support and our premium plugins absolutely free!

Setting options

  • Keep the HTML entities, don’t convert to its character — If you want to use an HTML entity in your code (for example > or «), but the editor keeps on changing them to its equivalent character (> and » for the previous example), then you might want to enable this option.
  • Execute shortcodes in snippets — Execute shortcodes in the snippet code before executing the snippet.
  • Complete Uninstall — When the plugin is deleted from the Plugins menu, also delete all snippets and plugin settings.
  • Support old shortcodes [insert_php] — If you used our plugin from version 1.3.0, then you could use the old shortcodes [insert_php][/insert_php]; from version 2.2.0 we disabled this type of shortcodes by default, as their use is not safe. If you still want to execute your php code via [insert_php][/insert_php] shortcodes, you can enable this option.

Code Editor

  • Code style — The optional feature. You can customize the code style in the snippet editor. The «Default» style is applied by default.
  • Indent With Tabs — The optional feature. Whether, when indenting, the first N*tabSize spaces should be replaced by N tabs. The default is false.
  • Tab Size — The optional feature. Pressing Tab in the code editor increases left indent to N spaces. N is a number pre-defined by you.
  • Indent Unit — The optional feature. The indent for code lines (units). Example: select a snippet, press Tab. The left indent in the selected code increases to N spaces. N is a number pre-defined by you.
  • Wrap Lines — The optional feature. If ON, the editor will wrap long lines. Otherwise, it will create a horizontal scroll.
  • Line Numbers — The optional feature. If ON, all lines in the editor will be numbered.
  • Auto Close Brackets — The optional feature. If ON, the editor will automatically close opened quotes or brackets. Sometimes, it speeds up coding.
  • Highlight Selection Matches — The optional feature. If ON, it searches for matches for the selected variable/function name. Highlight matches with green. Improves readability.

Geolocation

IP geolocation database (Webnet77 or MaxMind) — Select IP geolocation database

Use this plugin with care!

ATTENTION! Check your php scripts before inserting on your site. If you don’t understand how the php script you are using works, try to avoid using it. Using unverified or outdated php scripts can damage the security of your site! Using the plugin on multisites can be dangerous as it will allow all administrators to insert php, js code. If you cannot control the work of administrators, we recommend that you do not use this plugin for security reasons. We are constantly working to improve the security of the plugin, but unfortunately we cannot check the code scripts you use that may violate the security of your site!

История, разработчики и авторы

If you are a long-term user, you may be confused about the new plugin update. You’ve been using an old plugin – Insert php 1.3.0, and now got an extended product – Woody Code Snippets. Insert php was the first plugin version to work with PHP code. It was created by Will Bontrager Software, LLC. In 2018, the Webcraftic studio started to actively develop the plugin. We’ve created a roadmap and released several powerful updates that help you to use PHP code more comfortable and secure. Now plugin supports not only PHP but other snippet types as well. We’ve decided to rename the plugin as Woody Code Snippets. This name is more suitable for new and powerful plugin features.

Подробную информацию о плагине Insert PHP см. здесь: http://www.willmaster.com/software/WPplugins/go/iphphome_iphplugin

Активные установки
70K
Проверено на
6.5.5
Этот плагин можно скачать и использовать при автономной установке WordPress.