Advertisement
Guest User

Untitled

a guest
May 7th, 2012
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. function faq_start_shortcode( $atts, $content = null ) {
  2. return '<div id="accordion">';
  3. }
  4.  
  5. function faq_question_shortcode( $atts, $content = null ) {
  6. return '<div class="accordionButton">' . $content . '</div>';
  7. }
  8.  
  9. function faq_answer_shortcode( $atts, $content = null ) {
  10. return '<div class="accordionContent">' . $content . '</div>';
  11. }
  12.  
  13. function faq_end_shortcode( $atts, $content = null ) {
  14. return '</div>';
  15. }
  16.  
  17. if ( is_single() || is_page() ) {
  18. add_shortcode('faqstart', 'faq_start_shortcode');
  19. add_shortcode('question', 'faq_question_shortcode');
  20. add_shortcode('answer', 'faq_answer_shortcode');
  21. add_shortcode('faqend', 'faq_end_shortcode');
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement