0

I have a php website, in which I have used a lot of jquery plugins and accessing another database for header and footer contents dynamically.Now I have to add a blog for which I am checking wordpress. I can create the theme, but cannot access the header and footer dynamic contents from other DB. Is there some other to access the wordpress theme loop and other theme functions in my simple php pages? If no then any suggestion about other simple php blog script to add in the website with SEO support please.

Thank you

1 Answer 1

1

You can include files as you wish in a Wordpress template using include() or require(). Just put your PHP files with your template files and you should be good to go.

Here's how you can forego Wordpress entirely and display something from your old website, if your old website now lives inside of your template folder:

add_action('template_redirect', 'show_old_page');
function show_old_page() {
    if( $_GET['old_page'] == 'pagename' ) {
        include( TEMPLATE_PATH . 'oldpage.php' );
        exit;
    }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.