Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-29-2010, 01:19 PM   #1
Angry Jew Cat - Banned for Life
(felis madjewicus)
 
Industry Role:
Join Date: Jul 2006
Location: In Mom & Dad's Basement
Posts: 20,368
wordpress question: delete post tag for inclusion in themes?

Is there a way I can add a "delete post" right into the theme for when I'm logged in as an admin? So I can edit or delete on the fly while browsing my site? Just a quicklink to jump me right on to the edit screen for that post.
Angry Jew Cat - Banned for Life is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2010, 01:30 PM   #2
miXXXture
Confirmed User
 
miXXXture's Avatar
 
Industry Role:
Join Date: Jul 2009
Posts: 217
http://codex.wordpress.org/Template_Tags/edit_post_link
miXXXture is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2010, 02:48 PM   #3
Robocrop
Confirmed User
 
Robocrop's Avatar
 
Industry Role:
Join Date: Aug 2008
Location: Hollywood
Posts: 2,785
Check this theme out, has exactly what you look for.

http://wordpress.org/extend/themes/p2
Robocrop is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2010, 03:25 PM   #4
$5 submissions
I help you SUCCEED
 
$5 submissions's Avatar
 
Industry Role:
Join Date: Nov 2003
Location: The Pearl of the Orient Seas
Posts: 32,195
Quote:
Originally Posted by Robocrop View Post
Check this theme out, has exactly what you look for.

http://wordpress.org/extend/themes/p2
Nice and clean.
$5 submissions is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-29-2010, 04:36 PM   #5
Robocrop
Confirmed User
 
Robocrop's Avatar
 
Industry Role:
Join Date: Aug 2008
Location: Hollywood
Posts: 2,785
Quote:
Originally Posted by $5 submissions View Post
Nice and clean.
Yup its a cool theme, but I mainly wanted to show the Jew it had the function he was looking for
Robocrop is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-30-2010, 11:37 AM   #6
Angry Jew Cat - Banned for Life
(felis madjewicus)
 
Industry Role:
Join Date: Jul 2006
Location: In Mom & Dad's Basement
Posts: 20,368
checked it out, and added it to my site, thanks guys. would be really slick if i could add a delete post link right on the page to nuke posts as i flip by them, but the edit link works
Angry Jew Cat - Banned for Life is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-30-2010, 12:20 PM   #7
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,214
Quote:
Originally Posted by Angry Jew Cat View Post
Is there a way I can add a "delete post" right into the theme for when I'm logged in as an admin? So I can edit or delete on the fly while browsing my site? Just a quicklink to jump me right on to the edit screen for that post.
Code:
function wp_delete_post_link($link = 'Delete This', $before = '', $after = '')
{
	global $post;
	if ( $post->post_type == 'page' ) {
		if ( !current_user_can( 'edit_page', $post->ID ) )
			return;
	} else {
		if ( !current_user_can( 'edit_post', $post->ID ) )
			return;
	}
	$link = "<a href='" . wp_nonce_url( get_bloginfo('url') . "/wp-admin/post.php?action=delete&amp;post=" . $post->ID, 'delete-post_' . $post->ID) . "'>".$link."</a>";
	echo $before . $link . $after;
}
Code:
<?php wp_delete_post_link('Delete This', '<p>', '</p>');?>
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-30-2010, 06:41 PM   #8
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,214
bump for angry jew
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-01-2010, 08:58 AM   #9
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,214
still need this?
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-01-2010, 09:45 AM   #10
garce
Confirmed User
 
garce's Avatar
 
Industry Role:
Join Date: Oct 2001
Location: Toronto
Posts: 7,103
I don't know if he does, but I can use it. Thanks, Fris.
garce is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-01-2010, 10:37 AM   #11
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,214
you could probably add a bit of ajax, so it reloads the page after delete.

theirs also a function in 2.9+ wp_delete_post() which requires the postid

Code:
global $post;
wp_delete_post($post->ID);
but the other one works for previos versions
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-01-2010, 10:57 AM   #12
Angry Jew Cat - Banned for Life
(felis madjewicus)
 
Industry Role:
Join Date: Jul 2006
Location: In Mom & Dad's Basement
Posts: 20,368
checking this option out now, been working with a shitload of posts every day in wordpress. on the fly deletions should be great. thanks again fris.
Angry Jew Cat - Banned for Life is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-01-2010, 02:07 PM   #13
Angry Jew Cat - Banned for Life
(felis madjewicus)
 
Industry Role:
Join Date: Jul 2006
Location: In Mom & Dad's Basement
Posts: 20,368
works great, i really need to learn how to work with the functions more
Angry Jew Cat - Banned for Life is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.