• I am testing an appointment page and do the following:

    —————————
    Blah blah blah stuff here introducing the calendar, providing instructions, and all that…

    [APCAL]
    —————————

    The result is that the booking calendar is FIRST on the page and my text comes after it. I need to have this instructional text ABOVE the calendar, not below it! I may be able to force the issue using DIVs, but it seems to me that the plugin should leave text exactly where I place it.

    http://wordpress.org/extend/plugins/appointment-calendar/

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Contributor FARAZFRANK

    (@farazfrank)

    Hi RandyKing,

    Here the instruction:

    1. Open file appointment-calendar-shortcode.php, file path = wp-content\plugins\appointment-calendar

    2. Search comment (around line no. 647)

    <!----- Add New Appointment Button -------->


    3.
    Make a div before it, like:

    <div id="mycustomtext">
       Blah blah blah stuff here
       Introducing the calendar
       Provide instructions
    </div>
    
    <!----- Add New Appointment Button -------->

    Thanks, you done.
    -Frank Faraz

    bailey88

    (@bailey88)

    Making a div before the calender to include content/text will fix the positioning problem, but still doesn’t really help if the shortcode is used in the middle of a page.

    The problem occurs because the shortcode function is using ‘echo’, rather than ‘return’. Here is a fix which will position the calender exactly in the corrct position by ‘returning’ the whole function at the end.

    Open appointment-calendar-shortcode.php, near the top of the page (around line 5) is the function ‘appointment_calendar_shortcode()’. Paste the code in bold shown below at the very start of the function.

    `function appointment_calendar_shortcode()

    { ob_start();

    Now go to the very bottom of the page and find the closing bracket for the function (//end of short code function). Paste the code shown below in bold just BEFORE the closing bracket.

    $apcalpositionfix = ob_get_clean();
    return $apcalpositionfix;

    Save the changes and upload the file to your FTP. Refresh the page and the calender should be in the correct position.

    Plugin Contributor FARAZFRANK

    (@farazfrank)

    Hi Bailey88,

    Thanks for your kind support.

    Frank

    Bailey88, no matter what I do your code is not working.

    Is it possible an update broke it?

    Plugin Contributor FARAZFRANK

    (@farazfrank)

    Hi MasterK,

    What problems are you facing Text vs. Calendar postion?

    Let me know to help you.

    Thanks
    Frank

    I want to put text above the calendar and I tried to follow what Bailey88 wrote but it broke the page and I got only a blank screen. So for now I have used your method of editing appointment-calendar-shortcode.php however that will be lost by plugin updates to I prefer to find a solution that will not be lost.

    Other than this issue I love the plugin.

    Plugin Contributor FARAZFRANK

    (@farazfrank)

    Hi MasterK,

    Soon we will add an option to display customizable text above the calendar, I added that option in my to-do list. Many user required this option.

    But at now you can follow these instruction to achieve this.

    Thanks & Have Fun
    Frank

    Greetings.

    I utilized the amendments to the .php file for this plugin and it seems to have shut down my entire site with an error sign. I was wondering how I can restore it? I literally cannot access the backend to my site at all.

    Remove the plugin folder via ftp. That will get your site back.

    Then when doing PHP edit’s I suggest you use a PHP editor or a program like Dreamweaver that checks your code for problems as you work. That way if you miss a comma, semi-colon or anything that would break your code it sill show you that before you upload.

    Thank you so very much.

    I greatly appreciate you.

    Plugin Author a.ankit

    (@aankit)

    @comm3dieu

    It is a good practice to deactivate the plugin before editing its code.

    In case there is some syntax error in the code, wordpress will not activate the plugin.

    -Ankit

    I used the ob_start coding from bailey88. It was the only coding that worked to truly embed the calendar in the body of my site. But now something is happening where not only is the calendar not embedded in my site but I am now seeing two calendars. I didn’t even change the code and this is the result after not having dealt with the calendar for a couple of days. Was there an update or something that would result in that problem? And how can I ensure that the calendar is permanently embedded in the body of my site so that I don’t have to worry about the ugly look of the calendar being stretched out over the entire top of the site?

    Hi i want to put the appointment calender on the sidebar how do i do that?

    Hi i want to put the appointment calender on the sidebar how do i do that?

    Plugin Contributor FARAZFRANK

    (@farazfrank)

    Hi Ctg,

    Best way to add a link-button in text-widget and redirect through on booking page. Many of Appointment Calendar users using this technique.

    Here button code:

    <a href="# your booking page url here #" class="mybutton">BOOK ONLINE</a>
    <style>
    	a.mybutton {
    		background-color:#0044CC;
    		font-size:14px;
    		color:#FFF;
    		text-decoration:none;
    		display:block;
    		width:100px;
    		padding:10px;
    		font-weight:bolder;
    		text-align:center;
    		font-family:"Times New Roman", Times, serif;
    		border-radius:5px;
    	}
    	a.mybutton:hover {
    		color:#1982D1;
    		border-color:#3278BE;
    		text-decoration:none;
    		font-weight:bolder;
    	}
    </style>

    Greetings
    ~Frank

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Position of Text vs. Calendar on Page’ is closed to new replies.