Colormag WordPress 主题 Discourse 小工具

I have been able to make my first plugin for Wordpress and Discourse.

It let you change the wordpress theme not only to get content from articles - but now you can mix articles and forum posts. I have been able to recode the widgets for the colormag theme.

Im not a coder I have to say, just a sparetime coder who find it funny - so the code might be a little buggy and not the most beautyful :slight_smile:

I did add 2 new widgets and by them you can either get the latest posts from a specific forum category (choosen from a dropdown) or the latest posts from your site.

Widget Style 1

With a output like

Widget Style 2

With a output like

It is controlled in wordpress with these settings:

You can see a live demo here:
http://colormag.liljefred.dk

The original theme you find here:

10 个赞

To do’s

  • find someone who can review the code
  • some kind of cache for random images
  • eg add a greyscale or blur option for random images or both
    – ?grayscale
    – ?blur
    – ?grayscale&blur
  • style optimation
    – are all div tags closed?
  • add more option in the admin page
2 个赞

Download:

You find the beta files here.

https://github.com/frold/Colormag-Wordpress-Theme-Discourse-Widget

But to reduce loading time it seems like it need some more skilled coder to go through the code… :frowning:

I hope someone in the community want to help. As said in the first post, Im not a coder by profession.

1 个赞

If anyone sees the idea of the plugin and want to contribute - please join by adding your code… :smiley:

1 个赞

What is the fatest?

To do at the moment : read date from the json file located at the distance server

Or let my script download the json file and then read data from the json file on the server where I run wordpress?

Im not that skilled coder and I need to speed up the script, so it is usefull :slight_smile:

Preview (where I use my disourse forum):

Test: http://colormag.liljefred.dk/

1 个赞

Is the colormag theme free?

yes that’s the reason I use it as the template. You can buy a pro edition as well. This plugin should work with that edition too.

Now it support grayscale, or blur effect if random images is choosen

A new demo site - and live site (Im not able to edit the first post)

1 个赞

我也在使用 Colormag 主题,并且同样制作了一个小挂件,在侧边栏显示最新的论坛话题:

我不会分享代码,因为它非常非常混乱,我甚至没有进行任何 WordPress 设置。
但基本上,它会显示最新创建的话题,并且排除了一些不太感兴趣的分类。
我使用 WP CRON 任务每天更新一次挂件内容。

1 个赞