Skip to content

Instantly share code, notes, and snippets.

View wpacademy's full-sized avatar

Mian Shahzad Raza wpacademy

View GitHub Profile
@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;
@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 / 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"]
.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 / 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
* -------------------------------------------------------------------------
*/
/*****************************
* 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 / custom.css
Created May 21, 2020 18:03
Elementor Custom Animations for Gaming Template
@keyframes bgcolor {
from {background-color: rgba(0,0,0,0);}
to {background-color: rgba(0,0,0,0.8);}
}
.wpac-custom-header.elementor-sticky--effects {
animation-name: bgcolor;
animation-duration: 1s;
animation-fill-mode: forwards;
}
@wpacademy
wpacademy / assets-list.txt
Created May 21, 2020 18:16
List of Assets & Graphics used in Gaming Template for Elementor
========================================================
+++++++++ List of Graphics/Assets used in the ++++++++++
+ Gaming Template https://wpactuts.com/websites/gaming +
========================================================
🎨 Slider / Main Backgrounds
1: https://pixabay.com/photos/forest-hirsch-sunbeam-wild-dark-4094246/
2: https://pixabay.com/illustrations/space-station-universe-travel-2114660/
3: https://pixabay.com/illustrations/tunnel-light-perspective-neon-3d-4701031/
4: https://www.pexels.com/photo/photo-of-dried-lava-983200/
@wpacademy
wpacademy / learnpress-courses-grid.css
Last active October 15, 2022 15:08
LearnPress Courses widget grid for elementor.
/**********************************
* LearnPress Courses Grid
* By WP Academy.PK
**********************************/
.wpac-learnpress-grid .widget-body {
text-align: center;
display: flex;
}
.wpac-learnpress-grid .widget-body .course-entry {
text-align: center;
===============================================================
++++++++++++ List of Graphics/Assets used in the +++++++++++++
+ Restaurant Template https://wpactuts.com/websites/fast-food +
===============================================================
🎨 Banners & Images
https://www.pexels.com/photo/tomato-burger-and-fried-fries-1600727/
https://pixabay.com/photos/food-steak-meat-soup-beef-bbq-3676796/
https://www.pexels.com/photo/selective-focus-photography-of-pile-of-burgers-3566357/
https://pixabay.com/photos/burger-food-delicious-meat-tomato-5224497/