Announcement

  •  » Themes
  •  » I created a child theme and nothing happens.

#1 2020-11-15 12:37:25

Iva
Member
Serbia
2017-01-22
8

I created a child theme and nothing happens.

Hi,

I did not like some of the CSS used for the Stripped Responsive theme, mainly the black text on album descriptions with no background as well as some issues with margins and padding and I followed instructions on the following page in order to create a child theme for it, with CSS fixed.

https://piwigo.org/doc/doku.php?id=dev: … e_creation


I first created the most basic of the properties for themeconf.inc.php, as shown in the tutorial and nothing worked.

Then I copied the one of the parent theme and just replaced the variables with the names of my theme, with the original theme defined under the "parent" variable. That ended with a bunch of PHP errors and references to the files in the Piwigo root /include/ folder that definitely exist, as non-existent. There was also a reference to a file named inconfontello and from that I figured out that I needed to specify folders for icons and things like that in themeconf.inc.php, despite the tutorial not explicitly mentioning that.

In the end, I got the things to work again using the following snippet after the header.

$themeconf = array(
  'parent' => 'stripped_responsive',
  'load_parent_css' => true,
  'load_parent_local_head' => true,
  'name' => 'Fuse',
  'theme_dir' => 'fuse',
  'icon_dir' => 'themes/default/icon',
  'img_dir'      => 'themes/default/images',
  'admin_icon_dir' => 'themes/default/icon/admin',
  'mime_icon_dir' => 'themes/default/icon/mimetypes/',);

As a result of this, no changes I made were honoured once again. The tutorial says that my own CSS will be loaded after the parent theme's CSS and this did not happen.

I ended up modifying some of the parent theme files and that is obviously not a good idea.

So, what would I have to do in order to get a child theme to work properly?


The version of Piwigo that I am using is 2.10.2.

Offline

 
  •  » Themes
  •  » I created a child theme and nothing happens.

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact