Adding an Object to the Page Editor in Child Theme


  • David
    Newbie 21 points
    August 9, 2016 at 2:17 pm

    background:
    Okay I admit that I have limited knowledge on this subject but I am interested in learning more. SO I noticed that in the Page Builder ( the interface that allows you to add Sliders, Header, Search, ect… ) to a page that there are objects that can be added and I wondered if these Page objects are the same objects in the frameworks directory within the core theme ( using directorypress here ).

    question:
    Can I use the hooks and filters in my child theme’s functions.php to add objects, i.e. modify the Search object so I can modify the input field types. Can I also create new objects that I can select to use on the page builder interface? Mostly to just rearrange html structure.


  • Josh
    Super Guru 13,875 points
    August 9, 2016 at 4:08 pm

    Hello David,
    The objects in core files are for the Old Home page Editor (Design Setup >Old Home Page Editor)
    With coding skills you can add more features/objects to the Page Builder and use hooks and filters too ie you need some customization to add more objects/features

    This reply was awarded the best answer by the topic poster.

  • David
    Newbie 21 points
    August 10, 2016 at 5:38 pm

    Okay thank you, but to do so would be through the editing the Page Builder plugin and not through the DirectoryPress theme itself?

  • Marie
    Marie
    Super Guru 1,818 points
    August 11, 2016 at 3:56 am

    hi David,

    You have to edit the Page builder plugin not the theme.


  • Josh
    Super Guru 13,875 points
    August 11, 2016 at 11:10 am

    Hello David,
    To edit old homepage editor edit theme core files to edit Page Builder edit plugin files like Marie mentioned above


  • David
    Newbie 21 points
    August 11, 2016 at 7:58 pm

    Thank you Marie, and Super Guru Josh, I found the PT_Core_Search1 that I want to edit and I copied it and made a new file called PT_Core_Search3 and added some of the minor adjustments. I am afraid that this customization will be overwritten if the plugin updates, would any of you know how to keep this from happening, any resources into how to accomplish some of these customizations?


  • Josh
    Super Guru 13,875 points
    August 12, 2016 at 2:48 pm

    Hello David,
    Unfortunately unlike themes you can use a child theme,plugins don’t have an option to prevent updates from changing added custom code.But you can refrain from updating the plugin completely though this is not recommended


  • David
    Newbie 21 points
    August 18, 2016 at 4:56 pm

    Not sure what kind of rabbit hole this might entail but I was looking into plugins and was seeing that some shortcodes are located in the parent’s theme (Directory Press or DT ) under framework/ directory. So I have a child theme, would I be able to edit those parent theme functions in the child theme’s functions.php to override the their default functionalities?


  • Josh
    Super Guru 13,875 points
    August 18, 2016 at 5:43 pm

    Hello David,
    Only hooks and filters allow you to change core files code.You can get a list of hooks and filters in the file class_hooks_filters.php
    For your situation you will need to hire a developer to assist


  • David
    Newbie 21 points
    August 19, 2016 at 2:46 pm

    Thank you Super Guru Josh.


  • Josh
    Super Guru 13,875 points
    August 19, 2016 at 3:01 pm

    You’re welcome David.Have a great day 🙂


  • David
    Newbie 21 points
    August 31, 2016 at 6:12 pm

    Hey I am just wondering about the [BUILDER] – PremiumPress Page Builder and old home page builder which is apart of the core theme functionalities seen in ( https://www.premiumpress.com/docs/#2b ).

    Q1: Is the plugin’s purpose to replace the old homepage builder? Doesn’t it seem redundant to have a page builder plugin when the core theme files seem to handle page building functionalities.

    Q2: Say I wanted to edit how the content is outputted, how do I know if I should look in the plugin or in the core theme files? I suppose it would be preferable to only modify hooks provided in the parent theme since like mentioned earlier in this topic, I cannot make a child-plugin.


  • Josh
    Super Guru 13,875 points
    August 31, 2016 at 6:38 pm

    Hello David,
    Q1.The Old Homepage Editor can can only be used to design the homepage while the Page Builder can be used to design a page and the homepage.The Old Homepage Editor is still available since some users had used it to develop their homepage in old theme version.
    Q2.If using Old homepage Editor look in theme core files,if using Page Builder Plugin look in plugin files


  • David
    Newbie 21 points
    August 31, 2016 at 8:36 pm

    Great, thank you!!


  • Josh
    Super Guru 13,875 points
    September 1, 2016 at 4:22 am

    You’re welcome David 🙂

Viewing 15 posts - 1 through 15 (of 15 total)

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes