mgsisk / webcomic

Comic publishing power for the web. Turn your WordPress-powered site into a comic publishing platform with Webcomic.
http://wordpress.org/plugins/webcomic
GNU General Public License v2.0
110 stars 29 forks source link

Characters widget not showing on front page and other pages #176

Closed GaryTomato closed 10 years ago

GaryTomato commented 10 years ago

[Short version: the characters widget is not showing up on "page" or "post" just "webcomic1" post_types. I'd like them to show up everywhere but I can't seem to find how.]

Hi Michael,

I'm using your great webcomic plugin (4.1.0.3) with the InkBlot theme. I've created a child theme to make modifications (copied the style.css as you mentioned in another post) and so far so good, all my modifications work. The only thing that's weird is that the Characters widget doesn't show up on the front-page (a static page) but it shows correctly on any single page. I have the Search and Archives widget turned on also, they show up properly on all pages. I didn't find any options to show/hide the widget on specific pages and the widget.php doesn't seem to have any filtering for is_page or is_front_page. What am I missing? Is this a bug or am I overlooking some basic principle?

Regards, Gary

mgsisk commented 10 years ago

What's the collection setting for the widget? If it's (current collection) that might be the problem. It's impossible for Webcomic to know what the current collection is on the homepage or static pages, and it won't display the widget unless it knows what collection is currently being viewed, so in those cases no widget will be displayed. The sole exception to this is if you've specifically set a collection for a static page on the Add/Edit Page screen using the Webcomic Collection post field.

Selecting a specific collection should correct the issue (unless you already did that…).

GaryTomato commented 10 years ago

Thanks Mike you pointed me to the right direction. I tried three settings with different results, it might need some looking into in the long term:

  1. I set the collection in the widget settings. This works fine, although it restricts me to only one collection's characters so I need to revisit it for the long-term.
  2. I set the collection on the page settings. This did not work for some reason. The page is the front page so that might still have to do something with it.
  3. I set the collection under Appearance -> Customize -> WebComic "Show webcomics from this collection on the front page". This didn't work either no matter if I turned the setting "Show webcomic on the front page" on or off.

The only twist in the setup is that I didn't overwrite the front-page.php in the theme but created it as "comic-template.php" so I can turn it on and off in the page's settings as a template. The template is almost the same as single.php but it uses a custom loop to set it to "webcomic1" posts and only show one. Apart from that it's a standard setup with one collection and not much other content.

I'm closing this ticket now, as option #1 is good enough for me. If I ever figure out what is happening in option #2 and #3 I'll give you a shout.

Regards, Gary

mgsisk commented 10 years ago

Thanks Gary! Number 1 and 3 sound correct, but number 2 may be a bug; I'll look into it.