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)
-   -   [SOLVED] widget area after first post in JUGGLEDAD's custom query page template (http://forum.bytesforall.com/showthread.php?t=20264)

nil May 6, 2013 08:58 AM

[SOLVED] widget area after first post in JUGGLEDAD's custom query page template
 
I have one full post and 4 columns showing on home page with the help of JUGGLEDAD's custom query page template. (must say thank you for the great theme & all the extras).

Everything else is done except this which I am unable to figure out.
I just want one widget area below the first post only (that is above the 4 columns)

is it possible? And how? Any workaround?


I have Atahualpa version 3.7.12 and wp 3.5.1
Can't post the site link as I am experimenting and is style wise a mess at the moment.

juggledad May 6, 2013 10:34 AM

edit template_multi_column_custom_query.php and change line 228 from
HTML Code:

        <?php if ($bfa_ata_postcount <= $posts_above_the_column) { ?>
to

HTML Code:

        <?php if ($bfa_ata_postcount <= $posts_above_the_column) {
                                bfa_widget_area('name= widget after first post'); ?>


nil May 6, 2013 01:21 PM

Thanks a ton Juggledad.

It works but it has thrown styling out of place.
the first post went to left from center.
1st column also got pushed to left and rest 3 columns to extreme right upon one another.
the most weird thing happened in footer where I can't see the copyright thing too almost vanished except 3 links.
I am sure it is styling issue and can be controlled with css inserts? right?
thanks once again.

juggledad May 6, 2013 02:20 PM

Ok, I went back and spent some time and this is a bit more complicated than the first go around.

If I were you I would make a copy of the templage and rename it in case you want to use the MC/CQ template somewhere else.

From a fresh copy of the template here is what you need to do - change line 228 from
HTML Code:

        <?php if ($bfa_ata_postcount <= $posts_above_the_column) { ?>
to
HTML Code:

                <?php if ($bfa_ata_postcount == 1) { ?>
                </tr><tr><td colspan="<?php echo $number_of_columns;?>">
                        <?php        bfa_widget_area('name= widget after first post'); ?>
                        </td> <?php } ?>

        <?php if ($bfa_ata_postcount <= $posts_above_the_column) { ?>


nil May 6, 2013 11:13 PM

This works perfectly! can't thank you enough! There will be little something on your way not immediately but definitely once I get going.
You rock!


All times are GMT -6. The time now is 02:58 AM.

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