- This topic has 13 replies, 3 voices, and was last updated 1 year, 7 months ago by
David.
-
AuthorPosts
-
January 6, 2021 at 4:06 am #1607767
Sourabh
Hi,
Refer image snap and a URL in the private section and guide how to make this section within a post ??
Regds:
January 6, 2021 at 6:05 am #1607865David
StaffCustomer SupportHi there,
you would add the HTML to your post using a HTML Widget.
You won’t require these two lines:<!DOCTYPE html> <!-- Created By CodingNepal -->
The CSS you can add to a Hook Element >
wp_head
and set the Display Rules to the places you want it applied.
The CSS has to be wrapped in these tags:<style> /* Add the CSS here */ </style>
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 6, 2021 at 10:25 am #1608360Sourabh
OKay i will try and update you..
January 6, 2021 at 10:39 am #1608377David
StaffCustomer SupportYou’re welcome
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 6, 2021 at 11:31 am #1608457Sourabh
Hi David, Seems I am making some mistake, refer the steps I am following –
Hook Created – WP_head – CSS with style tag – Display rules set to blog.
Now inserting HTML widget and pasting HTML code, however when I see a preview – then I see Code executing and getting code output, however, it’s an article so want to share code, etc so don’t need execution for myself.
I also don’t get any border around code etc, and code copy buttons, etc…overall guide me again and correct my steps.
refer preview url in P-Section.
January 6, 2021 at 12:37 pm #1608511David
StaffCustomer SupportIf you simply want to display the code in the article, then use a Code Block, any code you paste within will be formatted for users to copy.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 6, 2021 at 10:52 pm #1608905Sourabh
Okay.. and where should I find this code block ?
January 6, 2021 at 11:14 pm #1608916Elvin
StaffCustomer SupportHi,
Okay.. and where should I find this code block ?
Code block is one of Gutenberg Editor’s core blocks.
https://share.getcloudapp.com/nOuD2QOEThis article explains it briefly.
https://www.pair.com/support/kb/gutenberg-editor-formatting-code-in-wordpress-posts/A wise man once said:
"Have you cleared your cache?"January 7, 2021 at 3:04 am #1609107Sourabh
No, I tested it in a sample post but it’s not looking as I am trying to achieve.
Refer P-Section, how it’s looking (It’s merely adding a background, nothing else, no copy button, no border nothing).
however, what I am trying to achieve is already shared in P-section.
January 7, 2021 at 3:57 am #1609178David
StaffCustomer SupportThe core code block doesn’t have a copy function. There are some plugins that add a button or theres this one which just makes the block copied on click:
https://wordpress.org/plugins/code-click-to-copy/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 7, 2021 at 6:20 am #1609393Sourabh
Tried and getting the copy button too, not the look, anyways leave it then – just last question how that man has done this in his website ???
January 7, 2021 at 6:48 am #1609424David
StaffCustomer SupportI don’t they may have custom coded that or used a plugin like this:
https://wordpress.org/plugins/copy-the-code/Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 7, 2021 at 6:53 am #1609623Sourabh
Okay, Ignore then, Thanks a ton for your efforts…
January 7, 2021 at 7:39 am #1609688David
StaffCustomer SupportYou’re welcome
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.