Skip to:
Content
Pages
Categories
Search
Top
Bottom

Extending a (child) theme – adding new .php file – adding member invites


  • AaronNGray
    Member

    @aaronngray

    Hi,

    I have been looking at BuddyPress source and for the life of me I cannot work out how to add a new .php file to be executed. I have also done Google searches too. I must be missing something very simple as I have spent quite a long time on this so far and drawn a blank.

    I want to add a “members/invite” page, so have tried adding “members/invite.php” to the bp-default and to my child theme, but neither work.

    How do I go about this, group/create.php seems to be called fine, but I cannot work out how to get members/invite to be executed ?

    Help !

    Many thanks in advance,

    Aaron

Viewing 2 replies - 1 through 2 (of 2 total)

  • shanebp
    Moderator

    @shanebp

    One way is to use:
    http://www.hitreach.co.uk/wordpress-plugins/allow-php-in-posts-and-pages/

    Then create a page called ‘Invite’ in wp-admin and put this on the page
    between open and close [ php ] tags without the spaces
    ` locate_template( array( ‘some-theme-dir/invite.php’ ), true ); `

    The url for that page won’t be your-site/members/invite
    It wil be your-site/invite
    If it has to be /members/invite, then I’m not sure how to do it.


    AaronNGray
    Member

    @aaronngray

    Na, I need to know how to be able to create new .php files to be executed both on the (child) theme’s root and under “topics”/”sub diretories”.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Extending a (child) theme – adding new .php file – adding member invites’ is closed to new replies.
Skip to toolbar