Add a font awsome icon into php code - php

I'm using WordPress CMS to develop my website. I need to put a font awesome icon before a heading. See below snapshot for placement.
This is the current php code:
if(empty($search_label)) {
$search_label = 'Search Inventory';}
I'm a beginner to PHP so, I appreciate if anyone has a solution to do this easily.
Thank you!

First of all, include font awesome CSS file in the header.
and then
if(empty($search_label)) {
$search_label = '<i class="fa fa-search"></i>Search Inventory';}

Related

Joomla Module that shows article intro image, article title and alternative text of intro images as h2

I'm trying to build a module for Joomla! that I want to use as an header before the article that contains:
artile title (as h1)
a background as the article image intro
the alternative text of the intro image (as h2)
I've tryed building the module starting from the "hello world" module here and I'm editing this to my needs.
Now, I don't know how I can edit it to let it show what I need.
I've started from the background image creating this code in the default.php file without success.
<?php
// No direct access
defined('_JEXEC') or die; ?>
<div class="bg_header_article" style="background-image: url("/<?php echo htmlspecialchars($images->image_intro); ?>");"></div>
Any suggestion will be very usefull.
Thanks in advance.
Depending on the version and framework you're using, this can be accomplished out of the box.
What version of Joomla are you using?
Gantry makes this easy, as you can have many module positions over the mainbody (article) position.

Jquery Image slider showing thumbnails on bullets hover

Is there any responsive jQuery plugin for displaying image slider and also showing thumbnails on bullets hover.
Tried LayerSlider plugin but the whole image was not visible.
Please help
Thanks in advance
There are a couple that come to mind wowslider or sliderrevolution.I think both should fit this need for you.
see this url you will get some idea http://codepen.io/zuraizm/pen/vGDHl its working good enter code here http://codepen.io/zuraizm/pen/vGDHl
There doesnt seem to be much cloice if your against LayerSlider
you could implement one yourself with something like this with the hover function instead ?
var mainImage = $("#mainImage");
$(".img-container img").hover(function(){
var src = $(this).attr("src");
$("#mainImage").attr("src",src);
});
mainImage.on("click",function(){
$(this).css("transform","scale(2)");
});

Setting Background color in wordpress for bizway theme

I have a static website and I want to set the background color for the whole website to black,am using wordpress on windows azure,i have tried searching but no solution that could help me.
Any one who has a suggestion
the link to the site : http://hairimpressions.azurewebsites.net/
Thanks in advince
Remove background-color from .header-container, .footer_bottom, and .slider-wrapper-container.
You can set background color black, and remove all background which you have given to others classes
.header-container,
.slider-wrapper-container,
.footer-wrapper,
.footer_bottom { background:none;}

adding image in footer in drupal 7

I am new to Drupal.I am using marinelli theam.I created one block and placed in footer section with some text.In Drupal 7 how to add an image in a block located in footer section..I tried using Full HTML and filtered HTML Text format.It was not added image.
Make sure the path to the image is correct.
1- Enable "PHP Filter" module, in Drupal Core modules.
2- inside the block content, make sure that the text format is "PHP code" and then type the following code:
global $base_path;
print "<img alth='' src='" . $base_path . "PATH_TO_IMAGE/image.jpg' />";
Hope this works... Muhammad.
You can directly use a wysiwyg editor and use insert picture any where you want. I prefer CKEditor.
What you can do is go to edit mode of your block. Then add image link using the following formatt:
<img src="../sites/all/themes/marinelli /images/[your imagename and extension]">
If you haven't got through, I hope this helps.

Wordpress - I want to add a <div></div> with a Plugin

I'm trying to learn wordpress and php.
Basically, I want the
function draw_ad() {
echo "IMAGE CODE INSIDE A DIV";
// echoing an image inside a div -- StackOverflow does not allow me to post img tags : )
}
add_action('the_content', 'display_ad');
===
Basically, I want to add a picture and be able to manipulate the "left" and "top" css options... but with a plugin. So it will be like a strange picture that covers whatever the area on the screen that I want it to cover :P.
Yes, it is kind of sloppy, but that's what I was asked to do : P.
The add_action('the_content', 'display_ad') kind of does it, but it removes the whole content.
Is there a better way to do this?
Is there a way to tell the wordpress PLUGIN to add this , say, before the theme's header, and not content? (As in, be able to put this thing wherever you want to in the html body tags?
Thank you, guys!
From theme developing I am sure you can add code to the header and at the end of the body tag. (wp-header, wp-footer)
The best thing is to insert the picture tag at the end of the body and style it with position:fixed;. You don't need a div around the img tag.

Categories