Support » Plugin: WP Hotelier » Rooms shortcode and customization of rooms pages

  • Deb

    (@debhallett)


    I had already created pages for what equates as our “rooms”; we are calling them “villas”. The page I linked “that I need help with” currently is one of those pages.

    Is there a way to skip using the auto-generated default “rooms” pages? I just want a link to the Bookings page from each room, or an add to cart button from each room that takes you to the checkout. The auto-generated pages look awful with my 300×400 image all stretched out and pixellated, and there’s no padding or formatting. Is there a way to not use those auto-generated rooms pages, and use mine instead?

    I’m not sure what it’s supposed to do, I was hoping it would give me a “book it” button or something, to get to the checkout page. Right now the “villas” link attached has a room shortcode [hotelier_rooms ids=”the-porcupine-palace”] in a block below that “Book It!” button, which is invisible and doesn’t seem to work or show anything when the page is loaded. Possibly the ID is simply wrong? I can’t seem to figure out what my room’s ID is; I have tried using the slug, and I’ve tried using 1, which I had set as the item order. Currently, it’s the only room I’ve created.

    (I use Beaver Builder if that’s relevant, but doubt it matters?)

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author benitolopez

    (@benitolopez)

    Hello,

    You can disable the rooms archive with this code:

    
    define( 'HTL_DISABLE_ARCHIVE', true );
    

    Regarding the shortcode, the ID is the post ID number. Please check this link (it’s for posts, but it works in the same way):
    https://kinsta.com/blog/wordpress-get-post-id/

    Best,
    Benito

    Thread Starter Deb

    (@debhallett)

    I’ve realized I need to use the Ajax Booking Widget to accomplish part of this from the “villas” pages I created… And then just not link to the /rooms/ pages, I guess”?
    I think I saw settings to keep them from being listed by Google, at least.

    But part of my original question – is there a “customize” option for the room pages that I missed? Like how big to make the image, what colours, whether the content is fixed width or full, etc?)

    Thread Starter Deb

    (@debhallett)

    Thanks @benitolopez I didn’t realize it acted like a post or I’d probably have thought to look for that ID. lol

    Plugin Author benitolopez

    (@benitolopez)

    No, there isn’t. It must be styled by the theme (or by you). The size of the images is taken from this setting: https://lopezb.d.pr/sAPMMw

    But the size of the columns, padding, etc is from the CSS of your theme.

    WP Hotelier comes with minimum styles.

    Benito

    Thread Starter Deb

    (@debhallett)

    I think I’ll be uninstalling shortly, I’m just not coding savvy enough.

    Before I do, I’ll leave it for a little longer because I just wanted to show you this page, and point out that none of the sizes entered in those image Settings instruct my image to stretch to the full 1920 width of my screen like this does!
    The largest setting I have is the “Single room image” at 600×600. I would’ve thought “single room image” would be the one that should show up on the “single room page”…. no? That is definitely not 600×600 šŸ™ lol
    https://sopercreekwildernessvillas.com/rooms/the-porcupine-palace/

    Anyway… thanks for creating the free plugin, I’m sure if I was a programmer with some certificates, I could make it work. šŸ™‚ I’m off to find one that’s a bit more user-friendly/plug-and-play…. LOL

    Plugin Author benitolopez

    (@benitolopez)

    In this case the problem is that you need to modify the WP Hotelier template files to add the correct wrappers:
    https://github.com/wp-hotelier/wp-hotelier/blob/master/templates/global/wrapper-start.php
    https://github.com/wp-hotelier/wp-hotelier/blob/master/templates/global/wrapper-end.php

    The single room page is a single post type template. Not a normal page.
    There are thousand of themes out there, so the default template can’t work with every theme. For this reason there are those files you can override and define the correct wrappers to adapt your theme.

    This is a standard practice in the WordPress ecosystem.

    With a couple of tweaks, you can fix it. And anyway you see the wide image because the wrapper that contains it is 100%. Not because the setting is not working.

    You’ve probably never had a case like this before. But I assure you, this is normal. Anyway, if you don’t use one of the themes that support WP Hotelier, integration is a developer’s job, you’re right about that.

    So don’t worry if integration is difficult for you. One of this year’s goals is to add support for popular themes, to offer a plug and play solution.

    Benito

    Thread Starter Deb

    (@debhallett)

    Thank you for being so patient and helpful, @benitolopez
    I will muddle around and see if maybe I can “fix” it before I give up. I’m usually halfway decent at understanding what I’m being told or reading someone else’s coding/instructions, etc. It’s the figuring it out all on my own that doesn’t usually work out so well (imagine that! haha)…. Cross your fingers for me!

    Deb

    Plugin Author benitolopez

    (@benitolopez)

    You can check the source code of this theme to see how it should be integrated:
    https://github.com/wp-hotelier/manila

    Benito

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.