Forum Replies Created

Viewing 15 replies - 1 through 15 (of 56 total)
  • Would it be feasible to explain how to do it?

    I think using the .htaccess file to handle the redirections to subdomains is your best bet. The link I shared in my last reply explains .htaccess files better than I can here.

    As for a geolocation service, that isn’t something I can help with, sorry. How you’d set it up etc would likely change depending on the service but they should offer support on that front.

    Your hosting provider is also your best option in general for support on both .htaccess files and adding geolocation modules to your hosting setup, if it doesn’t already have one for just this kind of purpose.

    the subdomain gets repeated when i click on any page.

    This sounds like your redirection needs to be a little more nuanced and check for an existing subdomain (excluding www) etc. in the URL before adding a new one.

    Another option you could look into would be to leverage a WordPress plugin for managing redirections. This would come with the downside that WordPress has to load before a URL can be redirected the first time.

    Hi @vvvltv ??

    Specifically, when I use the Block Editor to preview a post that is in draft status, the system automatically saves the current draft.

    I know this might not help but this is the behaviour I’d expect.

    After looking into the code around previewing in the block editor, it does look like it is expected to save the draft post whenever previewing and there are unsaved changes.

    Has anyone encountered a similar situation or know how to resolve this problem?

    Unfortunately, I’m not aware of any setting or preference to change this behaviour.

    If you need to restore an earlier revision of your draft post, you can access the revisions via the block inspector sidebar on the editor’s right. Select the “Post” tab and beneath the details in the top panel, e.g. status, published etc., there’ll be a link for revisions.

    I hope that helps a little ??

    Thanks for the clarification @ohlookitsdany.

    My initial thoughts are you might find a plugin that already covers this sort of use case, saving you time and effort. There are quite a few plugins relating to navigation so it might be worth giving a couple a run before settling on a winner.

    If you want full control over the end result, or can’t find a suitable plugin, my earlier suggestions are probably good places to start.

    This isn’t something I have had to try and accomplish before. My understanding is that defining a renderAppender function that is passed to InnerBlocks will allow that default appender to be replaced. The catch with this though is it might only be possible for custom blocks.

    You can find some documentation on the renderAppender prop for InnerBlocks in this readme.

    This all suggests my tip that this approach could be difficult to achieve and maintain was correct.

    I wish you luck with whichever path forward you take. I’m not sure I can help much further as I’ve reached the end of my knowledge in this area ??

    Hi @zen047 ??

    Others might have better suggestions but two approaches come to mind.

    1. .htaccess – IP-based geolocation would be more efficient at the server level but would require a module such as GeoIP as .htaccess files alone wouldn’t be able to do the job. This would avoid having to load WordPress for every request only to redirect some of them.
    2. Geolocation Service API – Using a geolocation service, logic could be added to your theme’s function.php file to determine the request’s origin, and then redirect as required. This would come at quite a cost though.

    Personally, I’d only really consider #1 as an option.

    I hope that helps some!

    Hi @ohlookitsdany ??

    Could you expand a little more on whether it’s the Navigation block’s styling or its structure that you are least happy with? That info might help inform the best approach.

    I created a pattern that has everything laid out the way I’d like it. I’m just not sure how to set it to reveal on a button click

    Does this pattern include everything that is normally a part of the Navigation block, including hamburger button, links etc?

    If you have everything you need and are only looking for a means to toggle visibility using JS. You could write and enqueue your own script to handle that.

    An alternative option could be to create your own custom navigation block. It could then also leverage the interactivity API as the core Navigation block does to control opening and closing the navigation.

    So those “tabs” I see are just a menu that kinda looks tabby?

    That’s correct. They are styled in that fashion but redirect you to the appropriate page on click rather than hide/show tab content without leaving the page as proper tabs would do.

    I’ve tried some tab plugins, but I’ve been trying to place a carousel block within the tabs, and so far with the plugins I have tried it stops the carousel from working properly.

    Unfortunately, the best I can suggest here would be to reach out to the individual plugins’ support.

    Looking at the patterns library on www.ads-software.com, is it the same with the sort buttons at the top “all, featured, post…”? The sort buttons are just a navigation block?

    Yes, it appears so. When I inspect the page I can see those buttons are a navigation block using a custom block style called “Button List”, created by the theme. You can also see by clicking each button that the entire page refreshes as you navigate to a new URL.

    What would be the difference, pros and cons, of using the navigation block to create pseudo-tabs vs just a row with text, heading, or buttons, each linking to the URLs.

    In general, it’s best practice to create semantic HTML. In this case, if your collection of links and buttons are navigating a user to a new page, it would make sense for these links to belong under a <nav> element. Using the navigation block for such a scenario would provide benefits from accessibility to SEO.

    Just note this is in relation to a designated collection of navigation links rather than individual links that might be sprinkled throughout your content.

    Thanks for the clarification @vahan889.

    I don’t see a great difference between either location you’re looking at.

    You might be able to customize the DefaultBlockAppender or add a renderAppender function to a custom block that uses InnerBlocks. This all could be hard to achieve and difficult to maintain.

    As for adding an extra button, I still have the same UX concerns but ultimately that’s 100% your call. I’m afraid the best suggestion I have is to lean into the command palette.

    I’m glad you were able to sort it out.

    If you get the chance, it might be worth providing some feedback to AWS to help out others in the future ??

    Aaron Robertshaw

    (@aaronrobertshaw)

    Hi @mdarwin02 ??

    Which theme are you using? I’ve tested with several default WordPress themes such as TwentyTwentyFour and TwentyTwentyThree and the site editor loads ok for me.

    Try looking in the JavaScript Console to see what it says: https://developer.www.ads-software.com/advanced-administration/debug/debug-javascript/

    If errors are reported there, please show a screenshot or code block here.

    Aaron Robertshaw

    (@aaronrobertshaw)

    Hi @chrislm2004 ??

    It sounds like your current theme, or a plugin, is re-creating the widgets.

    You could try switching themes and seeing if the issue persists, or reaching out in your theme’s support forum.

    As for ruling out a plugin as the culprit, you could disable all plugins. If that resolves the issue, systematically re-enable the plugins, one at a time, to isolate which one is creating the widgets.

    My guess is your current theme may be enforcing some “standard” or “default” widgets.

    I hope that helps!

    Aaron Robertshaw

    (@aaronrobertshaw)

    If you are using a block theme, you might find this Learn WordPress resource on layouts helpful. It covers more advanced layout concepts but should help with center-aligning content too.

    Aaron Robertshaw

    (@aaronrobertshaw)

    Hi @vahan889 ??

    I’m not sure I’m 100% following what you are trying to achieve. Is your intention to add extra buttons alongside the existing block inserter? This sounds like it would be detrimental to the overall user experience.

    An alternative approach might be to leverage the editor’s command palette.

    Your users could then access functionality quickly by using a keyboard shortcut or clicking the centre of the document toolbar, to open the command palette. From there, recent commands will be available or a quick search will find the command.

    This post might help if you decide to go the custom command route.

    I hope that helps!

    Aaron Robertshaw

    (@aaronrobertshaw)

    Hi @awetz583 ??

    If I’m following what you are aiming for, I’d expect the edit function for the custom block to define the allowed formats on the RichText component as done in this example.

    Is the issue that the supported inner blocks, for your custom block, are core blocks?

    If so, the only idea I can think of would be to explore using the editor.BlockEdit filter which would allow some customization of a block’s edit component. You might be able to conditionally alter the block’s edit component to control allowed formats.

    Otherwise, is it possible to use?wp.richText.unregisterFormatType( 'core/image' )?for just our custom block but still have these formats available for other blocks?

    From the docs, that does appear to be an all-or-nothing approach to disabling format types.

    Aaron Robertshaw

    (@aaronrobertshaw)

    Hi @chadreilly ??

    I’m not aware of a core Tabs block and I couldn’t find any patterns that offer something similar.

    It might be worth noting that the tabs you mention on the “Learn more” page are a simple navigation element containing links. When clicking on each link or tab as they are styled, the page reloads as you navigate to a new URL.

    You could achieve something similar to this by creating separate pages for each tab and adding a navigation block to each page. I don’t think this is really the behaviour you’re looking for though.

    My recommendation would be to leverage a plugin specifically designed for the purpose. You can find Tabs related plugins here.

    A plugin should provide an easier and more manageable approach. It should also allow for the tabs to be navigated without requiring a page reload.

Viewing 15 replies - 1 through 15 (of 56 total)