Page 1 of 1

Custom HTML in every txt

Posted: Tue Aug 10, 2021 1:07 am
by Powerack
Hello,

I tried to find suitable place where to put my custom styled borders. I want to include in every newly created page / post index.txt file, but for now I'm doing styling manually.

Code I need include:

Code: Select all

<div class="box orange verydarkbg bsh">
	<div class="boxcontent mid lblue">
		<!-- SOME 
		CONTENT 
		ON 
		THE 
		PAGE -->
	</div>
</div>
I using my style.css for almost every project I ever did (WP sites, pure HTML pages) and just edit few bits in it for that projects. I also overwriting bootstrap classes and ignoring that "stupid thing" by using my own.

I don't want restyle ALL pages since I have other plans with it, just newly created. So where I put that few lines of code to work it properly? If you ever visit my web, you understand better my styling. It's bit complicated just to write what exactly I need.

Thanks for fast responses :-)

Re: Custom HTML in every txt

Posted: Tue Aug 10, 2021 11:25 am
by Edi
Powerack wrote: Tue Aug 10, 2021 1:07 am

Code: Select all

<div class="box orange verydarkbg bsh">
	<div class="boxcontent mid lblue">
		<!-- SOME 
		CONTENT 
		ON 
		THE 
		PAGE -->
	</div>
</div>
Does this include the whole content (page or post) or just a part of it?

Re: Custom HTML in every txt

Posted: Wed Aug 11, 2021 6:26 pm
by Powerack
In static pages no, I framed just parts of content (highlight text), but in posts I like to frame everything except header with these two pairs of <DIV> tag.

Example: http://prntscr.com/1mx7c7s Orange border, light blue text, align to center - all specified in CSS, just as you may recognize from code above. I styling static pages differently and manually, so this is really for posts.

Re: Custom HTML in every txt

Posted: Fri Aug 13, 2021 12:26 pm
by Edi
You can add the code to the the template home.php and add a template for posts or add if conditions with the code to the template page.php.