Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apex_micro_site
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Ali Arshad
apex_micro_site
Commits
10d74bc3
Commit
10d74bc3
authored
Mar 01, 2018
by
Muhammad Usman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
courses by sub category
parent
e3298eec
Pipeline
#373
passed with stage
in 0 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
27 deletions
+39
-27
functions.php
WWW_DATA/wp-content/plugins/apex_global_lms/functions.php
+0
-15
learner-detail.php
...ntent/plugins/apex_global_lms/template/learner-detail.php
+39
-12
No files found.
WWW_DATA/wp-content/plugins/apex_global_lms/functions.php
View file @
10d74bc3
...
@@ -34,21 +34,6 @@ add_shortcode('vq_course_banner', 'vq_render_course_banner');
...
@@ -34,21 +34,6 @@ add_shortcode('vq_course_banner', 'vq_render_course_banner');
add_shortcode
(
'vq_lms_inquiry_form'
,
'vq_render_inquiry_form'
);
add_shortcode
(
'vq_lms_inquiry_form'
,
'vq_render_inquiry_form'
);
add_filter
(
'the_title'
,
'change_title'
);
function
change_title
(
$data
)
{
global
$post
;
$title
=
get_post_meta
(
$post
->
ID
,
'lms_title'
,
true
);
if
(
$title
!=
null
)
{
$data
=
$title
;
}
return
$data
;
}
add_action
(
'vq_course_promo_add_form_fields'
,
'add_course_promo'
,
10
,
2
);
add_action
(
'vq_course_promo_add_form_fields'
,
'add_course_promo'
,
10
,
2
);
add_action
(
'vq_course_promo_edit_form_fields'
,
'edit_course_promo'
,
10
,
2
);
add_action
(
'vq_course_promo_edit_form_fields'
,
'edit_course_promo'
,
10
,
2
);
add_action
(
'created_vq_course_promo'
,
'save_course_promo'
,
10
,
2
);
add_action
(
'created_vq_course_promo'
,
'save_course_promo'
,
10
,
2
);
...
...
WWW_DATA/wp-content/plugins/apex_global_lms/template/learner-detail.php
View file @
10d74bc3
...
@@ -28,6 +28,24 @@ $courses = new WP_Query(array(
...
@@ -28,6 +28,24 @@ $courses = new WP_Query(array(
'orderby'
=>
'title'
,
'orderby'
=>
'title'
,
'order'
=>
'ASC'
'order'
=>
'ASC'
));
));
$coursesArr
=
[];
while
(
$courses
->
have_posts
())
{
$courses
->
the_post
();
array_push
(
$coursesArr
,
array
(
"id"
=>
get_the_ID
(),
"name"
=>
get_the_title
(),
"cost"
=>
get_post_meta
(
get_the_ID
(),
'course_fee'
,
true
)
));
}
$categories
=
get_terms
(
array
(
'taxonomy'
=>
'vq_course_taxonomy'
,
'hide_empty'
=>
false
,
));
while
(
have_posts
())
:
while
(
have_posts
())
:
the_post
();
the_post
();
?>
?>
...
@@ -147,20 +165,29 @@ while (have_posts()):
...
@@ -147,20 +165,29 @@ while (have_posts()):
<
div
class
=
"lms-courses-select"
>
<
div
class
=
"lms-courses-select"
>
<
select
class
=
"form-control"
data
-
placeholder
=
"Select a course..."
>
<
select
class
=
"form-control"
data
-
placeholder
=
"Select a course..."
>
<
option
value
=
""
><
/option>
<
option
value
=
""
><
/option>
<?php
foreach
(
$categories
as
$term
)
:
?>
<?php
if
(
$term
->
parent
!=
0
)
:
?>
<
optgroup
label
=
"
<?php
echo
$term
->
name
;
?>
"
>
<?php
<?php
$coursesArr
=
[];
$args
=
array
(
while
(
$courses
->
have_posts
())
{
'post_type'
=>
'vq_course'
,
$courses
->
the_post
();
'posts_per_page'
=>
'-1'
,
array_push
(
$coursesArr
,
array
(
'tax_query'
=>
array
(
"id"
=>
get_the_ID
(),
array
(
"name"
=>
get_the_title
(),
'taxonomy'
=>
'vq_course_taxonomy'
,
"cost"
=>
get_post_meta
(
get_the_ID
(),
'course_fee'
,
true
)
'field'
=>
'slug'
,
));
'terms'
=>
$term
->
name
?>
),
<
option
value
=
"
<?php
the_ID
();
?>
"
>
<?php
the_title
();
?>
<
/option>
),
<?php
);
}
$list
=
new
WP_Query
(
$args
);
foreach
(
$list
->
posts
as
$crs
)
:
echo
"<option value='"
.
$crs
->
ID
.
"'>"
.
$crs
->
post_title
.
"</option>"
;
endforeach
;
?>
?>
<
/optgroup>
<?php
endif
;
?>
<?php
endforeach
;
?>
<
/select>
<
/select>
<
/div>
<
/div>
<
/div>
<
/div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment