Alchemy Options Docs
v0.9
v0.9
  • Read Me
  • Installation
  • Configuration
  • Meta Boxes
  • Theme mode
  • Samples
  • Field types
    • Text
    • Password
    • URL
    • Email
    • Tel
    • Textarea
    • Editor (WYSIWYG)
    • Datepicker
    • Image upload
    • Radio buttons
    • Select
    • Checkbox
    • Colorpicker
    • Image radio
    • Post type select
    • Datalist
    • Sections
    • Repeater
    • Button group
    • Slider
    • Taxonomy select
    • Field group
  • Functions
    • alch_options_id
    • alch_network_options_id
    • alch_get_option
    • alch_get_network_option
    • alch_delete_value
    • alch_get_post_meta
  • Javascript
    • getOption
    • getNetworkOption
    • getPostMeta
  • Filters
    • alch_options_id
    • alch_network_options_id
    • alch_options_id() . '_args'
    • alch_network_options_id() . '_args'
    • alch_allowed_editor_html_tags
    • alch_allowed_editor_protocols
    • alch_value_{ $optionID }
    • alch_network_value_{ $optionID }
Powered by GitBook
On this page
  • Using Alchemy Options as a plugin
  • Installing via WP-CLI
  • Using Alchemy Options in your theme
  • Cannot redeclare Alchemy_Options\alch_run_plugin

Installation

PreviousRead MeNextConfiguration

Last updated 4 years ago

Alchemy Options can be used as a plugin and can be included into the theme.

Using Alchemy Options as a plugin

  1. download the

  2. go to the Add New plugin page of your WordPress site

  3. click the Upload Plugin button which will bring you a file input

  4. choose the zip-file you've downloaded and press Install Now

  5. activate Alchemy Options

Installing via WP-CLI

You can install (and activate) Alchemy Options via WP-CLI, like so:

wp plugin install https://github.com/AlchemyOptions/AlchemyOptions/raw/master/dist/alchemy-options.zip --activate

Using Alchemy Options in your theme

  1. manually download the

  2. unpack the archive

  3. add the alchemy-options folder to your theme

  4. add the following code at the top of your functions.php (without any hooks)

define( 'ALCHEMY_OPTIONS_THEME_MODE', '__return_true' );

// you may want to correct the path if it's not in the root of the theme
require_once( get_stylesheet_directory() . '/alchemy-options/alchemy-options.php' );

Note. Make sure you do not rename the alchemy-options folder, otherwise it's not going to work, since Alchemy Options files rely on this folder name.

Cannot redeclare Alchemy_Options\alch_run_plugin

If you see the Cannot redeclare Alchemy_Options\alch_run_plugin error, it means that Alchemy Options is already loaded. Make sure you do not load it in 2 places, as a plugin and as part of your theme.

The same error will be triggered if you try to activate it as a plugin having already loaded it as part of a theme.

After the installation you are ready to in your theme. Sample are also available.

zip file of the plugin
zip file of the plugin
configure it
configuration examples