Skip to:
Content
Pages
Categories
Search
Top
Bottom

Using WP template tags

  • Can I use my own WP template tags (or functions) into the bb templates?

    I tried to add require_once('http://www.mydomain.com/wp-config.php'); into the config.php file, but don’t work.

    If I add require_once('../wp-config.php');, it works, but crash the bb-admin panel.

    Can anyone help me?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Try

    require_once(dirname(dirname(__FILE__)) . '/wp-config.php');

    in bbPress’ config.php.

    Finally I use: require_once(dirname(dirname(__FILE__)) . '/wp-blog-header.php'); because some functions don’t work properly with ´/wp-config.php´.

    Thanks anyway.


    devils_advocate
    Member

    @devils_advocate

    “Try

    require_once(dirname(dirname(__FILE__)) . ‘/wp-config.php’);

    in bbPress’ config.php.”

    So this as you are installing bbPress? or ?

    Afther bbPress is installed, if you wish to use WordPress’ template tags, you will need to include a line like the above in bbPress’ config.php.

    I have tried to add the above line to my install of bbpress and I get the following error:

    Fatal error: Cannot redeclare allowed_tags() (previously declared in /home/taacus/public_html/wordpress/wp-includes/general-template.php:602) in /home/taacus/public_html/wordpress/bbpress/bb-includes/template-functions.php on line 949

    What am I doing wrong?

    abbaanthony, It looks like you’re using a copy of the code-in-development.

    Try using the official bbPress release.

    @abbaantho

    I am using the official release and still get that error. Have you fixed it?

    @mdawaffe:

    Did something change in 0.74 in regards to the line needing added in the config.php

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar