x

Accidentally deleted some code

I couldn't find a post similar to my issue so I've started a new one.

I was trying to edit my "read more" button to make it more prominent and I managed to delete the code and remove the button entirely from my blog. I did find some articles with the code customised but when I enter it and publish the site I just end up with the code written in text form instead of the read more button

I might just be inputting the code wrong but if someone could help me out with the code I need to get the button back that would be grand!

866 Views
Message 1 of 4
Report
1 Best Answer
Square

Best Answer

Thanks. That is CSS code, so it should only be in main.less or one of the other .less files.  It sounds like what you need is the HTML for the more-break.tpl partial file, which is this:

{{!
	The "read more" break that users can drag into the middle of their blog post content.
	This will only display in the blog post list. When clicked, the user will be taken
	to the full blog post.
}}
<div class="blog-read-more">
	<a href="{{url}}" class="blog-link">{{#stl}}templates.platform.theme.base.blog.more-break_1{{/stl}}</a>
</div>

View Best Answer >

844 Views
Message 5 of 4
Report
3 REPLIES 3
Square

What code are you trying to use, and where within your custom theme are you entering it @emmanovella?

858 Views
Message 5 of 4
Report

Hi Adam,

I was using this code:

.blog-post .blog-read-more {
background: #fff; /* Changes the color of the button's background */
width: 200px; /* Changes the button's width */
text-align: center; /* Changes the button's text alignment */
}

.blog-post .blog-read-more a {
color: #90cacb; /* Changes the color of the button's text */
display:block;
padding: 13px 0px;
float: right
}

.blog-post .blog-read-more a:hover {
color: #000; /* Changes the color of the button's text when it is hovered */
background: #fff; /* Changes the color of the button's background color when it is hovered */
float: center
}

and placing it under Partials - blog - modules, in the more-break.tpl section. I have also attempted to place it in the "main.less" section.

Thanks

846 Views
Message 5 of 4
Report
Square

Best Answer

Thanks. That is CSS code, so it should only be in main.less or one of the other .less files.  It sounds like what you need is the HTML for the more-break.tpl partial file, which is this:

{{!
	The "read more" break that users can drag into the middle of their blog post content.
	This will only display in the blog post list. When clicked, the user will be taken
	to the full blog post.
}}
<div class="blog-read-more">
	<a href="{{url}}" class="blog-link">{{#stl}}templates.platform.theme.base.blog.more-break_1{{/stl}}</a>
</div>
845 Views
Message 5 of 4
Report
This thread has been archived and locked. Please start a new thread if you would like to continue the conversation.