Single Page Side Bar widget is not working.

  • Problem
  • Updated 3 years ago
Single Page Side Bar widget is not working. For example when I click on a post and the single post page appears, the side bar widget does not contain the widget.

I have tested it with numerous widgets and nothing appears. For example, twitter, Related post widgets, etc.

Please advise.

Thank you
Photo of e7ephunkE

e7ephunk

  • 26 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 10
Photo of Allan Cole

Allan Cole, Owner

  • 2047 Posts
  • 112 Reply Likes
The Single PAGE sidebar, only shows up on Pages. It also shows up on Posts that are in you’re defined Blog category if you’re using that feature. I’ll need to update my documentation to be more clear about that.
Photo of e7ephunkE

e7ephunk

  • 26 Posts
  • 0 Reply Likes
Thanks! Is it possible to include the sidebar widget for single posts as well for the AF+Blog template?

Thanks!
Photo of Allan Cole

Allan Cole, Owner

  • 2047 Posts
  • 112 Reply Likes
Yes, but you’ll need to find a way to customize the theme on your own.
Photo of NikkiN

Nikki

  • 4 Posts
  • 2 Reply Likes
I had the same problem. Technically, since the description on the Single Page Sidebar widget actually says "Single Post and Pages" - this should be a non-issue. However, since we all know it doesn't work like that out of the box, here's the fix:

- Open up thematic-functions.php (found in the extensions folder of your Autofocus theme)

- Go to line 624 and you'll see:



if ( is_active_sidebar('single-sidebar') && (in_category($af_blog_catid) || is_page()) ) {



replace it with:



if ( is_active_sidebar('single-sidebar') && (in_category($af_blog_catid) || is_single() || is_page()) ) {

Photo of e7ephunkE

e7ephunk

  • 26 Posts
  • 0 Reply Likes
Thanks for the fix! But now anything you put in the widget, is not aligned correctly
Photo of NikkiN

Nikki

  • 4 Posts
  • 2 Reply Likes
You'll need to do some CSS editing.
Photo of

  • 4 Posts
  • 0 Reply Likes
What CSS requires editing to get it aligned? I've been trying to edit within

/* Single Post Styles */

in style.css, but doesn't seem to help...

Thanks!
Photo of e7ephunkE

e7ephunk

  • 26 Posts
  • 0 Reply Likes
Any update on this?
Photo of Barella

Barella

  • 64 Posts
  • 8 Reply Likes
Same here ... please help !!
Photo of Adam Grenier

Adam Grenier

  • 3 Posts
  • 0 Reply Likes
An interesting note - in "Default" mode, the side-bar automatically works in the single post views. In "Grid" it doesn't show up, the title gets shifted to the side (Instead of the top, under the feature image) and the alignment is off.
Photo of Nate Green

Nate Green

  • 1 Post
  • 0 Reply Likes
Does anyone know if there's a way to trick the theme into treating the 'grid' mode as if it is 'default' mode so that the title shows up in the main column and widgets work in the sidebar?
Photo of Barella

Barella

  • 64 Posts
  • 8 Reply Likes
I solved the align problem editing the style.css setting the width to 280px.

That's my css line:

#single-sidebar {padding:11px 0 0 8px;margin:44px 0 0 -618px;width:280px;clear:right;float:right;font-size:11px;border-left:1px dotted #000;letter-spacing:0.025em;line-height:22px;}

The result now is:



Hope it helps :)

P.S. to make it work you have to follow nikki instructions first ...
Photo of Crazy888C

Crazy888

  • 32 Posts
  • 0 Reply Likes
it works! woohoo
Photo of

  • 4 Posts
  • 0 Reply Likes
Works indeed!! Thanks Barella :)
Photo of basbva

basbva

  • 60 Posts
  • 2 Reply Likes
This seems much prettier than a widget, I have to confess. All that customizing is dangerously adictive. Very nice.
Photo of Barella

Barella

  • 64 Posts
  • 8 Reply Likes
Gimme a star please :P

Happy to know it solves your problem :)
Photo of e7ephunkE

e7ephunk

  • 26 Posts
  • 0 Reply Likes
Thank you!!
Photo of basbva

basbva

  • 60 Posts
  • 2 Reply Likes
For me "context widget" does the job. Not to elegant, but it seems sufficient.
Photo of Crazy888C

Crazy888

  • 32 Posts
  • 0 Reply Likes
after i installed the new version, this error came up and i had to revert back to the old code

Warning: Cannot modify header information - headers already sent by (output started at /home/content/60/7243060/html/wp-content/themes/autofocuspro/extensions/thematic-functions.php:1) in /home/content/60/7243060/html/wp-includes/pluggable.php on line 897

did anyone else encounter this problem?
Photo of chris

chris

  • 41 Posts
  • 0 Reply Likes
Yes, I have. I've mentioned it here.

http://bit.ly/ekXi8q

No response so far though.
Photo of Muemmello

Muemmello

  • 22 Posts
  • 0 Reply Likes
