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)
-   -   Gallery Plugin Not Respecting Ata's Sidebar Settings (http://forum.bytesforall.com/showthread.php?t=17395)

LaneLester Apr 24, 2012 07:43 AM

Gallery Plugin Not Respecting Ata's Sidebar Settings
 
I've tested a number of gallery plugins for suitability for newbie users. The best one so far is gallery-plugin, but I've hit a snag.

The plugin uses custom templates to set up a page to list all site galleries and another for the individual gallery pages. These template files do not use Ata's sidebar settings, but rather install some default sidebar items (Search Pages Archives Categories Meta). This makes for a mess with the wrong items plus the sidebar gets forced to the bottom of the page.

You can see the situation at http://www.birding4u.com/galleries/

The gallery template has only this in it to produce the sidebar: <?php get_sidebar(); ?>

I may just delete that line and have no sidebar on the gallery pages, but i would prefer to be able to have a sidebar and control its contents.

If I knew where those sidebar items (Search Pages Archives Categories Meta).were being specified I could change the code to what I want. Do you know, or have a different suggestion?

Lane

lmilesw Apr 24, 2012 07:22 PM

Those look like the default sidebar contents when no widgets are installed. What is it you want to do (EG What do you want your page to look like)?

LaneLester Apr 25, 2012 06:12 AM

Quote:

Originally Posted by lmilesw (Post 84190)
Those look like the default sidebar contents when no widgets are installed. What is it you want to do (EG What do you want your page to look like)?

Yes, the default is being displayed. However, on all other posts/pages of my site, my selected widgets are displayed.

Ideally, I would like my selected widgets to be displayed on the gallery pages, as they are on all other pages, and they would be displayed at the side rather than at the bottom.

Plan B would be to be able to manually code what I want in the sidebar (like we used to do in olden times). With other themes, this would be coded in sidebar.php, but it seems Ata has no such file. Is there a file in Ata which serves the same purpose?

Lane

juggledad Apr 25, 2012 06:31 AM

The left sidebars are built in header.php and thr right ones are built in footer.php

LaneLester Apr 25, 2012 07:23 AM

Quote:

Originally Posted by juggledad (Post 84198)
The left sidebars are built in header.php and thr right ones are built in footer.php

Thanks! I have only the right sidebar enabled. Looking at footer.php, it seems the default sidebar has only Recent Posts, wp_list_bookmarks(?), and Meta. So the gallery pages are getting their list of sidebar items from somewhere else!

Lane

lmilesw Apr 25, 2012 09:24 AM

Quote:

Originally Posted by LaneLester (Post 84197)
Ideally, I would like my selected widgets to be displayed on the gallery pages, as they are on all other pages, and they would be displayed at the side rather than at the bottom.

Plan B would be to be able to manually code what I want in the sidebar (like we used to do in olden times). With other themes, this would be coded in sidebar.php, but it seems Ata has no such file. Is there a file in Ata which serves the same purpose?

For displaying widgets only on certain page you can use plugins like Widget Logic or Display Widgets.

As far as putting info in the sidebar why not just use a widget for what you want? Also coding the theme files won't survive a theme upgrade so you will have to document what you do and re-do the edits if you do decide to upgrade. This is something I don't get involved in as I deal with quite a few sites.

LaneLester Apr 25, 2012 10:29 AM

Quote:

Originally Posted by lmilesw (Post 84202)
For displaying widgets only on certain page you can use plugins like Widget Logic or Display Widgets.

I tried Widget Logic Visual and Display Widgets. I couldn't figure out how to use Display Widgets. Neither of the two I tried had any effect on the gallery pages, although they did control the other pages.

Quote:

As far as putting info in the sidebar why not just use a widget for what you want?
I think I've failed to communicate my situation. I am using the Text widget (it's the only one I want on this site). On all pages except the gallery pages, only the Text widget is displayed. As I noted in my first post, the gallery pages show a whole flock of items, and they display at the bottom of the page.

I've gone ahead and removed from the gallery template files the code <?php get_sidebar(); ?> and that at least gets rid of all the junk I don't want there.

Maybe some day I'll figure out how to put there what I want.

I appreciate all the information and suggestions in this thread.

Lane

juggledad Apr 25, 2012 10:53 AM

You need to edit the two gallery templact files
for gallery-single-template.php change the first line from
HTML Code:

<?php get_header(); ?>
to
HTML Code:

