February 18, 2020 at 12:27 PM #28357
February 18, 2020 at 12:53 PM #28359Stephen SherrardKeymaster
Did you get this figured out?
I went to your site and on the page you linked to, it said no matching calendar found, which means that you didn’t specify a valid calendar — as stated in the documentation:
You MUST specify a calendar to display with the calendar argument. You can use either the numerical ID, or the title, of the calendar you want to display. For example, if you created a calendar that you titled “Main Volunteer Calendar”, the shortcode should look like the following:
[pta-calendar calendar=”Main Volunteer Calendar”]
But, I clicked on your Volunteer link in your main menu, and the View & Signup link for one of those took me to the calendar, which was showing your events, so the calendar is working just fine. Note also that any Calendars you create are actually a custom post type, so you can link directly to those posts (or put in in your menu) to display the calendar. You don’t need to use the shortcode.
February 27, 2020 at 7:34 AM #28459
I did not realize that you had responded or that I needed to subscribe to get alerts to a question I wrote. Sorry
The calendar I created is called “Snack Bar”. The shortcodes I tried are [pta-calendar calendar=”snack bar”] and [pta-calendar calendar=”snack-bar”]. Shouldn’t this work by the definition of the shortcode.
You mention in the last paragraph that I don’t need a shortcode. My goal is to display this calendar on the homepage of my website. How can I best accomplish this?
I have combed through your documentation and if the answer is there, I am not understanding it. Thank you.
- This reply was modified 5 months, 1 week ago by Dawn Moseke.
February 27, 2020 at 8:20 AM #28462Stephen SherrardKeymaster
I visited the page again, and the “no matching calendar” message is gone, meaning you have the shortcode correct.
In order for the js and css files to load, my plugin needs to be able to detect that the shortcode is present in the page content. I’m following the correct programming standards of only outputting js and css on pages where they are needed, instead of globally loading those on your entire site (which causes bloat/slowdown and can conflict with other plugins).
Looking at the HTML on that page, it appears you may be using some kind of page builder to design your pages. Some of those present the content to WordPress a bit differently, and thus when my plugin uses the WordPress function that checks if the content contains a certain shortcode, it returns a false value since the page builder is altering the content in its own way.
If you are using some kind of page builder or block editor for your home page, try using a RAW HTML block to add the shortcode to a section, and see if that helps. You can also try creating another test page somewhere else on your site without using your page builder (use the classic editor) and try the shortcode there. If you then see it on that page, then at least you know it’s something with the page builder you’re using that’s most likely causing the shortcode to not get detected properly.
The other possibility would be if your home page is not really a “page” or “post” that you can see in the list of pages on your admin side. If your theme is doing something unique for the home page, then my plugin won’t find the shortcode in the content if that page is not something that’s saved in the regular wp_posts table.
If you want me to look into this further, you would need to email me privately with temporary admin level access so I can take a closer look at how your home page is setup.
Also, regarding notifications, you need to check the box “Notify me of follw-up replies via email” before you click on the Submit button, or you can also later click on the “Subscribe” text link next to the breadcrumbs display under the thread title to subscribe to the whole thread.
February 27, 2020 at 10:59 AM #28468
Thank you Stephen. I was using an element that says it was HTML friendly, but I was able to modify it a bit and now it works. Thank you for your help 🙂
- You must be logged in to reply to this topic.