Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hyperlink HTML Appears on BP Member Page

  • Avatar of spbilleaud
    spbilleaud
    Participant

    @spbilleaud

    My site is at http://www.partnersimple.com. This is new build using BuddyPress Version 1.9.2, WordPress 3.8.1 running Tiny Forge (Twenty Twelve child) theme on an Apache server hosted by ASmallOrange.com.

    I am getting this weird hyperlink HTML at the top of my BuddyPress member pages. It includes the following: “a href=”https://partnersimple.com/members/myusername/”>mydisplayname</a.”

    So,
    –Where is this code coming from? and
    –How can I modify it to make the actual hyperlink appear instead of the HTML for the hyperlink?

    Please help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Avatar of spbilleaud
    spbilleaud
    Participant

    @spbilleaud

    More information: in the source code, the faulty link appears here–

    //Custom Header – End –>
    //
    // </header><!– #masthead –>
    //
    // <div id=”main” class=”wrapper”>
    // <div id=”primary” class=”site-content”>
    // <div id=”content” role=”main”>
    //
    //
    // <article id=”post-0″ class=”post-0 bp_members type-bp_members status-publish hentry” //itemscope itemtype=”http://schema.org/Article”>
    // <header class=”entry-header”>
    // //<h1 class=”entry-title” itemprop=”headline”>Susan</h1>
    // </header>
    //
    // <div class=”entry-content” itemprop=”articleBody”>
    // <div id=”buddypress”>
    //
    //
    // <div id=”item-header” role=”complementary”>

    Avatar of spbilleaud
    spbilleaud
    Participant

    @spbilleaud

    *Custom Header – End –>
    *
    * </header><!– #masthead –>
    *
    * <div id=”main” class=”wrapper”>
    * <div id=”primary” class=”site-content”>
    * <div id=”content” role=”main”>
    *
    *
    * <article id=”post-0″ class=”post-0 bp_members type-bp_members status-publish hentry” *itemscope itemtype=”http://schema.org/Article”>
    * <header class=”entry-header”>
    * *<h1 class=”entry-title” itemprop=”headline”>Susan</h1>
    * </header>
    *
    * <div class=”entry-content” itemprop=”articleBody”>
    * <div id=”buddypress”>
    *
    *
    * <div id=”item-header” role=”complementary”>

    Avatar of devonc01
    devonc01
    Participant

    @devonc01

    Hey There,

    I too am receiving this same error, here’s the line of code in my source for that generated page that references the issue (note, names and actual IP have been removed since it’s just local):

    
    [line 122]...
    <article id="post-0" class="post-0 bp_members type-bp_members status-publish hentry">
    <header class="entry-header">
    <h1 class="entry-title">
    <a href=&quot;http://local-ip/wordpress/members/NAME/&quot;>NAME</a>
    </h1>
    </header>
    <!-- .entry-header -->
    <div class="entry-content">
    [line 126]...

    I’m looking into fixing this as well, will post a reply if/when I discover what is causing the issue!

    Avatar of devonc01
    devonc01
    Participant

    @devonc01

    I resolved this issue, but another remains:

    Yesterday, I was getting frustrated with the bbPress (a forum plugin for WordPress), because when I’d have a private forum, instead of it just being an attribute, it prepended ‘Private: ‘ before every forum.

    In my attempt to resolve this issue, I found a similar thing to what JSHelp referenced in this Stack Overflow Post: a code that would be located in the theme’s (my theme was Twenty-Fourteen) functions.php file.

    My attempt to resolve THAT issue, led to THIS issue (where we have HTML code being converted to non-code text on the buddyPress profile page).

    On removing the code from function.php, the issue fixed itself.

    However, I am unsure why these two interact in the way that they do, below is the code I added and later commented out:

    function the_title_trim($title) {
    	// Might aswell make use of this function to escape attributes
    	$title = attribute_escape($title);
    	// What to find in the title
    	$findthese = array(
    		'#Protected:#', // # is just the delimeter
    		'#Private:#'
    	);
    	// What to replace it with
    	$replacewith = array(
    		'', // What to replace protected with
    		'' // What to replace private with
    	);
    	// Items replace by array key
    	$title = preg_replace($findthese, $replacewith, $title);
    	return $title;
    }
    add_filter('the_title', 'the_title_trim');
    Avatar of devonc01
    devonc01
    Participant

    @devonc01

    In reply to my above situation, I went to the WordPress Codex page which lists all the hooks available to developers. On this page, you can see a listing of things used as the first parameters for the add_filter('hook','your functions to run on that hook') method.

    There was an example listed in that Codex that referenced exactly what I was trying to accomplish, namely, removing ‘Private: ‘ from private forum titles.

    Below is the code that I am using now, it strips ‘Private:’ as well as leaving my profile page without any of the wierd markup that the previous code was using (note the previous code was from a post in ’09, so things likely changed since then):

    /* Removing private prefix from post titles */ 
    
     
    function spi_remove_private_protected_from_titles( $format ) {
    	return '%s';
    }
    add_filter( 'private_title_format',   'spi_remove_private_protected_from_titles' );
Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.