Hi @nithushan
Yes, I’d be delighted to help you customize the page break style in a single post in WordPress. There are a few different ways to add a page break to a post in WordPress, but one of the most common methods is to use the <!–nextpage–> tag. When you include this tag in the content of a post, it indicates that the content following the tag should be displayed on the next page when the post is viewed.
To customize the styling of the page break in a single post, you can create a custom CSS class and apply it to the <!–nextpage–> tag. Here’s an example of how you can do this:
1. In your WordPress theme’s style.css file, add a new class for the page break (e.g. .page-break). Here’s an example of some basic CSS that you could use to style the page break:
.page-break {
background-color: #eee;
padding: 10px;
margin-top: 10px;
margin-bottom: 10px;
}
2. Add the class to the <!–nextpage–> tag in your post. You can do this by using the the_content filter to add the class to the tag. You can add this code snippet in your functions.php file.
function add_page_break_class( $content ) {
return str_replace( '<!--nextpage-->', '<!--nextpage class="page-break"-->', $content );
}
add_filter( 'the_content', 'add_page_break_class' );
3. Now, every time you use the <!–nextpage–> tag, it will automatically pick up this class and style. However, it’s important to note that you need to have some basic understanding of HTML, CSS, and PHP in order to follow the above steps.
If you have any questions or if there’s anything else I can help you with, please don’t hesitate to let me know.
Thread Starter
Nvsh
(@nithushan)
You may close this ticket and open another ticket for the new issue. Thank you
Thread Starter
Nvsh
(@nithushan)
Yes.That the style I mention previous. Can you please help me over here.
Thread Starter
Nvsh
(@nithushan)
I already open another ticket