This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function wa_before_co() { | |
| ?> | |
| <a href="https://domain.com" class="button">Your custom button</a> | |
| <?php | |
| } | |
| add_action( 'woocommerce_proceed_to_checkout', 'wa_before_co', 10 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Insert ads after n paragraph multiple ads | |
| add_filter( 'the_content', 'prefix_insert_post_ads' ); | |
| function prefix_insert_post_ads( $content ) { | |
| $ad_code1 = '<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5327211893729632" | |
| crossorigin="anonymous"></script> | |
| <ins class="adsbygoogle" | |
| style="display:block; text-align:center;" | |
| data-ad-layout="in-article" | |
| data-ad-format="fluid" | |
| data-ad-client="ca-pub-xxxxxxxxxxxxxxx" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Removes some menus by page. | |
| */ | |
| function dinoiki_remove_menus(){ | |
| remove_menu_page( 'index.php' ); //Remove Dashboard | |
| remove_menu_page( 'jetpack' ); //Remove Jetpack | |
| remove_menu_page( 'edit.php' ); //Remove Posts | |
| remove_menu_page( 'upload.php' ); //Remove Media | |
| remove_menu_page( 'edit.php?post_type=page' ); //Remove Pages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action( 'wp_footer', 'woocommerce_show_coupon', 99 ); | |
| function woocommerce_show_coupon() { | |
| echo ' | |
| <script type="text/javascript"> | |
| jQuery(document).ready(function($) { | |
| $(\'.checkout_coupon\').show(); | |
| }); | |
| </script> | |
| '; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function add_verification_bagdge_to_authors($display_name) { | |
| global $authordata; | |
| if (!is_object($authordata)) | |
| return $display_name; | |
| $icon_roles = array( | |
| 'administrator', | |
| 'editor', | |
| 'your-custom-role', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function yourtab_content() { | |
| get_header( vibe_get_header() ); | |
| if ( !defined( 'ABSPATH' ) ) exit; | |
| $user_id=get_current_user_id(); | |
| if(function_exists('bp_course_get_current_user_id')){ | |
| $user_id=bp_course_get_current_user_id(); | |
| } |