Skip to content

Instantly share code, notes, and snippets.

@esedic
Created February 21, 2025 17:27
Show Gist options
  • Save esedic/81d40ab4afae545ead9f4e70820753e6 to your computer and use it in GitHub Desktop.
Save esedic/81d40ab4afae545ead9f4e70820753e6 to your computer and use it in GitHub Desktop.
Add widget position in Yootheme Pro
<?php
// Create a file config.php with this code in put in child theme
return [
// Set theme configuration values
'theme' => [
'positions' => [
'header-top' => 'Header Top',
'header-bottom' => 'Header Bottom'
]
],
// Register event handlers
'events' => [
'init' => function ($app) {
$app->theme->options['positions']['header-top'] = 'Header Top';
$app->theme->options['positions']['header-bottom'] = 'Header Bottom';
},
]
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment