Title: Display button only
Last modified: August 20, 2016

---

# Display button only

 *  [anilreddy0102](https://wordpress.org/support/users/anilreddy0102/)
 * (@anilreddy0102)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/display-button-only/)
 * I want to display only the schedule an appointment button. Currently a calender
   is displayed below that button which I don’t want. Once the user clicks the button
   there is popup calender which is enough for me. Please tell me how to remove 
   the calender below the button
 * [http://wordpress.org/extend/plugins/appointment-calendar/](http://wordpress.org/extend/plugins/appointment-calendar/)

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

 *  Plugin Contributor [FARAZFRANK](https://wordpress.org/support/users/farazfrank/)
 * (@farazfrank)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/display-button-only/#post-3325577)
 * Hi **Anilreddy0102**,
 * **Here the instruction:**
 * Just find div `<div id='calendar'>` in `appointment-calendar-shortcode.php` file,
   available in plugin directory.
 * Change (remove id attribute from div tag)
    `<div id='calendar'>` To `<div>`
 * We will add a new button Short-Code in next release.
 * Thanks & Happy New year.
    –**Frank**
 *  [adch](https://wordpress.org/support/users/adch/)
 * (@adch)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/display-button-only/#post-3325734)
 * Hi Frank,
 * Can you help me into this: i wabt to display into a page only the button and 
   only the calendar into another.
    Thanks
 *  Plugin Contributor [FARAZFRANK](https://wordpress.org/support/users/farazfrank/)
 * (@farazfrank)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/display-button-only/#post-3325735)
 * Hi Adch,
 * For this you need to do some logical programming in short code file.
 * **Something Like This:**
 *     ```
       If(PageId == 1) {
          ...
          // Show only button on this page
          // comment out calendar div code
          ...
       }
   
       If(PageId == 2) {
          ...
          // Show only calendar on this page
          // comment out button HTML code
          ...
       }
       ```
   
 * [1] Create 2 pages and add short-code [APCAL]
 * **Assuming**
    Page Name – Id ————– Page1 – 43 Page2 – 45 ————–
 * [2] File where to code: **`appointment-calendar-shortcode.php`**
 * [3] Modify code and add conditional logic (line no 633 to 649)
 *     ```
       <?php
       // get page id
       if(isset($_GET['page_id'])) {
           $PageID = $_GET['page_id'];
       }
   
       if($PageID == 43) {
       ?>
       <!---Add New Appointment Button--->
       <div id="bkbtndiv" align="center" style="padding:5px;">
           <button name="addappointment" class="apcal_btn apcal_btn-primary" type="submit" id="addappointment">
               <i class="icon-calendar icon-white"></i> <?php
               if($AllCalendarSettings['booking_button_text'])
                   echo $AllCalendarSettings['booking_button_text'];
               else echo _e("Schedule New Appointment", "appointzilla");
           ?>
           </button>
       </div>
       <?php }
       if($PageID == 45) {?>
       <!---Show appointment calendar--->
       <div id='calendar'>
           <div align="right">Appointment Calendar Powered By: <a href="http://appointzilla.com/" title="Appointment Scheduling plugin for WordPress" target="_blank">AppointZilla</a></div>
           <!---AppSecondModal For Schedule New Appointment--->
           <div id="AppSecondModalDiv" style="display:none;"></div>
       </div>
       <?php } ?>
       ```
   
 * And you done.
    Let me know if all works fine. (**Note:** Please make sure plugin
   deactivated before doing editing in code if your site is live. )
 * Best Regards
    Frank
 *  [adch](https://wordpress.org/support/users/adch/)
 * (@adch)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/display-button-only/#post-3325736)
 * hi Frank,
    i have already done something like your solution, but just hiding 
   the ‘id=calendar’. My code: $pageID = get_the_ID(); if ($pageID == 401) echo “
   <div>”; else echo “<div id=’calendar’>”;?>
 * It is working.
 * A point not so important because i use the above solution, but a question:
    ….
   before that i tried a way with AJAX (hide/show the <div id=’calendar’>, but when
   i hit the ‘show’ button displays only the table with the arrows and the button“
   Today” and not the calendar. If then click an arrow or the “Today” btn, it displays
   the calendar. Where is the error?
 * Thanks in advance
 *  Plugin Contributor [FARAZFRANK](https://wordpress.org/support/users/farazfrank/)
 * (@farazfrank)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/display-button-only/#post-3325737)
 * Hi Adch,
 * May be possible you are not activating modal dialog window, that’s why only inner
   HTML of modal window code appearing only.
 *  [adch](https://wordpress.org/support/users/adch/)
 * (@adch)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/display-button-only/#post-3325738)
 * Frank really thankyou for your quick replies.
    The modal dialog window i will
   check it later.
 * But just now figured that your plugin conflict with my theme [Bretheon](http://themes.muffingroup.com/bretheon/).
   
   To be more spesific actually it conflicts with the css (ex. i have a background
   image and when your plugin is enabled it hides the background image). Do you 
   know to tell me what to check?
 * Thanks in advance
 *  [adch](https://wordpress.org/support/users/adch/)
 * (@adch)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/display-button-only/#post-3325739)
 * I suppose jquery conflict?
 *  [adch](https://wordpress.org/support/users/adch/)
 * (@adch)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/display-button-only/#post-3325740)
 * when i enable the plugin i get this notice “The plugin generated 3 characters
   of unexpected output during activation. If you notice “headers already sent” 
   messages, problems with syndication feeds or other issues, try deactivating or
   removing this plugin.”
 * Is there any solution?
 * thanks anyway
 *  [adch](https://wordpress.org/support/users/adch/)
 * (@adch)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/display-button-only/#post-3325741)
 * Also i have a big problem with my Media library when i try to insert an image
   into a post via “add Media” button….it doesn’t display the uploaded images and
   i can’t upload a new one!!
 *  Plugin Contributor [FARAZFRANK](https://wordpress.org/support/users/farazfrank/)
 * (@farazfrank)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/display-button-only/#post-3325743)
 * But plugin loads all JS & and CSS files only on Appointment Calendar specified
   pages.
 * So, there should no chance to JS conflicts or break other WordPress functionality.
 * Deactivate plugin and try to upload media files.
 * If any problem then, let me know.
 * Thanks
    Frank
 *  [adch](https://wordpress.org/support/users/adch/)
 * (@adch)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/display-button-only/#post-3325744)
 * I understand what you say, but unfortunately it conflicts and i don’t know what
   to do actually.
    If disable the plugin everything works fine.
 * In addition with those error i wrote in my earlier reply, also the favicon.ico
   doesn’t work….strange…too strange!
    I don’t know, maybe my theme has problems…
   i try to check it again and i’ll write back!
 * Thanks anyway
 *  [adch](https://wordpress.org/support/users/adch/)
 * (@adch)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/display-button-only/#post-3325745)
 * also when i activate the plugin i get this error:
    “The plugin generated 3 characters
   of unexpected output during activation. If you notice “headers already sent” 
   messages, problems with syndication feeds or other issues, try deactivating or
   removing this plugin.”
 * I don’t have any idea what it says
 *  Plugin Contributor [FARAZFRANK](https://wordpress.org/support/users/farazfrank/)
 * (@farazfrank)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/display-button-only/#post-3325746)
 * Hi,
 * Could you please send/share all error snaps?
 * And list the plugin you are using with Appointment Calendar.
 * Thanks
    Frank

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

The topic ‘Display button only’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/appointment-calendar.svg)
 * [Appointment Calendar](https://wordpress.org/plugins/appointment-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/appointment-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/appointment-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/appointment-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/appointment-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/appointment-calendar/reviews/)

 * 13 replies
 * 3 participants
 * Last reply from: [FARAZFRANK](https://wordpress.org/support/users/farazfrank/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/display-button-only/#post-3325746)
 * Status: not resolved