• Hello.

    Is it possible to overwrite the template files?

    On my theme folder, I create /question-answer/single-question/ and i duplicated single-question-hook.php.

    However, i can’t see my modification.
    But it works when i edit the same file directly on the plug-in folder.

    Can you help me ? Thank you !

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author PickPlugins

    (@pickplugins)

    Hi, we used the_content filter hook to override question single page templates,

    you should remove the hooked function for question templates, by adding following code on your theme functions.php

    
    remove_filter( 'the_content', 'qa_single_question_content' );
    

    see the following file, line: 1592

    question-answer/includes/functions.php

    then you can add your own hooked function.

    View post on imgur.com

    Hope you understand.

    Regards

    Thread Starter imediacm

    (@imediacm)

    Thank you for your answer.

    However, I still don’t understand how I can overwrite the plugin’s template files in my custom theme.
    In theory, I should be able to overwrite them by duplicating your files in my own theme and modifying them there, but it doesn’t work.
    I need to be able to edit your template files to adapt them to our website.
    I can’t edit them directly in the plugin folder, because an update would overwrite my changes.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Edit template’ is closed to new replies.