Coding Cheatsheets - Learn web development code and tutorials for Software developers which will helps you in project. Get help on JavaScript, PHP, XML, and more.

Post Page Advertisement [Top]

Add Next/Previous links to The Event Calendar Wordpress Plugin

Add code to your child theme’s functions.php file

/**
 * Allows visitors to page forward/backwards in any direction within month view
*/

if ( class_exists( 'Tribe__Events__Main' ) ) {

class ContinualMonthViewPagination {
    public function __construct() {
        add_filter( 'tribe_events_the_next_month_link', array( $this, 'next_month' ) );
        add_filter( 'tribe_events_the_previous_month_link', array( $this, 'previous_month' ) );
    }

    public function next_month() {
        $url = tribe_get_next_month_link();
        $text = tribe_get_next_month_text();
        $date = Tribe__Events__Main::instance()->nextMonth( tribe_get_month_view_date() );
        return '<a data-month="' . $date . '" href="' . $url . '" rel="next">' . $text . ' <span>&raquo;</span></a>';
    }

    public function previous_month() {
        $url = tribe_get_previous_month_link();
        $text = tribe_get_previous_month_text();
        $date = Tribe__Events__Main::instance()->previousMonth( tribe_get_month_view_date() );
        return '<a data-month="' . $date . '" href="' . $url . '" rel="prev"><span>&laquo;</span> ' . $text . ' </a>';
    }
}

new ContinualMonthViewPagination;

}

24 comments:

  1. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.Block Chain Training in chennai

    Block Chain Training in annanagar

    Block Chain Training in pune

    Block Chain Training in velachery

    ReplyDelete
  2. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.Block Chain Training in chennai

    Block Chain Training in annanagar

    Block Chain Training in pune

    Block Chain Training in velachery

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. I really enjoy simply reading all of your weblogs. Simply wanted to inform you that you have people like me who appreciate your work. Definitely a great post I would like to read this
    Data Science Training in Chennai | Data Science training in anna nagar
    Data Science training in chennai | Data science training in Bangalore
    Data Science training in marathahalli | Data Science training in btm

    ReplyDelete
  6. I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.
    python training Course in chennai
    python training in Bangalore
    Python training institute in kalyan nagar

    ReplyDelete
  7. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.
    Best Devops Training in pune

    ReplyDelete
  8. Thanks a lot for sharing us about this update. Hope you will not get tired on making posts as informative
    as this

    smart-writing
    Technology

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. such an effective blog you are posted.this blog is full of innovative ideas and i really like your information's. i expect more ideas from your site please add more details in future.
    python training courses near me

    best python course in bangalore
    best python training bangalore
    python scripting classes in bangalore

    ReplyDelete
  11. Amazing Article . Thanks for sharing the wonderful Post. Your writing is very interesting to read.
    Pega training in chennai

    ReplyDelete
  12. Zuan Technology, a WordPress development company, builds optimal websites that support your business. Give your ideas to us. Get a website that addresses your business or endeavour needs. Already have a WordPress site and facing problems?
    Leave it to us. We take care of all the functionality aspects of your site. Get

    optimized @ +91 9884868777


    Wordpress development company in chennai

    ReplyDelete
  13. https://www.zuantechnologies.com/wordpress-development

    ReplyDelete
  14. Online slots (Slot Online) is actually the introduction of a gambling machine. Slot machine As said before above Used to make electronic games referred to as web-based slots, due to the development era, people have turned to gamble with one another by computers. Will provide slot games to make internet gambling games Via the internet network process Which players are able to play through the slot program or will play Slots with the service provider's site Which internet slots games are obtainable in the form of participating in rules. It is similar to playing on a slot machine. Both practical images and sounds are at the same time thrilling as they go to lounge in the casino ever.

    ReplyDelete
  15. ได้โดยที่จะทำให้คุณนั้นสามารถสร้างกำไรจากการเล่นเกมส์เดิมพันออนไลน์ได้เราแนะนำเกมส์ชนิดนี้ให้คุณได้รู้จักก็เพราะว่าเชื่อว่าทุกคนนั้นจะต้องรู้วิธีการเล่นและวิธีการเอาชนะเกมม สล็อต าแทบทุกคนเพราะเราเคยเล่นกันมาตั้งแต่เด็กเด็กหาคุณได้เล่นเกมส์คาสิโนออนไลน์ที่คุณนั้นคุ้นเคยหรือจะเป็นสิ่งที่จะทำให้คุณสามารถที่จะได้กำไรจากการเล่นเกมได้มากกว่าที่คุณไปเล่นเกมส์คาสิโนออนไลน์ที่คุณนั้นไม่เคยเล่นมาก่อนและไม่คุ้นเคย เราจึงคิดว่าเกมส์ชนิดนี้เป็นเกมส์ที่น่าสนใจมากๆที่เราอยากจะมาแนะนำให้ทุกคนได้รู้จักและได้ใช้บริการ

    ReplyDelete

  16. This post is so interactive and informative.keep update more information...
    Tally course in bangalore
    Tally classes in bangalore

    ReplyDelete
  17. Thanks for the informative article. This is one of the best resources I have found in quite some time. Welcome to Edtech Reader's comprehensive business listing platform! Gain maximum visibility for your Edtech Reader business by listing it on our free business listing sites.
    visit 1000+ Business Listing Sites List

    ReplyDelete

Bottom Ad [Post Page]