Timeline for Javascript in wordpress
Current License: CC BY-SA 3.0
20 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 5, 2013 at 8:22 | comment | added | MidhuN |
I have added the above mentioned thing. i have changed the ajaxified_function to add_action('wp_ajax_ajaxified_function','ajaxified_function'); add_action( 'wp_ajax_nopriv_ajaxified_function','ajaxified_function' ); function ajaxified_function() { $post = get_post($_POST['post_id']); $feat_image = get_the_post_thumbnail($post->ID); echo $feat_image.$post->post_.'<div class="meetteam_title">'.$post->post_title.'</div><br/>'.$post->post_content; die(); }
|
|
Mar 1, 2013 at 9:06 | comment | added | MidhuN | Can i get the featured image of the post also with the above code which has been changed? | |
Mar 1, 2013 at 5:53 | comment | added | MidhuN | Thanks buddy..i was doing that only. anyway thanks...thanks a lot.!!!! | |
Mar 1, 2013 at 5:29 | comment | added | Vinod Dalvi | You can change the markup in ajaxified_function whatever you want : Example : ajaxified_function() { $temp = get_post($_POST['post_id']); echo '<div class="meetteam_title">'.$temp->post_title.'</div><br/><br/>'.$temp->post_content; die(); } | |
Mar 1, 2013 at 5:24 | comment | added | MidhuN | I have done the Default post thing.One more thing is that i need to give style to some part of the post that is got when we click the image for example just for the heading of the post i need to give font-weight as bold.How can i do that? Now it is showing in a p tag when i check in firebug. Sorry If i am asking too much from you. I am just using the resource that i have got..!!! | |
Feb 28, 2013 at 14:08 | comment | added | MidhuN | I am sorry if i am asking too much...!!!!! @VinodDalvi | |
Feb 28, 2013 at 14:08 | comment | added | MidhuN | Just one more help. I want to make the first post the default post without clicking on the image and when clicking the image also it should work.. what i need to change @VinodDalvi?? | |
Feb 28, 2013 at 12:17 | comment | added | Vinod Dalvi | There was nothing wrong with original code , i have changed it because @MidhuN wants me to add some different class name so in template file i have added one more class name team_featured_image_ and in custom js file i got the first class name by splitting class names. | |
Feb 28, 2013 at 12:06 | comment | added | Tom J Nowell♦ | This answer does not explain what was wrong with the original code, how it works, or what it does that the original didn't. It is purely copypasta and does not help anyone | |
Feb 28, 2013 at 11:56 | comment | added | Vinod Dalvi | I have changed above code to make class name more useful. | |
Feb 28, 2013 at 11:55 | history | edited | Vinod Dalvi | CC BY-SA 3.0 |
added 103 characters in body
|
Feb 28, 2013 at 11:47 | comment | added | MidhuN | I just want to give some style to that. Thats why need to change it.name can be any random name ' | |
Feb 28, 2013 at 11:11 | comment | added | Vinod Dalvi | You can change it but you will have to include post id in it and you will also have to change some code. Tell me why do you want to change class name? what class name you want to display? | |
Feb 28, 2013 at 11:08 | comment | added | MidhuN | Just more doubt. I want to change the class name which is named as <?php the_ID() ?> here. When i change it the content is not coming.What should i do to change it? | |
Feb 28, 2013 at 9:20 | history | edited | Vinod Dalvi | CC BY-SA 3.0 |
added 1 characters in body
|
Feb 28, 2013 at 9:13 | comment | added | MidhuN | Thank you very much Vinod. I got more than what I needed. I owe you one.!!!! I have been stuck with this from yesterday. Thanks a lot...!!!! | |
Feb 28, 2013 at 9:11 | vote | accept | MidhuN | ||
Feb 28, 2013 at 8:34 | history | edited | Vinod Dalvi | CC BY-SA 3.0 |
added 282 characters in body
|
Feb 28, 2013 at 8:04 | comment | added | MidhuN | How will i add the custom js file to the code? | |
Feb 28, 2013 at 7:31 | history | answered | Vinod Dalvi | CC BY-SA 3.0 |