Jump to content
Sign in to follow this  
psaltriparus

Removing Post Edit Link AND Brackets

Recommended Posts

psaltriparus

So I figured out from another post that I could remove the text of the post edit link by adding

.post-edit-link {display:none;}

in the custom css file. However, the brackets [] still appear. How can I eliminate them as well? Thanks.

Share this post


Link to post
Share on other sites
ricardo

Hi! They shouldn't. Can you please post a link to your site? Ricardo

Share this post


Link to post
Share on other sites
psaltriparus

Hi Ricardo- Here is the url to the site (http://dtfrey.com), but you won't see the edit link or brackets because you're not logged in as an admin. I'd be happy to send you a screenshot, but basically, in my post byline, where it used to say [edit], now it says []. When I inspect the page in firebug, it appears that the brackets are outside the CSS classes that apply to the edit link. I suppose I could go edit the brackets out of the theme's templates, but I prefer not to muck around with those.

Share this post


Link to post
Share on other sites
cmunns

Try using FireBug to pinpoint the correct selector then bc it may have changed.

Share this post


Link to post
Share on other sites
ricardo

Dave, I just wanted to see the version and you're using 1.3.5. For all good reasons (including a fix for this) you should update to 1.4, which you can find in your member area. Ricardo

Share this post


Link to post
Share on other sites
psaltriparus

There is no CSS class that applies specifically to the edit brackets, so I can't turn display off using CSS. It would seem (unless I'm missing something) that the only way to get rid of them would be to delete them from whichever php template they're coded into. I guess what I'm asking is where I should start looking to edit them out, as I'm not very well-versed with theme template structure or php coding.

Share this post


Link to post
Share on other sites
psaltriparus

Thanks Ricardo! I'll update and see what happens.

Share this post


Link to post
Share on other sites
psaltriparus

Ricardo- I'm really sorry to be a pain over such a trivial issue, but I've upgraded to version 1.4.1 and the problem is still there. The word "Edit" sits inside a span of class "editpage". That span is inside a link of class "post-edit-link". However, the brackets surrounding the word "Edit" are not inside the span or the link, so they aren't affected when I turn display off. Hopefully a future update of Platform Pro will include a control panel option to toggle the edit link on or off. For now, I'll just get used to it.

Share this post


Link to post
Share on other sites
ricardo

Dave, No pain! =) I honestly just checked 2 locations for the edit link and they both were enclosed by the a href tag. Can you please tell me in what page(s) do you see it that way so that I can tell where to fix it? Ricardo

Share this post


Link to post
Share on other sites
psaltriparus

On my site's homepage, when I'm logged in. Here's what I see in Firebug:

	
	<span class="sword">On</span>
	<span title="2011-05-23T17:41:00+0000" class="date time published">May 23, 2011</span>  ?·
	<span class="post-comments">
	Leave a Comment</span>
	  [ <span class="editpage">Edit</span>]
	
	[/code]

See how the two brackets [ and ] are outside the href and the span?

Share this post


Link to post
Share on other sites
ricardo

Hey Dave! Here's a couple of snippets for you, courtesy of Simon =) The way you use them is to place the one you want (not both) in the bottom of your platformbase/functions.php file This one will remove all edit links:

add_filter ( 'pagelines_post_edit_shortcode', '__return_false' );
And this one will remove just the brakets, in case you want just the edit link (to use with CSS, etc):
add_filter ( 'pagelines_post_edit_shortcode', 'no_brackets' );
	function no_brackets( $output ) {
	   $output = str_replace( '[', '', $output );
	   $output = str_replace( ']', '', $output );
	   return $output;
	}

Ricardo

Share this post


Link to post
Share on other sites
psaltriparus

Ricardo- That worked! Many thanks taking the time to help me out with this!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×