Title: timothyf's Replies | WordPress.org

---

# timothyf

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Constant Contact Forms] plugin worked until changing password at constant contact](https://wordpress.org/support/topic/plugin-worked-until-changing-password-at-constant-contact/)
 *  Thread Starter [timothyf](https://wordpress.org/support/users/timothyf/)
 * (@timothyf)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/plugin-worked-until-changing-password-at-constant-contact/#post-17208722)
 * Aha! Eventually the error message cleared and the form is working as expected.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Constant Contact Forms] plugin worked until changing password at constant contact](https://wordpress.org/support/topic/plugin-worked-until-changing-password-at-constant-contact/)
 *  Thread Starter [timothyf](https://wordpress.org/support/users/timothyf/)
 * (@timothyf)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/plugin-worked-until-changing-password-at-constant-contact/#post-17208705)
 * I disconnected the plugin from CC and followed the steps on [https://knowledgebase.constantcontact.com/email-digital-marketing/articles/KnowledgeBase/10054-WordPress-Integration-with-Constant-Contact?lang=en_US](https://knowledgebase.constantcontact.com/email-digital-marketing/articles/KnowledgeBase/10054-WordPress-Integration-with-Constant-Contact?lang=en_US)
 * The plugin says that it is connected, but I still get the message that “Constant
   Contact Forms has experienced issues that may need addressed and functionality
   may be missing. …”
 * Additional log entries:
 * [2023-11-17T01:13:03.882845+00:00] Error: .INFO: Invalid state or auth code! [][]
   [
   2023-11-17T01:13:03.920187+00:00] Error: .INFO: Invalid state or auth code! [][][
   2023-11-17T01:13:04.117118+00:00] Error: .INFO: Invalid state or auth code! [][][
   2023-11-17T01:13:55.523199+00:00] Error: .INFO: Invalid state or auth code! [][][
   2023-11-17T01:13:55.540823+00:00] Error: .INFO: Invalid state or auth code! [][][
   2023-11-17T01:14:02.661127+00:00] Error: .INFO: Invalid state or auth code! [][][
   2023-11-17T01:14:03.366949+00:00] Refresh Token:.INFO: Old Refresh Token: ***[][][
   2023-11-17T01:14:03.367794+00:00] Access Token:.INFO: Old Access Token: *** [][][
   2023-11-17T01:14:03.372318+00:00] Refresh Token:.INFO: Refresh token successfully
   received [] [][2023-11-17T01:14:03.372570+00:00] Refresh Token:.INFO: New Refresh
   Token: YgupicJj**\* [] [] [2023-11-17T01:14:03.372727+00:00] Access Token:.INFO:
   New Access Token: eyJraWQi*** [] [][2023-11-17T01:14:03.372877+00:00] Expires
   in:.INFO: Expiry: 86400 [] [][2023-11-17T01:14:04.110216+00:00] Refresh Token:.
   INFO: Refresh token triggered [] [][2023-11-17T01:14:04.527845+00:00] Refresh
   Token:.INFO: Old Refresh Token: YgupicJj**\* [] [] [2023-11-17T01:14:04.528011
   +00:00] Access Token:.INFO: Old Access Token: eyJraWQi*** [] [][2023-11-17T01:
   14:04.531427+00:00] Refresh Token:.INFO: Refresh token successfully received [][][
   2023-11-17T01:14:04.531576+00:00] Refresh Token:.INFO: New Refresh Token: KLM9KqC9**\*[][][
   2023-11-17T01:14:04.531653+00:00] Access Token:.INFO: New Access Token: eyJraWQi***[][][
   2023-11-17T01:14:04.531728+00:00] Expires in:.INFO: Expiry: 86400 [] []
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Yoast SEO - Advanced SEO with real-time guidance and built-in AI] Open Graph Tags, article:publisher content is a Facebook Profile Page URL](https://wordpress.org/support/topic/open-graph-tags-articlepublisher-content-is-a-facebook-profile-page-url/)
 *  [timothyf](https://wordpress.org/support/users/timothyf/)
 * (@timothyf)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/open-graph-tags-articlepublisher-content-is-a-facebook-profile-page-url/#post-11066259)
 * I’m running into the same issue–please provide details on how you fixed it.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Notification - Custom Notifications and Alerts for WordPress] Schedule for sending notifications](https://wordpress.org/support/topic/schedule-for-sending-notifications/)
 *  Thread Starter [timothyf](https://wordpress.org/support/users/timothyf/)
 * (@timothyf)
 * [8 years ago](https://wordpress.org/support/topic/schedule-for-sending-notifications/#post-10530969)
 * My client purchased a license for Scheduled Triggers along with support. I submitted
   a support ticket at bracketspace.com to request the snippet of code.
 * Thank you!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Notification - Custom Notifications and Alerts for WordPress] Schedule for sending notifications](https://wordpress.org/support/topic/schedule-for-sending-notifications/)
 *  Thread Starter [timothyf](https://wordpress.org/support/users/timothyf/)
 * (@timothyf)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/schedule-for-sending-notifications/#post-10445672)
 * That’s exactly how I would want it to work! Step 1 is to buy the Scheduled Triggers
   extension. Step 2: Create the custom snippet. Step 3: Hire you to write the snippet
   if I can’t figure it out. Approximately how much would Step 3 cost, if required?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Popups - WordPress Popup] Box Position: Centered not working](https://wordpress.org/support/topic/box-position-centered-not-working/)
 *  Thread Starter [timothyf](https://wordpress.org/support/users/timothyf/)
 * (@timothyf)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/box-position-centered-not-working/#post-10426797)
 * Ok, it looks like the issue is with my site. When I tried the same popup on a
   slightly out-of-date clone of the site, Centered worked as expected. I have some
   investigating to do on my part.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Email Before Download] Titles break at commas](https://wordpress.org/support/topic/titles-break-at-commas/)
 *  Thread Starter [timothyf](https://wordpress.org/support/users/timothyf/)
 * (@timothyf)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/titles-break-at-commas/#post-10234006)
 * In the old version, I could use commas in the titles and have them appear properly
   in a list of multiple downloads. My recollection is that I used commas to separate
   the document numbers there, too.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Email Before Download] Download titles are lower case in email](https://wordpress.org/support/topic/download-titles-are-lower-case-in-email/)
 *  Thread Starter [timothyf](https://wordpress.org/support/users/timothyf/)
 * (@timothyf)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/download-titles-are-lower-case-in-email/#post-10234001)
 * Wonderful!
 * Thanks,
    Tim
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Email Before Download] Output of the [file_urls]](https://wordpress.org/support/topic/output-of-the-file_urls/)
 *  Thread Starter [timothyf](https://wordpress.org/support/users/timothyf/)
 * (@timothyf)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/output-of-the-file_urls/#post-10234000)
 * Great! I look forward to this reimplemented in the next release.
 * Thanks,
    Tim
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ad Inserter - Ad Manager & AdSense Ads] Insert single ad from PHP generated list](https://wordpress.org/support/topic/insert-single-ad-from-php-generated-list/)
 *  Thread Starter [timothyf](https://wordpress.org/support/users/timothyf/)
 * (@timothyf)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/insert-single-ad-from-php-generated-list/#post-9309852)
 * Perfect! Checking a constant works great, and it was definitely easier than a
   cookie. Thank you so much for adding the |count| functionality, explaining how
   the calls work, and then suggesting a constant. I appreciate your helpfulness.
 * Tim
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ad Inserter - Ad Manager & AdSense Ads] Insert single ad from PHP generated list](https://wordpress.org/support/topic/insert-single-ad-from-php-generated-list/)
 *  Thread Starter [timothyf](https://wordpress.org/support/users/timothyf/)
 * (@timothyf)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/insert-single-ad-from-php-generated-list/#post-9306847)
 * Ah, thanks for explaining that each insertion point calls the function in the
   AI code block–that was a point that I had misunderstood.
 * To return a consistent order for all AI calls, my first thought is setting a 
   cookie in functions.php with the randomized order and then using the AI code 
   block to pull the data from the cookie. Do you have any suggestions for a technique
   that would work better?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ad Inserter - Ad Manager & AdSense Ads] Insert single ad from PHP generated list](https://wordpress.org/support/topic/insert-single-ad-from-php-generated-list/)
 *  Thread Starter [timothyf](https://wordpress.org/support/users/timothyf/)
 * (@timothyf)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/insert-single-ad-from-php-generated-list/#post-9303440)
 * I’m continuing to have trouble with the |count| feature. It doesn’t work as expected
   when I randomize the ad order, which I need to do. This problem occurs a) when
   my query args includes ‘orderby’ => ‘rand’, b) when I run shuffle($the_query)
   after the query is made, or c) use a custom function to randomize the array order
   while creating a new array.
 * To double check that my code works outside Ad Inserter, I set up a shortcode 
   that I use in an Ad Inserter code block and on a separate page without Ad Inserter.
   For my query, I’m using a custom post type, selecting for ad position and meeting
   conditions for start date and end date. Here is my code:
 *     ```
       function ad_template(){
   
       $ad_date = date('Ymd');
       $return_string = '';
       $args = array(
       	'posts_per_page'	=> 3,
       	'orderby'          => 'rand',
       	'post_type'		=> 'aj-ads',
       	'meta_query'	=> array(
       		'relation'		=> 'AND',
       		array(
       			'key'		=> 'ad_position',
       			'value'		=> 'general',
       			'compare'	=> '='
       		),
       		array(
       			'key'		=> 'start_date',
       			'value'		=> $ad_date ,
       			'compare'	=> '<='
       		),
       		array(
       			'key'		=> 'stop_date',
       			'value'		=> $ad_date ,
       			'compare'	=> '>='
       		)
       	)
       );
   
       // query
       $the_query = get_posts( $args );
       $ad_counter = 1 ;
       foreach( $the_query as $the_post ) {
       	$postid = $the_post->ID ; 
       	$target = get_field('target_url', $postid); 
       	debug_to_console($ad_counter); // output counter to console
       	debug_to_console($postid);  // output associated postid to console
       	debug_to_console($target); // output associated target URL to console
       	$return_string .= '<div class="general-ad shortcode-ad ad-counter-' . $ad_counter .'"><a href="' . get_field('target_url', $postid) . '" target="_blank" class="href-counter-'. $ad_counter . '">' get_the_post_thumbnail($postid) . '</a></div>|count|'; }
       	$ad_counter ++ ;
       }
       wp_reset_query();	 // Restore global post data stomped by the_post(). 
       return $return_string;
       }
   
       add_shortcode( 'ad-query', 'ad_template' ); 
       ```
   
 * I’m testing with 3 ads.
 * – With no randomization: When orderby and shuffle and the custom shuffle function
   are all disabled, the query works perfectly with |count|–the ads appear in order
   as 1-2-3
 * – With randomization: When any one of orderby, shuffle, and the custom shuffle
   function is enabled, |count| does not work correctly. The first AI ad matches
   the first ad in the randomized array, but the second and third appear to be random
   and duplicates often appear. As the foreach goes through its cycles, the code
   sends the $postid and $target to console and I can see that my query has been
   randomized. The AI output on the page doesn’t match the console output.
 * Making this more confusing is that the classes using $ad_counter in the div wrapper
   and the a element are correct–they are consistently 1-2-3 even though the target_url
   and the post_thumbnail in the AI output don’t correspond to the $postid and $
   target that appear in the console. (The target_url and the post_thumbnail in 
   the AI output do come from the same post, although often not from the expected
   $postid.)
 * The shortcode is not working correctly in an Ad Inserter code block, but on the
   separate page, the shortcode always works fine with or without randomization–
   there’s never duplication and the console output matches the order visible on
   the page.
 * What else I’ve tried:
    – new WP_query instead of get_posts – echoing output instead
   of return $return_string – an additional div wrapper – outputting only the post_thumbnail
   with no div wrapper and no a element
 * I’ve tried to troubleshoot this to the best of my ability, and I’m stuck.
 * Thanks,
    Tim
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ad Inserter - Ad Manager & AdSense Ads] Insert single ad from PHP generated list](https://wordpress.org/support/topic/insert-single-ad-from-php-generated-list/)
 *  Thread Starter [timothyf](https://wordpress.org/support/users/timothyf/)
 * (@timothyf)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/insert-single-ad-from-php-generated-list/#post-9285334)
 * Thank you for adding support for ad counting! For what I see in my initial test,
   the |count| feature is working fine. My testing, however, showed that I have 
   an error in my code that I need to fix before I can be sure it works for me.
 * Thanks,
    Tim
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MailPoet Newsletters (Previous)] Removing button from TinyMCE editor](https://wordpress.org/support/topic/removing-button-from-tinymce-editor/)
 *  Thread Starter [timothyf](https://wordpress.org/support/users/timothyf/)
 * (@timothyf)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/removing-button-from-tinymce-editor/#post-7375697)
 * Perfect! Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MailPoet Newsletters (Previous)] Cron not working](https://wordpress.org/support/topic/cron-not-working-7/)
 *  Thread Starter [timothyf](https://wordpress.org/support/users/timothyf/)
 * (@timothyf)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/cron-not-working-7/#post-6554622)
 * When I click on the link beside “Enable MailPoet’s Cron,” I get this error:
 *     ```
       The connection has timed out
   
       The server at mysite2.org is taking too long to respond.
   
           The site could be temporarily unavailable or too busy. Try again in a few moments.
           If you are unable to load any pages, check your computer's network connection.
           If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
       ```
   
 * ———–
    When I set up a cron job using the same string, I get an email saying: `
   Could not open input file: /home/myusername/public_html/wordpress/wp-cron.php?
   19fa0a72e8c315aaaeb26c7e309640bd`
 * mysite2 is an add-on domain for my hosting plan. I’ve also tried using my primary
   domain with the complete path to wp-cron.php with the same reults. The other 
   cron jobs I’ve set up for mysite2.org are working as expected.
 * Thanks,
    Tim

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