Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
67.5k views
in Q2A Core by
Can anyone tell me how to add more links or text to the powered by Question2Answer link that is put by default in the script? Thanks

2 Answers

+3 votes
by
selected by
 
Best answer

You can implement the attribution abstract method and all your additional code to that function. Here is some sample code:

In your theme's qa-theme.php file, add the following inside the qa_html_theme class definition:

function attribution()
{
$this->output(
'<div class="qa-attribution">',
'YOUR LINK HERE',
'</div>'
);
 
qa_html_theme_base::attribution();
}
 
Please let me know if you need more help.

 

by
So glad this worked.
by
This is my qa-theme.php (for donut theme):

"
<?php
    if ( !defined( 'QA_VERSION' ) ) { // don't allow this page to be requested directly from browser
        header( 'Location: ../../' );
        exit;
    }

    /**
     * Defines the base directory of the theme
     */
    @define( 'DONUT_THEME_BASE_DIR', dirname( __FILE__ ) );

    /**
     * define the directory name of the theme directory
     */
    @define( 'DONUT_THEME_BASE_DIR_NAME', basename( DONUT_THEME_BASE_DIR ) );

    /**
     * Defines the base directory of the theme
     */
    @define( 'DONUT_THEME_TEMPLATE_DIR', DONUT_THEME_BASE_DIR . '/templates/' );

    /**
     * define the version of the theme that is installed
     */
    @define( 'DONUT_THEME_VERSION', "2.0.0" );

    /**
     * include the required files for the theme
     */
    require_once DONUT_THEME_BASE_DIR . '/utils/qa-donut-utils.php';
    require_once DONUT_THEME_BASE_DIR . '/utils/donut-options.php';
    require_once DONUT_THEME_BASE_DIR . '/qa-donut-layer.php';

"

There is no such "qa_html_theme class definition" inside qa-theme.php for donut theme, check above code. Where should I add your given code ?
–2 votes
by
function attribution()
{
$this->output(
'<div class="qa-attribution">',
'YOUR LINK HERE',
'</div>'
);
 
qa_html_theme_base::attribution();
}
 
Please let me know if you need more help.
...