Labs64 / credit-tracker

Credit Tracker WordPress plugin
https://wordpress.org/plugins/credit-tracker/
GNU General Public License v2.0
20 stars 20 forks source link

Use [credit_tracker_table] in a widget #18

Open r-brown opened 8 years ago

r-brown commented 8 years ago

Can [credit_tracker_table] somehow be used in or as a widget? I tried that but the code is not interpreted unfortunately.

Our goal was to show the copyright table in the footer area instead of below the article.

Source: https://wordpress.org/support/topic/credit-tracker-table-in-widget

Jaace commented 6 years ago

Do you mind if I look into this?

r-brown commented 6 years ago

Hi @Jaace - absolutely, thank you for your support!

Jaace commented 6 years ago

@r-brown I've opened a PR for this here: https://github.com/Labs64/credit-tracker/pull/28

r-brown commented 6 years ago

There is still one issue open - image preview isn't rendered in the widget if all available columns are shown (e.g. no values in the field Include Columns).

ct-small-image

As soon as custom fields are added to this field - preview image is rendered

ct-credit-table
Jaace commented 6 years ago

I'll take a look into this bug

Jaace commented 6 years ago

@r-brown This appears to be related to the styling in the theme being used. I see this happening in Twenty Seventeen, but if I install Twenty Sixteen, I can see all tables rendering properly, including those within widgets.

Some screenshots: Twenty Seventeen, post_content

post content

Twenty Seventeen, footer 1 "sidebar", as a widget.

widget

Twenty Sixteen, post_content:

post content

Twenty Sixteen, content bottom 1 "sidebar", as a widget.

footer
r-brown commented 6 years ago

Possibly we need to override some styles at css/ct-public.css (style: table.credit-tracker-xxx), so the table is rendered correctly regardless of the chosen theme.