Title: cncup's Replies | WordPress.org

---

# cncup

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

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

 Search replies:

## Forum Replies Created

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

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager] Works in functions.php but not in a snippet – execution time?](https://wordpress.org/support/topic/works-in-functions-php-but-not-in-a-snippet-execution-time/)
 *  Thread Starter [cncup](https://wordpress.org/support/users/cncup/)
 * (@cncup)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/works-in-functions-php-but-not-in-a-snippet-execution-time/#post-17286144)
 * Thanks Mircea. Lucky you explained or I wouldn’t have known why my homepage check
   isn’t working. I resorted to using php’s $_SERVER and a check against the site
   url. It works.
 * Thanks for the references too. Much appreciated.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager] Works in functions.php but not in a snippet – execution time?](https://wordpress.org/support/topic/works-in-functions-php-but-not-in-a-snippet-execution-time/)
 *  Thread Starter [cncup](https://wordpress.org/support/users/cncup/)
 * (@cncup)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/works-in-functions-php-but-not-in-a-snippet-execution-time/#post-17285920)
 * Hi Mircea,
 * Thank you for the reply.
 * Yes it works in “Run Everywhere” when I also remove the condition “Type of page
   is Homepage”. Initially when setting the condition, the plugin changes the location
   automatically to “Frontend Conditional Logic”. It allows to change it back to“
   Run Everywhere” while the condition is still on, but apparently treats it underneath
   as “Frontend Conditional Logic”, hence the filter code doesn’t work as long as
   the condition is there.
 * I can do without the condition and check in the code if it’s homepage, no problem.
   Just to know in general, is there a way to have the condition and also “Run Everywhere”?
   Not what is shown as saved but underneath truly.
 * Thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP24 Domain Check] Link to marketplace + the use-case of “Transfer”](https://wordpress.org/support/topic/link-to-marketplace-the-use-case-of-transfer/)
 *  Thread Starter [cncup](https://wordpress.org/support/users/cncup/)
 * (@cncup)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/link-to-marketplace-the-use-case-of-transfer/#post-17274941)
 * Turns out the ‘text’ value already holds the whois record. I thought it was holding
   the link text. Apologies for not checking before.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP24 Domain Check] Link to marketplace + the use-case of “Transfer”](https://wordpress.org/support/topic/link-to-marketplace-the-use-case-of-transfer/)
 *  Thread Starter [cncup](https://wordpress.org/support/users/cncup/)
 * (@cncup)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/link-to-marketplace-the-use-case-of-transfer/#post-17266336)
 * It helps. Much appreciated.
 * So I guess I can make use of the _wp24\_domaincheck\_whois\_result_ hook to check
   the result domains against a marketplace API and show links accordingly. As you
   say it might be a lengthy operation in case of multiple marketplaces.
 * I haven’t tried the hook yet – I see in the doc page that the array keys correspond
   nicely to the output: domain, tld, status, text, price, link.
   If the array was
   holding also data from the whois record it would allow handling the results in
   creative ways.Keys like:– registrar– nameservers– creation/expiration datesFor
   example when a domain is registered at a registrar I’m affiliated with, I could
   show “Registered at [registrar]” and link to a relevant page at that registrar.
   Even name and email that are normally hidden in the whois can come in handy in
   some cases/TLDs.And, in case the fetching of whois data might burden the search
   operation, there could be a setting like ‘Enable whois data in hook’ that is 
   false by default.
 * Would it be possible to make it a feature request? I can open a separate thread
   if needed.
 * Thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP24 Domain Check] Link to marketplace + the use-case of “Transfer”](https://wordpress.org/support/topic/link-to-marketplace-the-use-case-of-transfer/)
 *  Thread Starter [cncup](https://wordpress.org/support/users/cncup/)
 * (@cncup)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/link-to-marketplace-the-use-case-of-transfer/#post-17264713)
 * No answer?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPForms - Easy Form Builder for WordPress - Contact Forms, Payment Forms, Surveys, & More] Sort checkboxes by given order](https://wordpress.org/support/topic/sort-checkboxes-by-given-order/)
 *  Thread Starter [cncup](https://wordpress.org/support/users/cncup/)
 * (@cncup)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/sort-checkboxes-by-given-order/#post-16912511)
 * Thanks Ralden.
 * I can understand why this is outside the scope for support. It’s a bit involved
   and specific to one’s case.
 * For future reference, I solved it with _wpforms\_field\_properties_ filter. The
   sorting is prepared in an array beforehand without involving the form.
 *     ```wp-block-code
       add_filter( 'wpforms_field_properties', function( $properties, $field, $form_data ) {
       	// Only process for the relevant form and field. Change these values to match your form and field id's.
       	if ( !( absint( $form_data[ 'id' ] ) === 2032 && absint( $field[ 'id' ] ) === 8 ) )
       		return $properties;
   
       	$items = [ 999=>"Peach", 200=>"Apple", 535=>"Cherry" ]; // This is created dynamically per the order logic.
   
       	$items_count = count( $items );
   
       	// Set items' keys and values to checkboxes.
       	if ( $items_count === count( $properties['inputs'] ) ) { // Make sure the inputs count matches the items'.
       		for ( $i = 0; $i < $items_count; $i++ ) {
       			$ids = array_keys( $items );
       			$properties[ 'inputs' ][ $i ][ 'label' ][ 'text' ] = $items[ $ids[ $i ] ];
       			$properties[ 'inputs' ][ $i ][ 'attr' ][ 'value' ] = $ids[ $i ]; // Array keys are checkbox values.
       		}
       	}
   
       	return $properties;
       }, 10, 3 );
       ```
   
 * You’d still need to set the _$args[ ‘include’ ]_ in the _wpforms\_dynamic\_choice\
   _post\_type\_args_ filter as shown in the OP, not for the specific values but
   for the count. If you need it dynamic.
 * You can print out the _$properties_ object to see its structure:
 *     ```wp-block-code
       echo "<pre>" . print_r( $properties, true ) . "</pre>";
       ```
   
 * I hope this comes in handy for someone.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Bulk Media Register] How to disable ‘results sent via email’?](https://wordpress.org/support/topic/how-to-disable-results-sent-via-email/)
 *  Thread Starter [cncup](https://wordpress.org/support/users/cncup/)
 * (@cncup)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/how-to-disable-results-sent-via-email/#post-16878240)
 * Hi, I see a setting was added in the new update. Thanks for the quick response.
   Appreciated!
 *   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] How to include URLs with parameters in the sitemap?](https://wordpress.org/support/topic/how-to-include-urls-with-parameters-in-the-sitemap/)
 *  Thread Starter [cncup](https://wordpress.org/support/users/cncup/)
 * (@cncup)
 * [3 years ago](https://wordpress.org/support/topic/how-to-include-urls-with-parameters-in-the-sitemap/#post-16834279)
 * Custom, external, same thing. The doc you linked says in the comment above the
   code “Writes additional/**custom** XML sitemap”.
 * And I’m ahead of this example, it uses hard coded values. The link I provided
   shows a way to get the values dynamically, and the question was about that.
 * So I infer from the A being two steps behind the Q and the ongoing lack of a 
   direct reply that there is no simpler way.
 * The issue can be closed.
 * All the best
 *   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] How to include URLs with parameters in the sitemap?](https://wordpress.org/support/topic/how-to-include-urls-with-parameters-in-the-sitemap/)
 *  Thread Starter [cncup](https://wordpress.org/support/users/cncup/)
 * (@cncup)
 * [3 years ago](https://wordpress.org/support/topic/how-to-include-urls-with-parameters-in-the-sitemap/#post-16830968)
 * It seems I’m not getting through for the second time. The question is NOT about
   canonical.
 * It’s about adding custom sitemap, dynamically.
 * For future reference, what I tried with the link I provided earlier worked. Credit
   and thanks to leepowers on GitHub.
 * Still would be nice to **know if there is a simpler way** to do it.
 * Third time’s the charm?
 *   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] How to include URLs with parameters in the sitemap?](https://wordpress.org/support/topic/how-to-include-urls-with-parameters-in-the-sitemap/)
 *  Thread Starter [cncup](https://wordpress.org/support/users/cncup/)
 * (@cncup)
 * [3 years ago](https://wordpress.org/support/topic/how-to-include-urls-with-parameters-in-the-sitemap/#post-16822294)
 * Hi [@maybellyne](https://wordpress.org/support/users/maybellyne/).
 * Thank you for your reply.
 * Yes, this is why I mentioned the wpseo_canonical filter. I’m changing the canonical,
   so the canonical for a parameterized URL is itself.
   (removing ‘garbage’ params
   to avoid duplicates)
 * I came across the wpseo_sitemap_index filter. The implementation is a bit involved
   if I want the sitemap-addition to be all the way dynamic. There is [this code on github](https://gist.github.com/leepowers/946d9c72e06779acbb2a125e5b53f475)
   that I will try to modify to my needs. But that would be the way to go, right?
 * Or is there a simpler way?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager] How to work with global php variables](https://wordpress.org/support/topic/how-to-work-with-global-php-variables/)
 *  Thread Starter [cncup](https://wordpress.org/support/users/cncup/)
 * (@cncup)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/how-to-work-with-global-php-variables/#post-16721495)
 * Oh I see now. The variable has to be defined as global **also outside the function**.
   Which was probably what you meant I suppose.
 * So simply adding the global definition before the assignment:
 *     ```wp-block-code
       global $some_var;
       $some_var = 'one';
   
       function shortcode_func() {
       	global $some_var;
       	...
       }
       ```
   
 * And it works.
 * Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPCode - Insert Headers and Footers + Custom Code Snippets - WordPress Code Manager] How to work with global php variables](https://wordpress.org/support/topic/how-to-work-with-global-php-variables/)
 *  Thread Starter [cncup](https://wordpress.org/support/users/cncup/)
 * (@cncup)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/how-to-work-with-global-php-variables/#post-16721427)
 * All that I did. The variable is defined as global in the first snippet. I played
   exhaustively with the Priority field. It changed nothing.
 * Please note the example I gave here is of one snippet. The global variable doesn’t
   work even in the context of one snippet alone.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Pods - Custom Content Types and Fields] ‘List View with reordering’ has cap limit ??](https://wordpress.org/support/topic/list-view-with-reordering-has-cap-limit/)
 *  Thread Starter [cncup](https://wordpress.org/support/users/cncup/)
 * (@cncup)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/list-view-with-reordering-has-cap-limit/#post-16635368)
 * Thanks. I created a bug report.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Pods - Custom Content Types and Fields] ‘List View with reordering’ has cap limit ??](https://wordpress.org/support/topic/list-view-with-reordering-has-cap-limit/)
 *  Thread Starter [cncup](https://wordpress.org/support/users/cncup/)
 * (@cncup)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/list-view-with-reordering-has-cap-limit/#post-16628825)
 * If anyone can chime in, would be swell.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Pods - Custom Content Types and Fields] ‘List View with reordering’ has cap limit ??](https://wordpress.org/support/topic/list-view-with-reordering-has-cap-limit/)
 *  Thread Starter [cncup](https://wordpress.org/support/users/cncup/)
 * (@cncup)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/list-view-with-reordering-has-cap-limit/#post-16601163)
 * Just to clarify I’m referring to the drop down part of the list view. Items selected
   before the limit is reached continue to show after the limit is reached. But 
   the drop down is now empty, so you can’t add to the selection.
 * It’s a rather strange behavior that seems more like a bug than by-design.

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

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