« first day (2068 days earlier)      last day (3175 days later) » 

14:15
I like cjbj adding all these tag wiki's - that's pretty cool.
I don't like that there's no "Improve Edit" when reviewing them though :/
14:45
Hello folks. I'm having some trouble with wp and his json response. accessing my site ( www.site.com/?posts_last ) I get the json of the last post. but I need it to be able to get the post by id ( something like www.site.com/?posts=1 ). But this is a project that was made by a third party agency, and I couldn't find any plugging added that would do this nor I found any information on the docs.
Is this ?posts_last something from wp itself? if not, any ideas where in the structure I could possible find the reference for this to work, so I can edit to add (if there isn't any) a version for a id response?
15:06
This isn't something that is default to WordPress - if you have access to FTP search functions.php for it, maybe there's a pre_get_posts that handles the $_GET request.
What plugins do you have installed?
 
2 hours later…
16:46
@Howdy_McGee will do. there's no plugins installed =/
17:12
Worked! Found it at functions as you said. Just trying to figure out how to get the get_the_excerpt by id outside a loop
Are you trying to get an actual excerpt or $post->post_excerpt. The function the_excerpt() will generate one if the user hasn't set one.
This answer pretty much summarizes it.
@Howdy_McGee I end up following this one
if(isset($_GET["post"])){
	$post = get_post( $_GET["post"] );
	$arr[0]["title"] = get_the_title();
	$arr[0]["excerpt"] = get_the_excerpt_id(get_the_id());
	$arr[0]["date"] = get_the_date();
	$arr[0]["link"] = get_permalink();
	$arr[0]["image"] = wp_get_attachment_url(get_post_thumbnail_id(get_the_id()));
    echo json_encode($arr);
    die();
}
function get_the_excerpt_id( $post_id ){
	global $post;
	$save_post = $post;
	$post = get_post($post_id);
	setup_postdata( $post );
	$output = get_the_excerpt();
	$post = $save_post;
	return $output;
}
Thanks a bunch =D
17:27
No problem!
I personally, would use wp_trim_words( get_post_field( 'post_content', $post_id ) ); though - since you don't need the whole object or all of those fields there's no point of returning them from get_post().
Then you don't have to worry about the whole $save_post deal.
 
3 hours later…
20:21
0
Q: Mention users in post

SumitI was just wondering that when someone mention username in post like here does user get notification about this? Or mentioning with link do that ? I got mentioned few times but I never got any notification. If it doesn't work then can't we have it when someone mention a username ?

 
2 hours later…
22:12
Is it possible to invite a user to chat without the comment section suggesting to?
Nevermind, I've asked that before and I think only mods can... Now I'm just talking to myself...

« first day (2068 days earlier)      last day (3175 days later) »