Title: John's Replies | WordPress.org

---

# John

  [  ](https://wordpress.org/support/users/jsing/)

 *   [Profile](https://wordpress.org/support/users/jsing/)
 *   [Topics Started](https://wordpress.org/support/users/jsing/topics/)
 *   [Replies Created](https://wordpress.org/support/users/jsing/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/jsing/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/jsing/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/jsing/engagements/)
 *   [Favorites](https://wordpress.org/support/users/jsing/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 24 total)

1 [2](https://wordpress.org/support/users/jsing/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/jsing/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Email Templates Customizer and Designer for WordPress and WooCommerce] Mailgun](https://wordpress.org/support/topic/mailgun-2/)
 *  [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/mailgun-2/#post-8882271)
 * [@elindydotcom](https://wordpress.org/support/users/elindydotcom/), You can see
   my fix here:
 * [https://wordpress.org/support/topic/mailgun-html/#post-8882267](https://wordpress.org/support/topic/mailgun-html/#post-8882267)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Email Templates Customizer and Designer for WordPress and WooCommerce] Mailgun HTML](https://wordpress.org/support/topic/mailgun-html/)
 *  Thread Starter [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/mailgun-html/#post-8882267)
 * For anyone else having this issue, this worked for me:
 * add this after line 194 in email-templates/includes/class-mailtpl.php
 * `$this->loader->add_filter( 'mg_mutate_message_body', $this->mailer, 'send_email_mailgun');`
 * and the following after line 106 in email-templates/includes/class-mailtpl-mailer.
   php
 *     ```
       /**
        * Mailgun HTML Compatibility
        * @param $message Array
        *
        * @return Array
        */
       public function send_email_mailgun( $message ) {
         do_action( 'mailtpl/send_email_mailgun', $message, #this );
         $temp_message     =  $this->add_template( apply_filters( 'mailtpl/email_content', $message['html'] ) );
         $message['html']  = $this->replace_placeholders( $temp_message );
         return $message;
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Posts 2 Posts] Fatal error: Call to a member function connect() on a non-object in …](https://wordpress.org/support/topic/fatal-error-call-to-a-member-function-connect-on-a-non-object-in/)
 *  Thread Starter [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [10 years ago](https://wordpress.org/support/topic/fatal-error-call-to-a-member-function-connect-on-a-non-object-in/#post-6493420)
 * Just in case anyone is still suffering, the fix that is working for me is to 
   change one line in formidable.
 * Change this:
    `add_action( 'wp_loaded', 'FrmEntriesController::process_entry',
   10, 0 );`
 * To this:
    `add_action( 'wp_loaded', 'FrmEntriesController::process_entry', 11,
   0 ); //this works`
 * Giving a priority to _p2p_init that was lower than 10, as well as giving the 
   function that registers connection in between didn’t seem to make a difference.
   Formidable’s has to be higher than 10.
 * Be aware this may affect something with woocommerce if you are using that.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Posts 2 Posts] Relate custom post type to post](https://wordpress.org/support/topic/relate-custom-post-type-to-post/)
 *  [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/relate-custom-post-type-to-post/#post-5843471)
 * Can you post the query you are using to get them?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Posts 2 Posts] Attendance Function](https://wordpress.org/support/topic/attendance-function-1/)
 *  [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/attendance-function-1/#post-6113938)
 * Are you still trying to do this? If so are you attempting to mark their attendance
   at the event like a check in desk?
 * If you are I would create a custom field for the event to store the post id of
   each Contact that attends in a list.
 * On the single-event.php page i would loop through all the Contact that are connected
   and display their name and a button (with the value being their id) to mark their
   attendance.
 * Link the button to an ajax function to add/remove their id to the field for that
   event. It could also add the Event post id to the Contact in a custom field.
 * Then you could check the id in question against the string stored in the custom
   field and easily determine if someone attended an event or query the attendees
   of an event easily since you already have their post ids stored.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Posts 2 Posts] Get specific post connections](https://wordpress.org/support/topic/get-specific-post-connections/)
 *  [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/get-specific-post-connections/#post-6388121)
 * Give this a try, you were also missing a comma after `'business_to_people'` that
   I could see.
 *     ```
       function my_get_person_title( $post_id ) {
   
           $connections = new WP_Query( array(
               'connected_type' => 'business_to_people',
               'connected_items' => $get_queried_object(),
               'suppress_filters' => false,
               'nopaging' => true
           ) );
   
           if ( $connections->have_posts() ) :
               while ( $connections->have_posts() ) : $connections->the_post();
                   $title = get_the_title();
                   // do something else with $title but title is empty
               endwhile;
           endif;
   
           return true;
       }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Posts 2 Posts] Programtically create connection](https://wordpress.org/support/topic/programtically-create-connection-1/)
 *  [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/programtically-create-connection-1/#post-5780054)
 * For connecting posts programmatically you just need to gather both post ids:
 * `p2p_type( 'dogs_to_cats' )->connect( $first_post_id, $second_post_id, array('
   date' => current_time('mysql')) );`
 * For adding a taxonomy term at the same time:
 * `wp_set_post_terms( $first_post_id, 'Term', 'your_taxonomy', true );`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Menu Icons by Themeisle – Add Icons to Navigation Menus] Include in Admin?](https://wordpress.org/support/topic/include-in-admin/)
 *  Thread Starter [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/include-in-admin/#post-4872724)
 * That did it, awesome. Thanks for the help!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Menu Icons by Themeisle – Add Icons to Navigation Menus] Include in Admin?](https://wordpress.org/support/topic/include-in-admin/)
 *  Thread Starter [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/include-in-admin/#post-4872708)
 * I tried adding that to my theme’s functions.php, but it didn’t seem to make a
   difference. Any other suggestions?
 * This is a really nice plugin by the way!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Posts 2 Posts] Show Connection before post is published?](https://wordpress.org/support/topic/show-connection-before-post-is-published/)
 *  Thread Starter [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/show-connection-before-post-is-published/#post-4213415)
 * After re-reading that I can see that i stated it incorrectly. Let me try again.
 * Post A is Published.
 * Post B is Pending.
 * In the admin I am editing Post B. I connect Post A, then save Post B as Pending.
   I view post B in the front end.
 * I cannot see the connection to Post A with a short code or the new WP_Query method.
   The connection must exist in some capacity since it is persistent in the admin,
   how can I allow a Pending post or draft to display the connected items on the
   front.
 * Any help would be appreciated.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Posts 2 Posts] Display Posts Connected to Current User](https://wordpress.org/support/topic/display-posts-connected-to-current-user/)
 *  Thread Starter [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/display-posts-connected-to-current-user/#post-3635452)
 * Thanks for the quick support, this is an awesome plugin.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[VéritéCo Timeline] [Plugin: Verite Timeline] Getting WordPress posts into Timeline](https://wordpress.org/support/topic/plugin-verite-timeline-getting-wordpress-posts-into-timeline/)
 *  [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-verite-timeline-getting-wordpress-posts-into-timeline/page/3/#post-2717124)
 * [@janay](https://wordpress.org/support/users/janay/) and @emireofflight
 * I got it working thanks for the help. I’m going to blame it on lack of sleep,
   but I missed the part about installing the JSON-API plugin first.
 * Somehow that didn’t register, so I was basically making a new plugin. FAIL!
 * [@janay](https://wordpress.org/support/users/janay/)
 * I may have to come back to you for some ACF integration after I look over your
   Pastebin entries.
 * So for the slow like myself:
 * 1. Install JSON-API plugin from repository
    2. Add timeline.php from earlier 
   post to the controller directory inside the plugin 3. Go to settings-> JSON-API
   4.Activate timeline controller 5.Insert shortcode or template.
 * Thanks again.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[VéritéCo Timeline] [Plugin: Verite Timeline] Getting WordPress posts into Timeline](https://wordpress.org/support/topic/plugin-verite-timeline-getting-wordpress-posts-into-timeline/)
 *  [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-verite-timeline-getting-wordpress-posts-into-timeline/page/3/#post-2717119)
 * All it contains is this
 *     ```
       <?php
       /*
       Plugin Name: JSON API Timeline Controller
       Plugin URI: none
       Description: Controller for Timeline
       Author: JS
       Version: 1
       Author URI:
       License: GPL2
       */
       ```
   
 * That way the plugin would appear on the list of installed ones so I could activate
   it. I have also tried it without it. In /wp-content/plugins I have
 * /json-api/controller/timeline.php
    It contains the code from the pastebin
 * checking the controller as found above returns a page not found.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[VéritéCo Timeline] [Plugin: Verite Timeline] Getting WordPress posts into Timeline](https://wordpress.org/support/topic/plugin-verite-timeline-getting-wordpress-posts-into-timeline/)
 *  [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-verite-timeline-getting-wordpress-posts-into-timeline/page/3/#post-2717117)
 * Unfortunately due to the project type and its stored info, no. However I can 
   explain what I have done.
 * In wp-content/plugins/ i have the following:
 * /json-api
    consists of activate.php consists of Plugin Header Only (so it shows
   up to be activated)
 * /json-api/controller
    consists of timeline.php consists of the reference code
   from pastebin
 * I saw the instruction to check the [http://mysite.com/api/timeline/category_posts](http://mysite.com/api/timeline/category_posts)
   to verify the controller is working. When I visit the url I get a page not found.
 * I have included it in both a post with shortcode and a page template with do_shortcode,
   both show the timeline box and say “Loading Timeline…”
 * I noticed Janay seemed to have the same problem but mentioned that the controller
   wasn’t activated. Is there something I need to add to my activate.php to get 
   the controller active?
 * Thanks for your help!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[VéritéCo Timeline] [Plugin: Verite Timeline] Getting WordPress posts into Timeline](https://wordpress.org/support/topic/plugin-verite-timeline-getting-wordpress-posts-into-timeline/)
 *  [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-verite-timeline-getting-wordpress-posts-into-timeline/page/3/#post-2717115)
 * @janay-
 * I seem to be having the same problem you were. The controller isn’t activated.
   Can you explain what you did to make that happen?

Viewing 15 replies - 1 through 15 (of 24 total)

1 [2](https://wordpress.org/support/users/jsing/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/jsing/replies/page/2/?output_format=md)