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] Issue with creating a double cell widget (http://forum.bytesforall.com/showthread.php?t=17394)

sober Apr 24, 2012 06:00 AM

[SOLVED] Issue with creating a double cell widget
 
Hi

I have been for the past two days trying to create a two cell widget and put in above the page title on a page. I was able to make the widget show up but the issue is that it inherits the styling from the table. What happens, the table border and background and colors comes as an additional layer around the widget. I would really appreciate if someone could give me the exact code. I am on 3.7.3 and the code I am using to create the widget is
PHP Code:

<?php if (is_page()) { ?><?php bfa_widget_area('name=pagetop-twin&cells=2&align=9'); ?><?php ?>

You can see the sample at http://www.nonebutchrist.com/privacy-policy/

You can see the twin widgets just above the title "privacy policy" and if you go to the end of the page, you can see a sample table whose styling the twin widgets has inherited as an additional layer around it. All I need is to take out this additional layer without change the table styling.

Jimmy

lmilesw Apr 24, 2012 07:35 AM

Where did you get that code for a new widget area? It should be
HTML Code:

<?php bfa_widget_area('name=pagetop-twin&cells=2&align=9'); ?>
since only the code for new widget areas is allowed.
Where did you put the code?
If you want a two celled widget area above the page title on each page I would put the above code in ATO>Edit Post/Page Info Items>KICKER: "Page" Pages

sober Apr 24, 2012 07:48 AM

Hi

Thanks for the code and the explanation. I do not have any experience with PHP or coding. The code that I mentioned was just a geusstimate code. Sometimes things worked for me that way. I inserted my code by editing index.php. I have inserted the code you gave in the "post/pages" kicker but nothing has changed. This could be something with caching so I am waiting for the cache to expire. Also, when i use single cell widget, it works perfect as you can see with the widget area just above the double cell widget and I find its strange. I really appreciate your help and hope it would work once the cache expires. The page, again, is at http://www.nonebutchrist.com/privacy-policy/

lmilesw Apr 24, 2012 07:56 AM

Why not just disable your caching plugin for the time being. Also once you put the code in the kicker area you need to go to a page to "activate" it. Then you should see the new widget areas in Appearance>Widgets.

sober Apr 24, 2012 11:48 AM

I am on a managed wordpress hosting and apparently, caching is not enabled on my blog. I think there is something else with this. I can see the widgets on the widget page in admin panel

juggledad Apr 24, 2012 12:15 PM

first please don't double post. you won't get a faster response

try adding the following th the CSS inserts
HTML Code:

div.post table.bfa_widget_area td {
    background-color: #FFFFFF;
    border-bottom: medium none;
    border-left: medium none;
    border-right: medium none;
    padding: 10px;
    text-align: left;
}

Remember the widgets are styled in the theme options.

sober Apr 24, 2012 02:15 PM

Thank you for the style sheet changes and my very sincere apologies for the double posting. Your code almost solved issue but just a minor margin problem. If you look at the second widget titled "twin widget two", you can see a small padding/margin to the right and the double cell widgets are not aligned completely with the single cell widget above on the right side. i tried different things to use the full width including
HTML Code:

#pagetop-twin_2 {padding-right:-10px;}
but it did not work. If you take a look at the bottom of the page, you can see another two cell widget made with the same code that sits for the full width of the page. Do you have any idea why the top second widget only has this strange right side margin/padding. I would also like to make a small space in the center between the widgets but do not want padding/margin on the left of the first widget and right of the second widget. I really appreciate your help. The page, again, is at http://www.nonebutchrist.com/privacy-policy/

juggledad Apr 24, 2012 04:15 PM

I must be dense today, but I can't figure out what widget you are talking about. It looks like you have given each widget a unique title on the page, so which one, i.e 'Page bottom twin two', are you talking about?

lmilesw Apr 24, 2012 06:18 PM

Also negative padding doesn't work.

sober Apr 24, 2012 06:28 PM

Hi

Let me quote from my last posting
Quote:

If you look at the second widget titled "twin widget two",
It is the second widget on the top with the title "twin widget two" just above the page title "Privacy Policy". If you look it closely, you can see a margin/padding to the right which is what I want to do away with. I have used the same code to create the double cell widgets in the bottom and for that there is no such issue and it stretches to the full width. I apologize for the confusion caused

lmilesw Apr 24, 2012 06:51 PM

You have a 5px right margin set on div#text-18

sober Apr 24, 2012 08:17 PM

THANKS THANKS THANKS THANKS THANKS THANKS THANKS and PAT PAT PAT PAT PAT PAT PAT to both of you. It now looks just the way I want it to be. Thanks again http://school.discoveryeducation.com...ges/thanks.gif


All times are GMT -6. The time now is 05:42 AM.

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