This file contains 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 hw_current_user_points_shortcode() { | |
// Csak bejelentkezett felhasználóknál jelenjen meg valami | |
if ( is_user_logged_in() ) { | |
$user_id = get_current_user_id(); | |
// A felhasználó pontegyenlegének lekérdezése a WC_Points_Rewards_Manager osztály használatával | |
$points = WC_Points_Rewards_Manager::get_users_points( $user_id ); | |
// Ellenőrizzük, hogy a felhasználónak van-e pontja | |
if ( empty( $points ) ) { |
This file contains 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
// make your Checkbox filter, and ensure that "Group terms by parents" option is checkhed. | |
// In the Checkbox filter widget enable the Dropdown additions. You can use the search option also. (Mixed filter type not tested) | |
// Paste this code in a specific js file, plugin, or use the Elementor custom code function. (if elementor custom code, dont forget to | |
// use the tags, like <script> and <style> | |
// Multi level not tested, only one level. | |
// Warning this script will affect all of your checkbox filter, where you settinged up the "Group terms by parents" option. | |
// PREVIEW : https://prnt.sc/5fPJ6iebdDCy |
This file contains 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
// az elem, amire kattintva, szimulációt kell leadni az elementor Wp menü widgetre, add meg ezt az ID: triggerelement | |
// másold a kódot egy megfelelő js fájlba vagy használd az Elementor custom code funkciót | |
// verzió 1 csak kinyitás | |
<script> | |
document.addEventListener('DOMContentLoaded', function () { | |
var triggerElement = document.getElementById('triggerelement'); | |
if (triggerElement) { |
This file contains 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( 'jet-engine/register-macros', function(){ | |
class Current_User_Email extends \Jet_Engine_Base_Macros { | |
public function macros_tag() { | |
return 'current_user_email'; | |
} | |
public function macros_name() { | |
return 'Current user email'; |
This file contains 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
// place the code in the child theme functions.php or a custom code snippets plugin. | |
// how to use | |
// Create a new User Query in the Query builder. | |
// Go to the Include/exclude section | |
// Click the Dynamic tag icon, and select the WC Current User membership macro. In the text field write your membership ID and done. | |
// Include or Exclude can apply this macro. | |
// This macro will return the selected user id | |
// If the membership ID not exist, or not have user with selected ID membership active, will return | |
// My all Gist: https://gist.github.com/Lonsdale201 |
This file contains 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
// place the code in the child theme functions.php or a custom code snippets plugin. | |
// how to use | |
// Create a new User Query in the Query builder. | |
// Go to the Include/exclude section | |
// Click the Dynamic tag icon, and select the WC Current User memberships macro. In the text field write your membership IDs and done. | |
// this version can handle multiple memberip id's | |
// Include or Exclude can apply this macro. | |
// This macro will return the selected user id | |
// If the membership ID not exist, or not have user with selected ID membership active, will return | |
// My all Gist: https://gist.github.com/Lonsdale201 |
This file contains 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
// place the code in the child theme functions.php or a custom code snippets plugin. | |
// This macro will return the users who are purchased any product on your website (and can select the order status) | |
// how to use | |
// Create a new User Query in the Query builder. | |
// Go to the Include/exclude section | |
// Click the Dynamic tag icon, and select the WC User Purchased Any Product macro. In the select field choose the order status, or use the "All" option | |
// This macro will return the selected user id |
This file contains 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
// place the code in the child theme functions.php or a custom code snippets plugin. | |
// how to use | |
// Create a new Post Query in the Query builder. Select the post type: Course | |
// Go to the Meta Query section | |
// click the Add new button | |
// in the VALUE field choose the Dynamic tag icon, and select LD User Courses Access | |
// In the operator field select the "in the list" option | |
// HELP IMAGE : https://prnt.sc/3g_INGSx_yNb | |
// DONE |
This file contains 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
// place the code in the child theme functions.php or a custom code snippets plugin. | |
// how to use | |
// Create a new Post Query in the Query builder. Select the post type: Course | |
// Go to the Meta Query section | |
// click the Add new button | |
// in the VALUE field choose the Dynamic tag icon, and select LD Current User Courses and status | |
// Choose what type of progress you want to show | |
// In the operator field select the "in the list" option | |
// HELP IMAGE : https://prnt.sc/sIGKdV44yi51 | |
// DONE |
This file contains 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
// place the code in the child theme functions.php or a custom code snippets plugin. | |
// how to use | |
// Go to the Elementor Course single template | |
// Select your widget, or container whatever. | |
// Go to the advanced tab, select the JetEngine Dynamic visibility | |
// Scroll down under the list, where you find a new Learndash Category. | |
// Select the Current user purchased this course option | |
// Setup your logic: Show or hide | |
// So, this condition, based on the fact that the current user has purchased the course they are on. |
OlderNewer