Support » Themes and Templates » how to make a conditional statement in wordpress “ function.php” using if is_qa_

  • I want to put a condition statement in wordpress function.php which will call certain function in all pages except in qa_pages.

    Below are the functions which i want to be called, except if it is a question and answer page.(qa_page())

    require_once(GABFIRE_FUNCTIONS_PATH. '/review-options.php');
    require_once(GABFIRE_FUNCTIONS_PATH . '/custom.php');
    require_once(GABFIRE_FUNCTIONS_PATH . '/shortcodes.php');
    require_once(GABFIRE_FUNCTIONS_PATH . '/post-types.php');

    please help if anybody has an idea, I’m illiterate in php.

Viewing 4 replies - 1 through 4 (of 4 total)
  • if (!qa_page()) {
    	require_once(GABFIRE_FUNCTIONS_PATH. '/review-options.php');
            require_once(GABFIRE_FUNCTIONS_PATH . '/custom.php');
            require_once(GABFIRE_FUNCTIONS_PATH . '/shortcodes.php');
            require_once(GABFIRE_FUNCTIONS_PATH . '/post-types.php');
    }

    This may work not sure…

    this doesn’t work
    i want those functions not to be called in qa pages (is_qa_page())

    i am unfamiliar with the function is_qa_page() and cant seem to find it online anywhere, do you have a link to documentation on this function?

    is_qa_page is defined by Q&A plugin by wpmudev. I have used is_ga_page because it will require to use an If statement like “<?php if (is_qa_page()){…………”

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how to make a conditional statement in wordpress “ function.php” using if is_qa_’ is closed to new replies.