Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   [SOLVED] Where to put Advertise Code (http://forum.bytesforall.com/showthread.php?t=20470)

cainechapman Jun 8, 2013 02:50 PM

[SOLVED] Where to put Advertise Code
 
Hello all;
I've signed up for InfoLinks and Chitika, and they've both given me code and I was wondering where I should input that code in the "Montezuma Options" editor?

Thanks.

jerryc Jun 8, 2013 07:22 PM

Try making a sidebar and putting the code there. Remember, with MZ, sidebars can also go in headers and footers.

cainechapman Jun 9, 2013 04:13 AM

And how would I go about creating sidebars? And in what CSS file would I put that in?
And again, for the advertisement code, which CSS file do I put it in, and where in that file (the end, the middle, etc.)?

CrouchingBruin Jun 9, 2013 09:05 AM

The Montezuma theme already comes with one sidebar defined, called Widget Area ONE. On your web site, it should be displaying along the right side, with a section called Categories, a section called Archives and another section called Links, etc. You can use this sidebar as a test before you dive into creating new/other sidebars.

From your Dashboard, click on Appearance > Widgets.

On the right, you will see an area for Widget Area ONE.

In the middle, you'll see a section called Available Widgets.

Drag a Text widget from Available Widgets over to Widget Area ONE and place it where you want it to appear on your sidebar. A Text widget will allow you paste in arbitrary HTML. Paste in your advertising code in the big field and click the blue Save button. Your advertisement should now appear on your sidebar.

With most advertising code, you usually don't have to monkey around with the CSS files unless there's special formatting you want done.

cainechapman Jun 9, 2013 09:57 AM

Thanks for the reply.

I found that help (putting a text widget in the sidebar and putting in the code) but it doesn't work. There's nothing at all on the sidebar.

In the email I got from InfoLinks, it says add the code and "Please copy and paste the following script code into your website HTML pages right before the closing </BODY> HTML tag."

So where in the Montezuma editing process can I put that code in?

jerryc Jun 9, 2013 06:33 PM

What's the code you want to insert? It should go into a sidebar, unless it has more PHP than what's allowed in the limited php code. If that's the case, you might need a php widget. There are several.

CrouchingBruin Jun 9, 2013 06:59 PM

If it's JavaScript that has <script> ... </script> tags surrounding it, you can also put it at the very bottom of your footer.php option page. It should execute from there, and it will be as close as you can pretty much get to the closing </body> tag.

cainechapman Jun 10, 2013 04:28 AM

Okay so I went to Montezuma Options > Sub Template > footer.php and put the code right before the last </div>, and still nothing shows up on any page.

The code is :
<script type="text/javascript">
var infolink_pid = 1739021;
var infolink_wsid = 0;
</script>
<script type="text/javascript" src="http://resources.infolinks.com/js/infolinks_main.js"></script>

When I put it into any text, it doesn't appear.

Thanks again guys.

jerryc Jun 10, 2013 05:08 AM

It should work.

1. Try reloading the page and see if it shows up.

2. Try switching to the twenty 12 theme and see if it works. If not, the problem is with something other than MZ.

juggledad Jun 10, 2013 05:52 AM

Ignore the following, it was added too early in the morning after a bad night sleep before coffee:o
That won't work because that is not listed in the 'limited php code'

Add a new sidebar (should be called a widget area) to the footer. Add a text widget to it and put your code in the text widget. You may also have to install the plugin 'exec php'

jerryc Jun 10, 2013 06:09 AM

Quote:

Originally Posted by juggledad (Post 101411)
That won't work because that is not listed in the 'limited php code'

Add a new sidebar (should be called a widget area) to the footer. Add a text widget to it and put your code in the text widget. You may also have to install the plugin 'exec php'

Juggledad,

Isn't his code all javascript?

Are you saying that MZ only permits limited javascript code as well as limited php code?

juggledad Jun 10, 2013 06:29 AM

Sorry, too early in the morning with too little sleep last night. Strike my comments in post #10.

the <script...> is HTML not PHP so it should be fine adding it to the virtual template.

CrouchingBruin Jun 10, 2013 08:58 AM

Do you have ad-blocking extensions like AdBlock installed on your browser? That's probably the reason why you're not seeing it. I just tried inserting your script code at the very end of footer.php on my web site and it worked fine (after I disabled AdBlock), I got double-underlines under certain words on my site, and when I hovered over those words, I saw little pop-up ads for sinus medication (I have, of course, removed the script code after my short test).

If you're running Firefox with the AdBlock (or AdBlock Plus) extension, you will probably see a little red stop sign in the bottom left corner of your browser window. Click on that stop sign while you are viewing your site and you should be able to disable AdBlock for your entire site (the stop sign will turn from red to gray). Of course, that only affects your own browser, and illustrates one of the problems with incorporating advertising code in your site: so many people have ad-blocking extensions installed that they are also not going to see your ads or ad links.

cainechapman Jun 10, 2013 10:22 AM

Hey CrouchingBruin, thanks a lot. It was the AdBlock extension in my Firefox browser. Everything works now. I appreciate all the help guys!


All times are GMT -6. The time now is 02:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.