how to add field on admin panel for adding custom html code in wordpress?

how i can add a field in wordpress for adding custom html from backend

like i add

Read More
    <div class="test">
<h4>Who will solve this Question?</h4>
</div>

this html code from that field like Textarea field

& already have declared css for test class & test h4
like

.test .h4{
font-weight:bold;
}

so result on front end would be displayed as

Who will solve this Question?

Related posts

Leave a Reply

3 comments

  1. @Alex Nevsky you are right.

    @Imagine you can add your code by many ways

    1)Open from Admin Panel -> Appearance -> Widgets

    And from installed widgets area drag and drop “text” plugin into where ever you want(ie,Widget area you want).Then enter your code

    <div class="test">
    <h4>Who will solve this Question?</h4>
    </div>

    in that.
    And add style attributes

    .test .h4
    {
         font-weight:bold;
    }
    

    in style.css file

    2)If you want to add specific code in your header or footer.Then this will help you

    Install “header and footer” plugin.Under Settings one more option “header or footer” appears .Click that and add your code.