Archived

This topic is now archived and is closed to further replies.

  • 0

Resolved Overide Site Options in child theme?


Question

Posted · Report post

I see config file for Site Options


/themes/pagelines/includes/config.options.php

Is there a way to overide or add more fields to Site Options from child theme (by NOT touch Pagelines core file)?

Thanks

Share this post


Link to post
Share on other sites

3 answers to this question

Posted · Report post

Yes, there are filters which allow you to add in your own option tabs, or modify others. That level of customization is probably outside of the scope of this forum though :)

Unfortunately, at the time there really aren't good (read: any) developer docs for the option api. The best thing you can do is just start digging into the code and figuring it out!

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks Evan

I just dig into code and figure myself :)

Here some example for who might need. Put it in child theme functions.php


function custom_header_footer ($default) {

$a = array(

'page_background_image_2' => array(

'title' => __( 'Site Background Image (Optional)', 'pagelines' ),

'shortexp' => __( 'Setup a background image for the background of your site', 'pagelines' ),

'exp' => __( 'Use this option to apply a background image to your site. This option will be applied to different areas depending on the design mode you have set.<br/><br/><strong>Positioning</strong> Use percentages to position the images, 0% corresponds to the <strong>top</strong> or <strong>left</strong> side, 50% to center, etc..', 'pagelines' ),

'type' => 'background_image',

'selectors' => cssgroup('page_background_image')

),

);

return array_merge($default, $a);

}

$default = new PageLinesOptionsArray();

add_filter('pagelines_options_header_footer', 'custom_header_footer', 20, 1);

apply_filters('pagelines_options_header_footer', $default->options);

Share this post


Link to post
Share on other sites

Posted · Report post

The topic was marked as resolved.

Share this post


Link to post
Share on other sites