Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-01-16 19:52:12
- Justry
- New Member
- Registered: 2008-01-16
- Posts: 1
How do I make Adsense appear on every page of my TXP site?
Hi,
I’m really a green leaf when it comes to TXP, can someone tell me what are the steps to make Adsense appear on every page of my site?
I’m a long time WordPress user, but TXP system seems different from WordPress.
So far I only can get Adsense to show on the homepage, but on other pages….nothing.
In WordPress Adsense is usually governed separately by a main index template, and there will be a sidebar.php to input the Adsense code….
It’s really simple to get Adsense showing on every page in WordPress.
But TXP has a system called Forms….
I really have no idea where or how to make Adsense show up automatically on all pages….
Can any experts tell me what to do?
I’m figuring I need to learn PHP and HTML in order to get a basic site running on TXP….
What’s the easiest way to get Adsense showing?
Justry
Offline
Re: How do I make Adsense appear on every page of my TXP site?
Look at the ‘pages’ tab. The main page uses the ‘default’ page. The individual article pages by default use the ‘archive’ page. Just add the adsense code in both pages. This can be done more efficiently by using forms (see Amit’s post below).
Last edited by ruud (2008-01-16 20:25:31)
Offline
Re: How do I make Adsense appear on every page of my TXP site?
I would create a new form (make the type of form ‘misc’) called ‘adsense’. Paste any adsense code into this form.
Now a quick primer on how TXP templating works. Each Section in TXP is assigned a Page and Style to use. By default, the ‘homepage’ (or default section in TXP) will use the ‘default’ page and the ‘default’ style. In a fresh install, the articles are put in the ‘articles’ section (i think?) and are assigned to use the ‘archives’ page and ‘default’ css. This is probably why you aren’t seeing the adsense on other pages. If your site is pretty straightfoward I recommend going with the one page (aka superpage) to handle your template. Otherwise you can use separate pages for each section, just make sure to include:
<txp:output_form name="adsense" />
on each of these pages (given that you created the aforementioned form called ‘adsense’ and put your adsense code in there).
Once you understand how sections, pages, and forms work this will be easy as pie. Until then I recommend reading up here at the textbook.
Last edited by variaas (2008-01-16 20:24:28)
Offline
Re: How do I make Adsense appear on every page of my TXP site?
Justry wrote:
I’m figuring I need to learn PHP and HTML in order to get a basic site running on TXP….
php – no, not for a basic site, and often not for a complex site. You generally need to know more php for WordPress.
html – maybe.
- If you hire a designer, no.
- If you download a template and follow the instructions – probably not.
- If you want to customize it, or have a unique site, yes. That’s tends to be true of most CMSes.
Mike
Offline