Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   How to register widget below posts ? (http://forum.bytesforall.com/showthread.php?t=10218)

ajinkya Oct 11, 2010 06:14 AM

How to register widget below posts ?
 
Hiii
Is there any way to create new widget area below posts ? in atahualpa theme on ma blog
So that , i can display ads below every post ,not in homepage
but on after every post when i click on each post link
multiple widgets ? ;)

juggledad Oct 11, 2010 07:47 AM

Probably the easiest way would to create the new widget area at ato->Style & edit CENTER COLUMN->Content BELOW the LOOP and then use widget logic to not display it - or you could wrap the new widget area code in a php IF checking to see if it is the front page or not.

Personally, I never go back to sites that intersperse AD's in, or in between posts.

ajinkya Nov 2, 2010 06:39 AM

thanks a lot , i managed to tweak loops
But can i insert a "widget" so that , in the future i wont have to play with loops again ?
In this way , i can easily edit the codes in widget page of my blog
Just like in previous post , you gave code of adding 4 column footer
similarly what 's the code so that ,the widget will show up after every post , but before comment form :):confused:
Thanks in advance !

juggledad Nov 2, 2010 10:03 AM

I'm not clear on the first part of your reply
Quote:

thanks a lot , i managed to tweak loops
But can i insert a "widget" so that , in the future i wont have to play with loops again ?
as for putting a widget area in the actual post, just put the code in 'The LOOP' after the line
HTML Code:

<?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>

Pierre Nov 5, 2010 09:39 AM

Hello

I would like to insert Adsense script into my blog posts.

<script type="text/javascript"><!--
google_ad_client = "pub-10xxxxx0";
/* 728x15, date de création 05/11/10 */
google_ad_slot = "8xxxxxx44";
google_ad_width = 728;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


The thing is, depending on the context, I would like to be able to insert it or not, and where to. I think a "code" inside the post (just like we put [slide] for slideshows for example)

Even though I understand you are against it, could you please help me out ?

Thanks

Pierre

juggledad Nov 5, 2010 11:39 AM

you can add it in 'The LOOP' (ato->Style & edit CENTER COLUMN) and put php logic around it to determine when to 'fire it off'

Pierre Nov 7, 2010 03:21 AM

Hello Juggledad

Thanks for your answer, the only thing I'm missing now is the "php logic" :confused: you mention.

Thanks again

Pierre

juggledad Nov 7, 2010 12:18 PM

You need to determine what the conditions that will cause you to want to display the AD. Then you write a php IFstatement to match thous conditions. If you are going to test for things like if you are on the front page (is_front_page()) take a look at the wordpress codex to see all the predefined functions you can use.

Hody Apr 17, 2012 06:03 AM

I´d created a widget now, but have some more styling issues, posted here


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

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