<?php
list($bfa_ata, $cols, $left_col, $left_col2, $right_col, $right_col2, $bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
get_header();
extract($bfa_ata);
?>

for gallery-template.php, change line 7 from
HTML Code:

<?php get_header(); ?>
to
HTML Code:

<?php
list($bfa_ata, $cols, $left_col, $left_col2, $right_col, $right_col2, $bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
get_header();
extract($bfa_ata);
?>

and delete line 99 which is
HTML Code:

<?php get_sidebar(); ?>

LaneLester Apr 25, 2012 12:23 PM

Quote:

Originally Posted by juggledad (Post 84205)
You need to edit the two gallery templact files.

Thanks!

Strangely enough, that worked for gallery-template.php, but not for gallery-single-template.php. The latter still does not show the widget-containing sidebar.

I opened the file on the server to be sure the code got changed. I flushed the cache, and reloaded the page to be sure I was getting a fresh load.

I had to remove <?php get_sidebar(); ?> from both files to get rid of the junk.

Ata's custom footer settings are taking effect with both types of gallery pages.

Lane

juggledad Apr 25, 2012 01:51 PM

I just unzipped the plugin again and the gallery-single-template.php does NOT have the
HTML Code:

<?php get_sidebar(); ?>
in it. you must have added it at some point...

LaneLester Apr 25, 2012 01:58 PM

Quote:

Originally Posted by juggledad (Post 84213)
I just unzipped the plugin again and the gallery-single-template.php does NOT have the
HTML Code:

<?php get_sidebar(); ?>
in it. you must have added it at some point...

That's also what I thought at first. It's up higher at line 65 in the file I downloaded.

Lane

juggledad Apr 25, 2012 02:08 PM

ahh, I missed that one :o

LaneLester Apr 25, 2012 02:45 PM

I'm curious how you figured that replacing
Code:

<?php get_header(); ?>
with
Code:

<?php
list($bfa_ata, $cols, $left_col, $left_col2, $right_col, $right_col2, $bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
get_header();
extract($bfa_ata);
?>

would solve the sidebar problem?

Any idea why the above fix works for gallery-template.php, but not for gallery-single-template.php?

Lane

juggledad Apr 25, 2012 07:24 PM

I'm just good ;) how did I fugure it out, well I've been working with the theme for a couple years and did support for a long long time before that, I've looked at the code and I tried it.

what do you mean the gallery-single-template.php doesn't work, it works for me.

LaneLester Apr 25, 2012 07:55 PM

Quote:

Originally Posted by juggledad (Post 84226)
what do you mean the gallery-single-template.php doesn't work, it works for me.

I see the Text widget with Google ads at
http://www.birding4u.com/galleries/
but there's only an empty sidebar at
http://www.birding4u.com/galleries/gallery-3/
which is controlled by gallery-single-template.php, and there should be the same kind of ads.

Lane

juggledad Apr 26, 2012 04:25 AM

you have caching turned on - you should always turn off caching while making changes to the siite so ou can see them right away.

please flush the cache and turn the plugin off.

Note: try setting your permalinks back to the default and see what happens.

LaneLester Apr 26, 2012 06:48 AM

Quote:

Originally Posted by juggledad (Post 84247)
please flush the cache and turn the plugin off.

Note: try setting your permalinks back to the default and see what happens.

Cache disabled. Permalinks at default, although it would be bad if this were necessary.

http://www.birding4u.com/?gallery=gallery-3

Lane

juggledad Apr 26, 2012 06:55 AM

And are you using the two templates with the changes added in? (the change in the header and the sidebar() line removed?)

LaneLester Apr 26, 2012 07:28 AM

2 Attachment(s)
Quote:

Originally Posted by juggledad (Post 84253)
And are you using the two templates with the changes added in? (the change in the header and the sidebar() line removed?)

You bet! I've attached them (with a slight rename).

Lane

juggledad Apr 26, 2012 07:44 AM

what version of Atahualpa?
it's working fine with 3.7.6 - try disabling ALL your plugins

LaneLester Apr 26, 2012 08:49 AM

Quote:

Originally Posted by juggledad (Post 84256)
what version of Atahualpa?
it's working fine with 3.7.6 - try disabling ALL your plugins

My server is really slow right now, but they're finally disabled. My other sites are loading quickly, so something may be broken at Birding4U!

Oops! I wondered why the gallery pages didn't work. I guess I shouldn't disable that plugin! (Where's the "embarrassed" smiley?)

Well, the pages haven't reloaded yet, but I better send this off before the forum software logs me off!

Lane

LaneLester Apr 26, 2012 09:06 AM

For some reason, the gallery plugin keeps forgetting where the photos are that I uploaded. I'm now uploading them for the third time... and it's taking forever!

Good grief! The template changes are no longer in effect... Oh, I know what happened. When I disabled/enabled the plugin, it copied a fresh set of the default templates (which I haven't edited) to /atahualpa.

Now to go take care of that!

Lane


All times are GMT -6. The time now is 12:16 PM.

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