Site logo

Archived topic

Associate my post to table of content in the side bar

28 replies · Started by Simone on July 7, 2020

Viewing posts 16–29 of 29

Hi David,
This is what I did, but it doesn't work.

Does the Table of Contents work if you add it in the Post editor so it is part of the content ?

Yes, I tried and it works fine. I even disable the show TOC on posts in the setting to see if it would work as well when placing the shortcode in the HTML of the article and it works well.
I tried to put my picture in the sidebar and the code shows instead of the picture

I get the impression that the plugin only works if the shortcode is added to the page content.
What you could do is disable the sidebar. Then use a GenerateBlocks Grid to create your 2 columns in which you can add your TOC

How come it works on the site I sent you previously, it's the same theme and same plugin:

Ah, I see now. Too bad:(

Ok, but how can I put a picture in the widget sidebar of a related post? Is it possible?

What other widgets are you using on your site?
Can you share a link to the page where they are displayed and the TOC is required?

I just want now to put a picture in my About page sidebar.

Is it possible to do this?

in Appearance > Widgets you can add an Image Widget to your sidebar.
Of if you want to add other content with the image then add a HTML Widget, and add this for your image ( taken from the content of your About page ):

<img title="Daniella the owner of Getmoresteps" src="https://getmoresteps.com/wp-content/uploads/2020/06/Daniella-Picture-150x150.jpg" alt="Daniella Owner of Getmoresteps" width="150" height="150">

Should I put this code in the element "Hook"?

Nope. Go to Appearance > Widgets and drag a HTML widget into the Right Sidebar. Then add the code to the HTML Widget.

You can do the same thing in Customizer > Widgets > Sidebar - Add Widget.
Its exactly the same but you get to see what it update realtime.

I understand but then it won't be related to my about page.
Is it possible to relate the picture to the page itself?

This archived topic is closed to new replies.