Support » Miscellaneous » WordPress and Coppermine Theme Integration

WordPress and Coppermine Theme Integration

  • I am currently trying to integrate my wordpress and Coppermine themeing schemes into one. This way if I ever change to the look of my blog Coppermine will automatically mimic the change. What I would like is for Coppermine to look at my wordpress theme files and then to automatically add in the {GALLERY} code in the place where content would go. To do this I tried to put the following code into my Coppermine template:

    include (TEMPLATEPATH . ‘/header.php’);
    echo “{GALLERY}”;
    include (TEMPLATEPATH . ‘/footer.php’);

    However I have run in to two problems in doing this. The first problem was that the main template file is a HTML file not a PHP file. I tried renaming it to template.php but I got an error saying Coppermine could not find the file. To work around this I used the {CUSTOM_HEADER} and {CUSTOM_FOOTER} commands to reference two PHP files. However when I did this none of the {TITLE} or other such commands worked any more.

    So my two questions are thus, first is there any workaround that enables you to use a “template.php� file instead of a “template.html� file? And secondly, how can I get the {TITLE}(and other) Coppermine commands to work in custom header templates?

    I am new to Coppermine and I would really appreciate any help you guys can give me. I am comfortable with PHP and am willing to try anything even if there is a risk of totally screwing up my gallery.

    Thanks for all the help,


    P.S. I understand that this is more of a coppermine question than a wordpress question but I was hoping that some other wordpress user had tried this before and figured out how to get it to work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Cron :: How did this go? I’m trying to do the same thing right now.

    The Dro


    You have to go into the INCLUDE folder in your Gallery directory and search for the file init.inc.php. In there you have to change the line:

    define(‘TEMPLATE_FILE’, ‘template.html’);


    define(‘TEMPLATE_FILE’, ‘template.php’);

    Then make sure your template.html in your coppermine templates folder is also renamed to template.php.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress and Coppermine Theme Integration’ is closed to new replies.