Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hyperlink HTML Appears on BP Member Page

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

    Participant

    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”&gt;
    // <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”>

    @spbilleaud

    Participant

    *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”&gt;
    * <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”>

    @devonc01

    Participant

    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!

    @devonc01

    Participant

    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');

    @devonc01

    Participant

    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)
  • The topic ‘Hyperlink HTML Appears on BP Member Page’ is closed to new replies.
Skip to toolbar