Sohan Patel
Sohan Patel

Reputation: 369

How to add custom div (+php) code to wordpress site

I am very new to wordpress. But have good knowledge in php, html, css and javascript.

I want to add custom font-resizer to my wordpress site. as shown below for example.

My theme image

What would be the best and non-messy way to add the plugin code to my website.

I have looked at some tutorials online but it seems that I can't getting those. Any help would be appreciated. thank you..

Upvotes: 1

Views: 935

Answers (1)

madison
madison

Reputation: 93

If you're trying to add that plugin specifically to your site, then its documentation suggests:

  • adding it through a widget that the plugin creates
  • or using this bit of code wherever you want in whichever template file: <?php if(function_exists('fontResizer_place')) { fontResizer_place(); } ?>

Does your theme have a place for widgets in its header? If not, you'll want to just place that bit of PHP somewhere in your header.php file.

Upvotes: 0

Related Questions