Support » Plugin: Read More Without Refresh » Using the Plugin with WP Blocks

  • Resolved Drachsi

    (@drachsi)


    I have a large page that I would like to divide into 2 parts. The page uses blocks. How can I use the code to make this happen. No instructions on the new WP Blocks.

    Regards
    Drachsi

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author George Gkouvousis

    (@gkouvousisg)

    Blocks has nothing to do with my plugin.
    If you use it on a Gutenberg block, it will work just fine, since its 100% compatible with it.

    Hi,

    Thanks for your quick reply.
    Do I create a html Block and part of the code and another Block at the end. Yes I am talking about the Gutenberg blocks.

    I have a page with 12 Blocks, some are images, headlines and text. Not certain if I can put Blocks inside a Block.

    How would you deal with my problem?

    Regards
    Drachsi

    Plugin Author George Gkouvousis

    (@gkouvousisg)

    Generally speaking, shortcode of RMWR will work inside a block or outside a block just fine. Neither its aware if you are using blocks, nor it cares.

    It should work just fine – but not as an HTML code – you need to apply the shortcode and shortcodes work in plain mode of editors, when it comes to WordPress.

    Alternatively, if your HTML block allows PHP aswell, I would use do_shortcode ( https://developer.wordpress.org/reference/functions/do_shortcode/ ) in order to show it up.

    @drachsi Hi, I think I might understand what you’re asking. At the beginning of the content you’d like to hide, place a shortcode block with just [read more]. At the end of the content you’d like to hide (at the end of your page for example), put another shortcode block with the other half of the function [/read]. This way, everything you’d like to hide is sandwiched between the two shortcode blocks.

    Plugin Author George Gkouvousis

    (@gkouvousisg)

    Correct, but it might still cause issues if the inside code is a combination of single and double quotes aswell.

    Let him try it šŸ™‚ Wrost case scenario, he can apply a PHP snippet using another plugin ie. https://el.wordpress.org/plugins/insert-php/ that is compatible with Gutenberg.

    Hi,

    Thanks for the feed back. I tried what gryphonmane suggested and it did not work.

    I have used both “Code” and “Shortcode” blocks.

    You can see the problem at https://www.northampton-business-directory.com/northampton-history/

    Above “Old Northampton” is the code in a code block, the end is about the Copyright.

    I would like to hide that section so that visitors decide if they want to read.
    about the early days of Northampton.

    Appreciate your time and support.
    Regards
    Drachsi

    Plugin Author George Gkouvousis

    (@gkouvousisg)

    I strongly advise you to include a PHP snippet in your page and use RMWR using do_shortcode function of WordPress core.

    I cant be more specific since it falls completely outside the scope of supporting bugs here, but it wont be hard.

    Hi,

    I think this is out of my league. I am heading towards 80. Maybe it would be easier to create the last half as a second page with a link from the first part.

    Looked like the Plugin would would help me, but being non technical php etc gives me problems.

    Regards
    Drachsi

    Hi,

    Pity there are no instructions how to use this Plugin with Gutenberg blocks. I have tried a number of possibilities and it does not work.

    Regards
    Drachsi

    Plugin Author George Gkouvousis

    (@gkouvousisg)

    Hi.

    Once again: If you use it on a Gutenberg block, it will work just fine, since its 100% compatible with it.

    What you are asking here is an advanced guidance on a custom scenario that happens on your website, which Im afraid its outside the scope of my plugin, so I cannot support.

    Thanks for your understanding. Im pretty sure that other users will be able to share their experience with Gutenberg blocks, which is pretty positive.

    Hi, Thanks for your feed back, but a normal page with about 10 paragraph blocks should work. Do I put the first part of the code in the first block and the last part in the last block, or use the code blocks?

    Do you have a working example?

    thanks in advance
    Drachsi

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Using the Plugin with WP Blocks’ is closed to new replies.