4
Contributors
9
Replies
25
Views
3 Years
Discussion Span
Last Post by anestistsoukalis
0

Anestis you provided a site to copy that who ever developed it should rethink remaking it from the scratch (for example just see the overuse of ‘dns-prefetch’). So your question is what is position fixed in css ? … and how this have to do with PHP ?

Edited by jkon

0

We are confused by your question because to put an image above/on top of a menu bar, you simply use the <img/> element and some appropriate styling.

I don't think this is what you are asking because the answer is too basic.

So please clarify what you need help with, provide your sample code too.

0

I need to do it with php . Not css or html. Is it possible ? Because in wordpress it only gives me php files

0

I'm confused... php files allow you to include HTML. even if you can only work within the <?php ?> block, you could always echo() your html elements...

echo "<img />";
0

ok so what is the code to do this? i want to place an image on top of my menu. An use css for position fixed ... but as you said inside <?php ?> tags :-)

1

So I'm not into Wordpress, but pzuurveen brings up a good point, why not use a widget, or is that what you are doing to insert the image?

ok so what is the code to do this? i want to place an image on top of my menu. An use css for position fixed ... but as you said inside <?php ?> tags :-)

In PHP to add HTML to the page, if you do it from within the PHP block would be something like this..

<?php
  echo "<img src='https://www.google.com/images/srpr/logo4w.png' alt='logo' style='position:absolute;top:50px;left:50px;width:140px;height:50px' />";
?> 
0

If you insist to code it yourself i recommend you create a childtheme
That way if you update the parent-theme, your changes remain.
You need to change alle files like sidebar.php, sidebar-main.php.
If, at a later date, you want to change the image, you have to edit all the same files again.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.