Hi,
I have been building an advanced child theme, for that I need to hook some custom setting options in theme options page.
Is there a way to do it ?
Thanks in advance.
Custom Theme options page settings
(8 posts) (3 voices)-
Posted 1 year ago #
-
That's a good idea. I added a couple of filters for this now. Here's the child theme code:
$shortname = "bf"; function add_settings($options) { $options[] = array("type" => "open"); $options[] = array("name" => __("test","BigFeature"), "desc" => "", "id" => $shortname."_childtheme_test", "std" => "", "type" => "text"); $options[] = array("type" => "close"); return $options; } add_filter('bf_themesettings','add_settings'); function add_tabs($tabs) { return $tabs . '<li><a href="#xtra">Xtra stuff</a></li>'; } add_filter('bf_themesettings_tabs','add_tabs');this code adds a new tab, and one text field inside it...but this will only work with the new version though...it will be out this week.
Posted 1 year ago # -
Thanks, awaiting eagerly for the updates then.
On another note , I would love the way to remove the theme options current settings too. (there are too many currently and a normal user wont need most of them).
Also , how do I remove a custom page template. For example , portfolio page , it wont be needed in a shopping cart website. It will only confuse ... so how do I remove it using a child theme.(if possible).Between , I am the one who emailed you from your TF page last week regarding Advanced child themes.
Posted 1 year ago # -
removing options is a bit trickier. I can add ID's to them so they can be hidden with css, that's probably the best solution...
to remove the portfolio template, delete portfolio.php. same with the thumbnails (thumbnails.php) and photoblog (photoblog.php) templates.
Posted 1 year ago # -
I know deleting would remove them.
I meant how do I do that using a child theme.
But anyway, this is not so important. We can leave this issue for now.
Thanks anyway , I am excited to show you the first child theme which is almost done.Posted 1 year ago # -
version 1.4 is now available...
here's how to hide theme settings (add to functions.php of the child theme):
function settingsStyles() { ?>
<style>
/* Hide a checkbox in the features group*/
.checkbox-breadcrumbs { display:none; }/* Hide the whole post meta section */
.bf_meta { display:none; }/* Hide Tab 4 with all it's settings */
.tab4 { display:none; }
</style>
<?php
}
add_action( 'bf_settings_top', 'settingsStyles' );use Firebug to find the classes...
Posted 1 year ago # -
Thank you very much !
You and bigfeature... Rocks !!Playing with cool new features of BF. :-)
Posted 1 year ago #
Reply
You must log in to post.