• Resolved m_demori

    (@m_demori)


    Hi,

    i extend a little bit the rambo-register-page-widget.php but this file seem not considered when I use the child theme.
    I add a new option that hide the title of project page and leave only the image, but when i put the new rambo-register-page-widget.php under wp-content/themes/workpress/functions/widget/ the new function doesn’t appear, instead if i replace the wp-content/themes/rambo/functions/widget/rambo-register-page-widget.php everything work as expected.

    Can this problem solved?

    regards

    • This topic was modified 7 years, 8 months ago by m_demori.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @m_demori

    For this you can use the following code in function.php file (child theme >> function.php)

    require( get_stylesheet_directory() . '/functions/widget/ rambo-register-page-widget.php.php' );

    then use your rambo-register-page-widget.php in child theme then check your website.

    Anything else lets me know.

    Thanks

    Thread Starter m_demori

    (@m_demori)

    Hi @imranaliweb

    thank you for you reply, i already try this solution but i receive below error message:

     Cannot redeclare rambo_feature_page_widget() 
    (previously declared in /wp-content/themes/workpress/functions/widget/rambo-register-page-widget.php:9) in /wp-content/themes/rambo/functions/widget/rambo-register-page-widget.php on line 10
    

    Thank you

    • This reply was modified 7 years, 8 months ago by m_demori.
    • This reply was modified 7 years, 8 months ago by m_demori.

    Hi @m_demori

    For this find following code rambo_feature_page_widget in rambo-register-page-widget.php in child theme then replace with this code workpress_feature_page_widget.

    then check and lets me know.

    Thanks

    Thread Starter m_demori

    (@m_demori)

    Hi @imranaliweb,

    i test you change, the “redeclare” problem is solved but my changes doesn’t work.
    If i copy the rambo-register-page-widget.php with my changes inside the rambo theme, everything work as expected instead if use it inside the child theme the changes are not visibile.
    Seem than the new function workpress_feature_page_widget is not registered or not considered and is replaced with the rambo original one.

    Thanks

    Hi @m_demori

    For this, follow the instruction given below.

    1. Firstly, paste the code below into function.php (Workpress theme package >> function.php)

    require( get_stylesheet_directory() . '/functions/widget/rambo-register-page-widget.php' );

    2. Now that you have changed the rambo-register-page-widget.php file, put that file into the Widget folder (Workpress child theme >> fucntion folder >> widget folder).

    3. Now change rambo_feature_page_widget to workpress_feature_page_widget in rambo-register-page-widget.php file.

    4. Now open rambo-register-page-widget.php and find WBR: Page Widget line no 17 then changes WBR: Page Widget to WBR: Workpress Page Widget.

    5. Now you can go to the Widget menu and drag the WBR: Workpress Page Widget, Follow the links given below.

    https://prntscr.com/frih4p

    6. Follow above instruction then check your website.

    Hope this helps.

    Thanks

    Thread Starter m_demori

    (@m_demori)

    Thank you very much, the missing point was the WBR name change! now everything works.

    thank you

    Hi @m_demori

    Glad to know it worked for you.

    We would really appreciate if you could provide us a review here:
    https://www.ads-software.com/support/theme/rambo/reviews/#new-post

    If you have any more questions, feel free to ask again!

    Close this ticket !!!

    Thanks

    Thread Starter m_demori

    (@m_demori)

    thank you

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Extend options of rambo-register-page-widget through child theme’ is closed to new replies.