Weird WordPress style with do_shortcode and style sheet
-
I have very weird problem with do_shortcode and style sheet (CSS)
[ redundant link removed ] Above page has 2 exactly same shortcode which is below
[ld_course_list course_category_name=”english” col=4 progress_bar=true]
In the page, top one is straight shortcode above.
below one is exact shortcode with PHP snippet with if statement which is below
I am forced to use PHP code because I want to display different shortcode depending on a condition in if statement.<?php $curr_user_id = get_current_user_id(); // the value is 0 if the user isn't logged-in if ( $curr_user_id != 0 ) { // we know now the user is logged-in, so we can use his/her ID to get the user meta $um_value = get_user_meta( $curr_user_id, 'user_phone', true ); // now we check if the value is correct if ( ! empty( $um_value ) && $um_value == 'French' ) { echo do_shortcode('[ld_course_list course_category_name=french col=4 progress_bar=true]'); } else { echo do_shortcode('[ld_course_list course_category_name="english" col="4" progress_bar="true"]'); } } ?>
Not sure why they are showing up difference with missing elements. Any help would be appreciated.
Thank you.
The page I need help with: [log in to see the link]
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Weird WordPress style with do_shortcode and style sheet’ is closed to new replies.