Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to add noindex nofollow tag to bbpress user profile page?

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

  • Robin W
    Moderator

    @robin-w

    template are designed to be alterable and added to your theme

    so

    find
    wp-content/plugins/bbpress/templates/default/bbpress/user-profile.php

    transfer this to your pc and edit whatever you want

    and save

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/user-profile.php

    bbPress will now use this template instead of the original


    Robin W
    Moderator

    @robin-w

    of course this presume you have a child theme

    Functions files and child themes – explained !


    pyoil
    Participant

    @pyoil

    Thanks for the quick reply and detailed steps @robin-w. Really helpful.

    Wondering if the Meta can be added through PHP instead of using a child theme?

    I use the Snippet plugin to add and keep track of code, so I don’t lose track of these customizations (and potential conflicts) in the future. So a PHP hook will be really useful.


    Robin W
    Moderator

    @robin-w

    try this

    add_action( 'bbp_template_before_user_profile', 'rew_add' ); 
    
    function rew_add () {
    	echo '<META NAME=”ROBOTS” CONTENT=”NOINDEX, NOFOLLOW” />' ;
    }

    pyoil
    Participant

    @pyoil

    It works. Thanks a lot @robin-w

    Any chance we can add this to the beginning of the header of the user profile page?

    Right now it is rendered inside the body tag.


    Robin W
    Moderator

    @robin-w

    beyond free help I’m afraid !


    Robin W
    Moderator

    @robin-w

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