- This topic has 20 replies, 4 voices, and was last updated 2 years ago by Fernando.
-
AuthorPosts
-
March 29, 2022 at 2:07 am #2170793robchanoi
I’d like to place a container just after the intro of a post.
I complete posts in classic editor as i prefer in one long format, not creating individual containers for paragrahs, images etc. Posts are then put in a container in Gblocks.
Tried creating a new container below, adding an html block or code block and pasting text not visual of post, but it is not accepting the code properly.
Wanted to duplicate post below, delete relevant info and place new container in between with smth.
If I duplicate existing container with post inside, it places it in the same container and it can’t locate a position to place a new container within the post.
Hopefully u know what i’m trying to say.
Post also ranks 1 in G and don’t want to upset seo.
Thanks if u can advise.March 29, 2022 at 3:23 am #2170866DavidStaffCustomer SupportHi there,
so when you have a post that has been published – is it saved in the Block Editor or the Classic Editor ?
March 29, 2022 at 4:47 am #2170969robchanoiEither – I switch between the two.
March 29, 2022 at 5:06 am #2170989DavidStaffCustomer SupportI am a little unclear on the entire workflow. But if you swtich between Classic and Block editor, and in between add or make edits in HTML then you’re going to run into problems.
One thing in your OT:
Posts are then put in a container in Gblocks.
What is this Container for ? As if all your content is moved inside one – then any block you add below that block needs to be moved inside it if you want to move it within the content.
March 29, 2022 at 5:15 am #2171002robchanoiI put the post in a container to set the width and position.
If I add a container inside the post, it starts at the bottom, then when I click the up arrow it shoots all the way to the top. There’s no way to position where that container can go in the post.March 29, 2022 at 6:26 am #2171068DavidStaffCustomer SupportSo the content inside this Container – is that all inside a Classic Editor block ?
March 29, 2022 at 7:22 am #2171128robchanoiYes, the classic editor block I drag into a container as advised in a previous topic.
March 29, 2022 at 7:47 am #2171146DavidStaffCustomer SupportYeah, theres no way to put a block inside a classic block, you have to convert the classic blocks into individual blocks to do that.
March 29, 2022 at 8:46 am #2171410robchanoiyup, which is why i am trying to split the post up but when i copy and paste text into either custom html or code block it doesn’t paste the code properly – do u know of a way of doing this?
March 29, 2022 at 9:21 am #2171452DavidStaffCustomer SupportThe simplest solution is to convert it all to blocks.
Otherwise you will need to split your Classic Editor Block content into multiple Classic Editor Blocks. Then you can add other blocks in between themMarch 29, 2022 at 10:48 am #2171529robchanoiConverting a long article with multiple images and designs is not a simple procedure converting to blocks – it’s a lengthy one which is why I prefer classic editor from the beginning, but again, on your latter point – that is what I am trying to do David. What do you paste the post html into if html and code blocks don’t work?
March 29, 2022 at 8:55 pm #2171851ElvinStaffCustomer SupportHi robchanoi,
To add to the conversation:
WordPress automatically attempts to convert contents added through classic editor into blocks.
While it’s not a perfect conversion, paragraphs and images are usually fine. Designed from custom HTML generally gets carried over as well (converted into custom HTML blocks) but it’s a hit or miss. But at least, the automatic conversion should do the bulk of the task.
What do you paste the post html into if html and code blocks don’t work?
Not sure if I understand this correctly but if you meant to ask “where do I put HTML codes if the conversion to blocks don’t work?”, you can place the code within a Custom HTML block – https://share.getcloudapp.com/mXuY1Dj4
Let us know if this isn’t the case. 🙂
March 29, 2022 at 10:49 pm #2171896robchanoiNot sure if I understand this correctly but if you meant to ask “where do I put HTML codes if the conversion to blocks don’t work?”, you can place the code within a Custom HTML block –
By html I meant custom html as I wrote again further down:
when i copy and paste text into either custom html or code block it doesn’t paste the code properly
March 29, 2022 at 11:09 pm #2171905Fernando Customer SupportHi Robchanoi,
To have a better understanding of the issue, may you provide a copy of the HTML code you’re trying to add, and we’ll try to test it from our end.
Hope to hear from you soon. 🙂
March 29, 2022 at 11:17 pm #2171907ElvinStaffCustomer SupportAh right yeah I missed that one.
Custom HTML block is meant to display the HTML it contains as is.
Can you share a specific example of this occurrence? (a screen recording and/or screenshot)
Or perhaps have a staging site clone and let us have temporary backend access to check things? You can use the private information text field to provide the details – https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
For the actual goal:
Going forward, I’d suggest sticking to just 1 editor (ideally go with Gutenberg) as switching between 2 editors can cause problems as David mentioned.
A compromise would be to work within the Block editor but use Classic block on some parts – https://share.getcloudapp.com/nOuRlLXo
As for placing a container specifically after the intro of the post, you can do this manually purely w/ Block Editor through setting it up like this:
first GB Container block { > Intro } Second GB Container Block { > the content to be added after the intro } third GB container block { > the rest of the contents }
But if I may suggest, If the “Intro > Container” is a recurring pattern/theme for each post, you may want to consider templating this.
Consider, having the Intro value be typed-in on a custom field for each post and then add the Intro element dynamically for each post through a GP Block Element.
And then, if the container right after the intro is a patterned/themed dynamic value as well, you can make set a custom field for that too and display it through a hooked GP Block Element as well.
-
AuthorPosts
- You must be logged in to reply to this topic.