0

I've followed up this tutorial and developed events plugins into my wordpress site.

https://code.tutsplus.com/tutorials/creating-upcoming-events-plugin-in-wordpress-creating-the-widget--cms-19922

I then downloaded their source-code from github as mine didn't display the widget. But even theirs not showing up the widget as its shown on the tutorial.

enter image description here

I'm not very sure how and on which page the widget will show up? Also when I clicked the view link from admin, its taken to index.php and only shows the content typed in the editor. The event start date, end date not showing.

I'm lost in displaying the events now. How do I go about it?

  • Nevermind, i found the answer. Must use the_widget('widget class name') function in the template file. – 112233 Apr 26 '17 at 3:56
  • Can you add this as the answer and accept it for anyone else that may have this issue? – Welcher Apr 26 '17 at 4:56
  • @Welcher, noted ..added as answer. – 112233 Apr 26 '17 at 6:01
0

In order to display widget in the front end, on any page template, just add this line.

 the_widget('widget class name') 

for more details, read wordpress codex: https://codex.wordpress.org/Function_Reference/the_widget

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.