Title: Shortcode Option
Last modified: November 17, 2024

---

# Shortcode Option

 *  [edwardjs](https://wordpress.org/support/users/edwardjs/)
 * (@edwardjs)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/shortcode-option-12/)
 * I would like an optional secondary text to be used for Poll question. I’d like
   to Display “Agree” instead of a long question where i am just gauging agreements
   to an article or statement. The Question would be used for the Archive page but
   i’d like an optonal text to overide the Question. Also, it could be a Shortcode
   Parameter which wold be GREAT!
 *  [democracy id=”1″ QText=”Agree or Disagree”]
    -  This topic was modified 1 year, 6 months ago by [edwardjs](https://wordpress.org/support/users/edwardjs/).
    -  This topic was modified 1 year, 6 months ago by [edwardjs](https://wordpress.org/support/users/edwardjs/).

Viewing 1 replies (of 1 total)

 *  Thread Starter [edwardjs](https://wordpress.org/support/users/edwardjs/)
 * (@edwardjs)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/shortcode-option-12/#post-18211535)
 * I Would like to share my solution that may be added in next version.
 *     ```wp-block-code
       // Added post_id filtering to DemocracyPoll Archive [ democracy-archives post_id="211" ]// output = Archive listing of all polls in selected post#.// modified get_dem_polls() function in theme-functions.php//...if( isset( $rg->post_id ) ){		$postID = $rg->post_id;  			// var created because unable to succesfully use %d in next line..		$WHERE['post_id'] = $wpdb->prepare('WHERE in_posts LIKE "%'. $postID .'%"', (int) $rg->post_id); //array(1,2,3,4,5));		//$WHERE['post_id'] = $wpdb->prepare('WHERE in_posts LIKE  "%\%d%"', (int) $rg->post_id); //array(1,2,3,4,5));}//ADD a post_id parm to the rg object// 'post_id'		 => null, // customization // Does a Text Search via WHERE LIKE// Improvement needed-> value search via SQL WHERE IN;//    needs correct syntax using an Array with,  %d variable substitution
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Shortcode Option’ is closed to new replies.

 * ![](https://ps.w.org/democracy-poll/assets/icon-256x256.png?rev=2832208)
 * [Democracy Poll](https://wordpress.org/plugins/democracy-poll/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/democracy-poll/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/democracy-poll/)
 * [Active Topics](https://wordpress.org/support/plugin/democracy-poll/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/democracy-poll/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/democracy-poll/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [edwardjs](https://wordpress.org/support/users/edwardjs/)
 * Last activity: [1 year, 5 months ago](https://wordpress.org/support/topic/shortcode-option-12/#post-18211535)
 * Status: not resolved