Title: Conditional tags
Last modified: August 30, 2016

---

# Conditional tags

 *  [admazy](https://wordpress.org/support/users/admazy/)
 * (@admazy)
 * [11 years ago](https://wordpress.org/support/topic/conditional-tags-18/)
 * hello,
 * Can you please help me with conditional tags for question category pages?
 * I have 3 categories and for each page i want to run js script that will attach
   special var (cat id) to url. It will be used to set default related category 
   when people will click on ask button (.ap-btn-ask):
 * <script type=’text/javascript’>
 *  $(document).ready(function(){
    $(‘a.ap-btn-ask’).attr(‘href’, ‘\/questions\/
   ask\/?cat=13’); });
 * </script>
 * or maybe you know easy way how to grab category id?
 * Thanks for a good plugin!
 * [https://wordpress.org/plugins/categories-for-anspress/](https://wordpress.org/plugins/categories-for-anspress/)

 The topic ‘Conditional tags’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/categories-for-anspress_f0479a.svg)
 * [Categories for AnsPress](https://wordpress.org/plugins/categories-for-anspress/)
 * [Support Threads](https://wordpress.org/support/plugin/categories-for-anspress/)
 * [Active Topics](https://wordpress.org/support/plugin/categories-for-anspress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/categories-for-anspress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/categories-for-anspress/reviews/)

## Tags

 * [conditional tags](https://wordpress.org/support/topic-tag/conditional-tags/)

 * 0 replies
 * 1 participant
 * Last reply from: [admazy](https://wordpress.org/support/users/admazy/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/conditional-tags-18/)
 * Status: not resolved