Skip to content

Instantly share code, notes, and snippets.

View wpacademy's full-sized avatar

Mian Shahzad Raza wpacademy

View GitHub Profile
/*****************************
* Author: Mian Shahzad Raza
* Organization: WPAcademy.PK
* Description: Custom Styling for Resume Elementor Template by WP Academy
*****************************/
.wpac-custom-nav .elementor-icon-list-item a {
padding: 15px 10px;
}
.wpac-custom-nav .elementor-icon-list-item a:hover, .wpac-custom-nav .elementor-icon-list-item a.active{
background: #000;
@wpacademy
wpacademy / elementor-tab-icons.css
Created April 8, 2020 22:15
Add icons to default elementor tabs widget
/*-------------------------------------------------------------------------
* Elementor default tab widget does not have an option to use icons for tabs at the moment.
* But it will be too much to install a 3rd party addon just for a tabs widget to have icons in tabs.\
* We can add icons to default widget with just a little bit of CSS code.
* Copy below CSS code and add it your theme's stylesheet file or you can add it through Appearance > Customize > Additional CSS
* -------------------------------------------------------------------------
* Always use a custom class on any widget that you are going to customize
* We are using ".wpac-tab-icons" class on tabs widget
* -------------------------------------------------------------------------
*/
.wpac-custom-form ul.tml-links {
display: none;
}
.wpac-custom-login .elementor-section-wrap {
text-align: center;
}
.wpac-custom-form .tml .tml-field {
border: none;
border-bottom: 3px solid #dddddd;
background: transparent;
@wpacademy
wpacademy / forms-code.txt
Created March 9, 2020 11:07
Contact Form 7 Codes for WP Academy Forms Tutorial
/*--------------------------
| BOOKING FORM CODE
---------------------------*/
<p class="small-fields">[text* first-name class:small-txt-field placeholder "First Name"] [text* last-name class:small-txt-field placeholder "Last Name"]</p>
[email* user-email class:large-txt-field placeholder "someone@example.com"]
[tel* phone class:large-txt-field placeholder "+1-111-11111"]
[date* booking-date class:small-txt-field placeholder "Select Date"]
@wpacademy
wpacademy / forms-styles.css
Created March 9, 2020 11:02
Forms CSS code for WP Academy WordPress Forms Tutorial
.small-fields{
margin-bottom: 15px !important;
display: block;
height: auto;
overflow: hidden;
}
.small-fields span {
width: 50% !important;
float: left;
}
@wpacademy
wpacademy / learnpress-enroll-status.php
Last active August 30, 2022 06:06
Check if user has enrolled into any course at your LearnPress website.
<?php
/*
* Function to check if given user is enrolled into any course.
*/
function wpac_check_enrolled_user($user_id){
if (is_numeric($user_id)) {
//Global WordPress DB object
global $wpdb;