faeronsayn
Forum Replies Created
-
Forum: Plugins
In reply to: [Ajaxify Comments - Ajax and Lazy Loading Comments] jQuery Object blockUIIt seems to work perfectly fine when logged out. However, when logged in you are not able to submit a comment.
Forum: Plugins
In reply to: [Ajaxify Comments - Ajax and Lazy Loading Comments] jQuery Object blockUII wonder why it isn’t working for me. Does it show a red border when you start typing?
Forum: Plugins
In reply to: [Posts 2 Posts] Posts 2 Posts automatically set meta data possible?Oops, didn’t see it, but the answer is in the wiki.
‘title’ => array( ‘from’ => ‘Managed by’, ‘to’ => ‘Manages’ )
Forum: Plugins
In reply to: [Posts 2 Posts] Posts 2 Posts automatically set meta data possible?Nevermind, it seems the fields work a little differently than I thought. Is it possible to rename the (from) and the (to) that come after the ‘Connected {insert-post-type}’? I could just rename those to “Sequel” and “Prequel”
Edit: Oops, didn’t see it, but the answer is in the wiki.
‘title’ => array( ‘from’ => ‘Managed by’, ‘to’ => ‘Manages’ )
Forum: Plugins
In reply to: [Ajaxify Comments - Ajax and Lazy Loading Comments] jQuery Object blockUIYou can try it here: https://phanime.com/48191/love-lab-online-episode-3/
I’ve also enabled debug mode, and it didn’t show anything wrong there.
Forum: Plugins
In reply to: [Ajaxify Comments - Ajax and Lazy Loading Comments] jQuery Object blockUIWhy does $ need to be replaced by jQuery? I’ve been using it before and it hasn’t caused any problems. Anyway, I have replaced it by jQuery WP-Ajaxify-Comments plugin is still not working. The comments are just not being posted.
Forum: Plugins
In reply to: [Ajaxify Comments - Ajax and Lazy Loading Comments] jQuery Object blockUIAlright, I’ve removed the second jQuery call. Now a red border appears whenever I type something in the comment box and when clicking post comment nothing happens. As for the console errors, I don’t see anything either.
Forum: Plugins
In reply to: [Ajaxify Comments - Ajax and Lazy Loading Comments] jQuery Object blockUII need to see the code, is it local or hosted elsewhere like google.
Forum: Plugins
In reply to: [Ajaxify Comments - Ajax and Lazy Loading Comments] jQuery Object blockUIWhere is the first include?
Forum: Plugins
In reply to: [Ajaxify Comments - Ajax and Lazy Loading Comments] jQuery Object blockUISorry for such a late reply.
But here is a page that you can use that has the error: https://phanime.com/48639/makai-ouji-devils-and-realist-online-episode-1/
Each page with the comments form on it has the error. Because of this error the ajax submission or normal submission for that matter does not work.
Forum: Fixing WordPress
In reply to: How to get next post by post date using custom conditions?Anyone have an idea?
Forum: Plugins
In reply to: [Posts 2 Posts] Connection Titles embedded into post titles/* add_filter('pre_post_title', 'wpse28021_mask_empty'); add_filter('pre_post_content', 'wpse28021_mask_empty'); function wpse28021_mask_empty($value) { if ( empty($value) ) { return ' '; } return $value; } function my_acf_save_post( $post_id ) { // vars $episode_number = get_field('anime_episode_number' , $post_id ); if( $episode_number ) { remove_action('acf_save_post' , 'my_acf_save_post' , 20); $anime_id = p2p_type( 'posts_to_anime' )->get_connected( $post_id )->posts[0]->ID; $animetitle = get_the_title( $anime_id ); $my_post = array(); $my_post['ID'] = $post_id; $my_post['post_title'] = $animetitle." Online Episode ".$episode_number; $my_post['post_name'] = $animetitle."-online-episode-".$episode_number; wp_update_post( $my_post ); } } // run before ACF saves the $_POST['fields'] data add_action('acf_save_post' , 'my_acf_save_post' , 20);
Since I am using Advanced Custom Fields, I hook my function into that.
I just added the lines to grab the ID of the anime, then use it to get the title. Then simply change the post_title and post_name.
Forum: Plugins
In reply to: [Posts 2 Posts] Connection Titles embedded into post titlesIt ended up being a lot easier than I expected.
I used the following code, and the priority didn’t matter, it worked fine.
$anime_id = p2p_type( 'posts_to_anime' )->get_connected( $post_id )->posts[0]->ID; $animetitle = get_the_title( $anime_id );
Forum: Plugins
In reply to: [Posts 2 Posts] get_related only next and previous postIn this wiki page
https://github.com/scribu/wp-posts-to-posts/wiki/Query-vars
Right at the end, you look at connection ordering
and you have the following code
'connected_orderby' => $meta_key 'connected_order' => 'asc' or 'desc' 'connected_order_num' => true or false
Where could we use this? And does this actually help with what I am trying to do?
Forum: Plugins
In reply to: [Posts 2 Posts] Connection Titles embedded into post titlesCould someone tell me what I could use instead to grab the connected post title?