Jump to content
Sign in to follow this  
benmaru

Overide Site Options in child theme?

Recommended Posts

benmaru    0
benmaru

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
evan    0
evan

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
benmaru    0
benmaru

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
Danny    1,327
Danny

The topic was marked as resolved.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Similar Content

    • flourishdesignstudio
      By flourishdesignstudio
      I am working on a multisite installation and had some questions regarding the themeing options. All the sites will have the same structure but each individual site would need a different h1 font and link color. I had originally thought that I would program/edit the parent theme to have a certain set of templates, font sizes, etc. and then that would feed to all the individual sites where I could activate the child theme and use the child theme to define the individual sites' specific link color, heading fonts, etc. So, what I was shooting for was:
      Parent theme = shared by all sites
      Child theme = specific to the minor customizations on a per site basis.
      Is this possible? Am I misunderstanding how these would actually deploy to the different sites?
    • jagipson
      By jagipson+
      Should be a simple answer but not sure why its not doing this.  I have a child theme installed on pagelines 5 that has a hook so it will write over the theme css. Strange is that when I am on the frontend the code works but in the dashboard your theme takes over my code and its no where to be found. See examples attachments
      @Andrew @Danny


    • TallTree
      By TallTree+
      Hi,
      I am trying to remove the sidebar areas from my child theme (pagelines.com) from the post pages on a site:
      https://staging4.talltreemusicfestival.com/2017/grand-analog/
      The content is all the way to the left and very small, and the two sidebar areas are taking up a lot of space.
      What I'm after is content to the left, taking up most of the space, and then a small sidebar width on the right for widgets.
      I've tried selecting 'read width content' and 'full width content' in the edit screen for the WP content section, but it doesn't change.  If I try to move the sidebars (1 or 2) to the left, it doesn't change.
      If I select the pagelines framework theme (not child), the two sidebars go away when not selecting them in the edit screen..
      Can someone please tell me what I'm doing wrong?
      Thanks in advance.
      -Matt
       
    • dbrowne02
      By dbrowne02+
      Hi, I noticed that framework and pagelines.com child theme has a number of errors when run through themecheck. The others, like material and bootstrap, don't have any errors when run through theme check. Is there a way to get it so that there are no errors on the child theme?

    • Grant Turck
      By Grant Turck+
      What file do I need to add code to in my pl-framework-pagelines child theme to insert script after opening body tag on every page?
      Can you someone provide me with the code also?
×