This little module is theme independent, you can add this to any theme with a functions.php file, in the sprit of the twenty ten theme it gives you twenty advertisement or html text blocks.
AddText has it’s own widget that you can drag to the sidebars, and it has shortcodes so you can insert you advertisement or text into any post, so it could be a signature, disclaimer, targeted affiliate advertisement.
You could add any of your LinkShare Referral Programtext links or banners, not just advertising how about a html text block like a page footer in the selected posts to target the readers.
This can be done with just adding one of the AddText shortcodesthat you created on the admin options page, inside the page or post content in the editor.
The test will wrap if you select the left or right options, as you can see our Atrtisteer affiliate advertisment is left justified and the text is wrapped.
Like the two in this post you can also position the text block inside its own container, by adding a left, right or center.
Just like this center justified Google adSense banner splitting the post sentences.
You can download the Twenty Ten theme here with the addText and Dynamic Footer Twenty Ten - Add Text (1306).
We strongly advise that you test on a local install, if you have Windows and do not have a local install then follow Buds tutorial, Bud also has a new Theme add on for extending Artisteer themes if you are not happy editing code.
We have added the AddText to the WorPress free twenty ten theme, we have also renamed the theme so it will not conflict or overwrite anything you already have, upload the theme and activate it from Admin > Appearance > Themes.
You will now notice that there is a new option “AddText” under settings on the left admin panel, this is where you add the text to insert into pages, posts and widgets, this has four sections of five text blocks.
The sections by default will be expanded, you can select to collapse these and save changes, some browsers like IE8 do not always render the admin page correctly, that is why we added the option to leave the sections expanded, if you have an adSense account (WordPress.org installs only) grab some code to add to the blocks, or you can just add any text for a try out.
Add names for your AddText blocks, if the name and content are not entered then the shortcode will not return anything, use single text only words, any spaces will be removed when you save changes.
You can see in this screenshot that the instructions on the right are updated with the title you have entered, have a look at the construction of the shortcode open Bracket “[” addtext, Name or number, position and close bracket “]”, the position is optional but no formatting is done, with left, right and center there is a float, and margin applied.
We have included a widget so you can add the text to sidebars, footers etc:, from Appearance, Widgets you will see in the top row our AddText Widget, select this and drag it across to one of the primary sidebars.
We have only two dropdowns to select, position and title are optional, save and close, that is it all done here.
Posts and Pages
To add the addText to a post or page just select the html option on the right and type in a short code, in this screenshot you can see the start of each paragraph we have added a short code, in the first we have used the name and in the second we have used the index.
Adding to your Themes
This is easy copy the cms-adtext folder across to your own themes folder, open functions.php and copy the last lines, and paste these in your themes, functions.php.
/* add Digital Raindrops Ad and Text Shortcodes and Widget */ if (file_exists(TEMPLATEPATH. '/cms-adtext/cms-adtext-functions.php')) include_once(TEMPLATEPATH. '/cms-adtext/cms-adtext-functions.php');
Digital Raindrops AddText
Admin Icons WooFunction
Options Page Rohan Mehta NetTuts
Note: we do require your feedback to improve our themes and tutorials, please leave your comments good or bad.
Code disclaimer information
This document contains programming examples therefore, www.DigitalRaindrops.net grants you a nonexclusive copyright license to use all programming code examples from which you can generate similar function tailored to your own specific needs.
All sample code is provided by www.DigitalRaindrops.net for learning illustrative purposes only.
These examples have not been thoroughly tested under all conditions. www.DigitalRaindrops.net, therefore, cannot guarantee or imply reliability, serviceability, or function of these examples.
All programs contained herein are provided to you “AS IS” without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.
We hope you will benefit from our tutorials Membership to this website is not required, however the downloading of some themes and files is restricted to site supporters.
You can register for a 10 year ‘Free Supporters Account’ from the members page which will give you access to the source files and free themes, as we introduce premium themes and content some of these these will only be downloadable with a subscription, any revenue from subscriptions is used to support the site costs.
This website is a tool to support and promote WordPress and Artisteer, please support, share and give credit for any benefits you gain from the tutorials on this website.