Same thing here, but nobody seems to care about this issue. Anyhow, I'm still hopeful that there is a guy out there who can fix it :)
Photo of chris

chris

  • 41 Posts
  • 0 Reply Likes
I'm sure we'll eventually be told it's a 'customisation issue' so cannot possibly be answered. I can't figure out why if this feature worked in the old version before the Wordpress update that it should be taken out now. What's the point?
Photo of Muemmello

Muemmello

  • 22 Posts
  • 0 Reply Likes
I don't see it either, hopefully we get a response / solution somehow.

A workaround could be to include the content which is now in the sidebar into the post-meta on the right. Below "date", "filed under", "permalink" etc.
But I can't manage to make it work.
Photo of chris

chris

  • 41 Posts
  • 0 Reply Likes
Yeah, that's a good idea. I had a go at that too but nothing seemed to be happening. We live in hope of a response!
Photo of victorypug

victorypug

  • 10 Posts
  • 0 Reply Likes
Same here!
Hope that there's somebody who can fix this...
Photo of Allan Cole

Allan Cole, Owner

  • 2047 Posts
  • 112 Reply Likes
Well clearly the only solution here is to just bring back the Single sidebar for all posts.

I’ve had some plans for this standalone version i’m working on to make the Grid & Staggered views much more dynamic than just changing how the front page looks. It’s subtle now, but essentially the idea is that the Portfolio View, would become more of a Portfolio Template and optimize the theme in various ways to make it more “portfolio friendly.” That meant removing distracting elements or improving the UI to make viewing the Work more simple. I may need to revise that idea now.

Back to the issue at hand, I haven’t tried the suggested code here so I can’t guarantee that it works, but until I can bring back the single sidebar in an official update, here’s the fix I recommend:

In thematic-functions.php at line 575 AND line 583 change this:
if ( is_active_sidebar('single-sidebar') && (in_category($af_blog_catid) || is_page()) ) {

To this:
if ( is_active_sidebar('single-sidebar') ) {

UPDATE (to line 354):
Then, add this new line below line 354 in the style.css file:
.single.grid-layout #content #single-sidebar {margin-left:-512px;width:272px;padding: 11px 8px;}


That should do it!
Photo of Muemmello

Muemmello

  • 22 Posts
  • 0 Reply Likes
Thank you for the solution. Good news is that the sidebar is back indeed. Unfortunately it still gives errors (while trying to post a comment for example):

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/wp10558151_L31ZZG0YD0/www/wp-content/themes/autofocuspro/extensions/thematic-functions.php:1) in /is/htdocs/wp10558151_L31ZZG0YD0/www/wp-comments-post.php on line 95

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/wp10558151_L31ZZG0YD0/www/wp-content/themes/autofocuspro/extensions/thematic-functions.php:1) in /is/htdocs/wp10558151_L31ZZG0YD0/www/wp-comments-post.php on line 96

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/wp10558151_L31ZZG0YD0/www/wp-content/themes/autofocuspro/extensions/thematic-functions.php:1) in /is/htdocs/wp10558151_L31ZZG0YD0/www/wp-comments-post.php on line 97

Warning: Cannot modify header information - headers already sent by (output started at /is/htdocs/wp10558151_L31ZZG0YD0/www/wp-content/themes/autofocuspro/extensions/thematic-functions.php:1) in /is/htdocs/wp10558151_L31ZZG0YD0/www/wp-includes/pluggable.php on line 897
Photo of chris

chris

  • 41 Posts
  • 0 Reply Likes
Wow, was just about to try this. I hate that scary error message so think I'll hold off for a bit.
Photo of Allan Cole

Allan Cole, Owner

  • 2047 Posts
  • 112 Reply Likes
Muemmello,
I’m pretty sure this comment issue you’re having is unrelated to the sidebar fix. Have you tested my fix on a fresh install of AF+ Pro?

That error is reporting an issue with the 1st line of your thematic-functions.php. That part of the code hasn’t and shouldn’t be adjusted. You may want to try this fix with a fresh install of AF+ Pro.

I’ve temporarily applied this fix to my live demo without any errors: http://fthrwght.com/autofocus/prodemo...

Are you using AF+ PRO Version 1.6.1?
Photo of chris

chris

  • 41 Posts
  • 0 Reply Likes
I've just tried this and the sidebar is working but I now get this error message:

Warning: Cannot modify header information - headers already sent by (output started at /home/clotheso/public_html/wp-content/themes/autofocuspro/extensions/thematic-functions.php:1) in /home/clotheso/public_html/wp-admin/theme-editor.php on line 99
Photo of Muemmello

Muemmello

  • 22 Posts
  • 0 Reply Likes
Allan,

I redownloaded Autofocus (version 1.6.1) and uploaded it into the themes folder. The previous version was deleted entirely, so this should be a fresh install.
Afterwards I made the modifications and uploaded the files. I am still facing the same errors.

Maybe there is a problem with my thematic-functions.php. In your workaround you say that I should replace lines 575 and 583. Line 575 looks exactly like the one you posted above, line 583 was slightly different.

Thanks anyway so far!