picture on header

Ask questions about FlatPress themes, present your themes, request new themes.
Post Reply
rube2112
Posts: 5
Joined: Sat Feb 13, 2021 6:05 pm

picture on header

Post by rube2112 » Sat Feb 13, 2021 6:16 pm

Can someone guide me as to how to put a small picture on the header in leggero v2? Thanks....Robb

User avatar
franah
Posts: 36
Joined: Wed Aug 14, 2019 11:50 pm
Location: Spain
Contact:

Re: picture on header

Post by franah » Wed Feb 17, 2021 7:07 pm

Yes, here: viewtopic.php?f=2&t=110

It is made for leggero v1 theme, but it also works for v2

User avatar
virtualsky
Posts: 11
Joined: Thu Mar 11, 2021 4:50 am
Location: Saskatchewan, Canada
Contact:

Re: picture on header

Post by virtualsky » Thu Mar 11, 2021 2:51 pm

I was able to put an image in my Leggero 2 theme by editing the header.tpl file, found under fp-interface > themes > leggero folder.

I added this to the block of code (shown below): <p><img src="movie-vault-header.png" align="right"></p>

Code: Select all

<body>
	<div id="body-container">

		<div id="head">
		    <p><img src="movie-vault-header.png" align="right"></p>
			<h1><a href="{$smarty.const.BLOG_BASEURL}">{$flatpress.title}</a></h1>
			<p class="subtitle">{$flatpress.subtitle}</p>
		</div> <!-- end of #head -->
	
	<div id="outer-container">
And this resulted in:

Image

Put the image file in the root folder of your webspace. Hope this helps.

User avatar
Arvid
FlatPress Coder
Posts: 194
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: picture on header

Post by Arvid » Sat Mar 20, 2021 8:11 pm

virtualsky wrote: ↑Thu Mar 11, 2021 2:51 pm I added this to the block of code (shown below): <p><img src="movie-vault-header.png" align="right"></p>
I would store the image within the theme folder, e.g. fp-interface/themes/leggero/imgs as franah suggested, and change the path in the img tag accordingly. Doing so, the image is integrated part of the theme (think about sharing your theme or creating a backup).

All the best,
Arvid

User avatar
virtualsky
Posts: 11
Joined: Thu Mar 11, 2021 4:50 am
Location: Saskatchewan, Canada
Contact:

Re: picture on header

Post by virtualsky » Sat Mar 20, 2021 9:51 pm

A good idea. I was just pleased that I figured out how to put the image there in the first place! :lol:

User avatar
Arvid
FlatPress Coder
Posts: 194
Joined: Sat Jan 26, 2019 7:40 pm
Contact:

Re: picture on header

Post by Arvid » Sun Mar 21, 2021 10:21 am

A good feeling indeed :) I started my FlatPress journey with the same steps :)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest