Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dev.biuro
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Biuro
dev.biuro
Commits
f5bb8fcb
Commit
f5bb8fcb
authored
Nov 25, 2019
by
Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
in progress
parent
8c702379
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
62 deletions
+79
-62
functions.php
wp-content/themes/biuro/functions.php
+14
-15
single-job.php
wp-content/themes/biuro/single-job.php
+65
-47
No files found.
wp-content/themes/biuro/functions.php
View file @
f5bb8fcb
...
...
@@ -975,24 +975,23 @@ function getDivisions($ID) {
return
$wpdb
->
get_results
(
$sql
,
ARRAY_A
);
}
function
getCities
()
{
global
$wpdb
;
$langs
=
pll_the_languages
(
array
(
'raw'
=>
1
));
$langID
=
$langs
[
pll_current_language
(
'slug'
)][
'id'
];
$prefix
=
$wpdb
->
prefix
;
// function getCities() {
// global $wpdb;
// $langs = pll_the_languages(array('raw'=>1));
// $langID = $langs[pll_current_language('slug')]['id'];
// $prefix = $wpdb->prefix;
$cities
=
get_terms
(
array
(
'taxonomy'
=>
'city'
,
'hide_empty'
=>
false
,
)
);
delog
(
$wpdb
->
last_query
);
// $cities = get_terms( array(
// 'taxonomy' => 'city',
// 'hide_empty' => false,
// ) );
delog
(
'$cities'
);
debug
(
$cities
);
// delog($wpdb->last_query);
return
[];
// delog('$cities');
// debug($cities);
}
// return [];
// }
wp-content/themes/biuro/single-job.php
View file @
f5bb8fcb
...
...
@@ -29,7 +29,7 @@ get_header();
while
(
have_posts
()
)
:
?>
<meta
itemprop=
"datePosted"
content=
"
<?php
echo
get_the_date
();
?>
"
/>
<meta
itemprop=
"datePosted"
content=
"
<?php
echo
get_the_date
(
'Y-m-d'
);
?>
"
/>
<ul
class=
"c-breadcrumbs"
>
<li>
...
...
@@ -61,52 +61,7 @@ get_header();
</li>
</ul>
<?php
/*
<meta itemprop="title" content="Santechnikos darbų vadovas (-ė) (Vilniuje arba Klaipėdoje) - UAB „Soprana Personnel International“ | cv.lt" />
<meta itemprop="hiringOrganization" content="UAB „Soprana Personnel International“" />
<meta itemprop="jobLocation" content="Vilnius" />
<meta itemprop="description" content="Įmonė: UAB „Soprana Personnel International“, skelbimas galioja iki 2019-12-21" />
<meta itemprop="employmentType" content="FULL_TIME" />
<meta itemprop="url" content="https://www.cv.lt/statybos-darbai/santechnikos-darbu-vadovas-e-vilniuje-arba-klaipedoje-1-344562534?ref=share" />
<div itemprop="validThrough" content="2019-11-18 06:45:50">validThrough: <?php echo $pod->field( 'valid' ); ?> 23:59:59</div>
new DateTime($published))->format("%a")
if (!is_array($pod->field( 'salary_from' )) && $pod->field( 'salary_from' ) > 0 || !is_array($pod->field( 'salary_to' )) && $pod->field( 'salary_to' ) > 0):
if ($pod->field( 'salary_from' ) > 0 || $pod->field( 'salary_to' ) > 0):
?>
<b><?php _e('Salary', 'biuro'); ?>:</b>
<?php
if ($pod->field( 'salary_from' ) > 0):
echo __('from', 'biuro') . ' ' .$pod->field( 'salary_from' );
endif;
?>
<?php
if ($pod->field( 'salary_to' ) > 0):
echo __('to', 'biuro') . ' ' . $pod->field( 'salary_to' );
endif;
?>
<?php _e('(neto)', 'biuro'); ?>
<br>
<?php
endif;
endif;
$validPosition = date_i18n( 'Y-m-d', strtotime( $pod->field( 'valid' ) ) ) >= date('Y-m-d') ? true : false;
?>
<b><?php _e('Valid till', 'biuro'); ?>:</b> <?php echo date_i18n( get_option( 'date_format' ), strtotime( $pod->field( 'valid' ) ) ); ?>
</div>
*/
?>
<h1
class=
"c-job--title"
itemprop=
"title"
>
<?php
the_title
();
?>
</h1>
<?php
function
getCategory
(
$ID
,
$str
)
{
...
...
@@ -138,8 +93,31 @@ get_header();
return
$res
;
}
$jobLocations
=
get_the_terms
(
$ID
,
'city'
);
foreach
(
$jobLocations
as
&
$jobLocation
)
:
?>
<div
itemprop=
"jobLocation"
itemscope
itemtype=
"http://schema.org/Place"
>
<div
itemprop=
"address"
itemscope
itemtype=
"http://schema.org/PostalAddress"
>
<meta
itemprop=
"addressLocality"
content=
"
<?php
echo
$jobLocation
->
name
;
?>
"
/>
</div>
</div>
<?php
endforeach
;
$occupationalCategories
=
get_the_terms
(
$ID
,
'field'
);
foreach
(
$occupationalCategories
as
&
$occupationalCategory
)
:
echo
'<meta itemprop="occupationalCategory" content="'
.
$occupationalCategory
->
name
.
'" />'
;
endforeach
;
$employmentTypes
=
get_the_terms
(
$ID
,
'type'
);
foreach
(
$employmentTypes
as
&
$employmentType
)
:
echo
'<meta itemprop="employmentType" content="'
.
$employmentType
->
name
.
'" />'
;
endforeach
;
?>
<ul
class=
"c-categories"
>
<?php
$city
=
getCategory
(
$ID
,
'city'
);
...
...
@@ -147,7 +125,7 @@ get_header();
if
(
$city
[
'name'
]
!=
''
)
:
?>
<li>
<a
href=
"
<?php
echo
$city
[
'pageURL'
];
?>
"
>
<?php
echo
$city
[
'name'
];
?>
</a>
<a
href=
"
<?php
echo
$city
[
'pageURL'
];
?>
"
>
<?php
echo
$city
[
'name'
];
?>
</a>
</li>
<?php
endif
;
...
...
@@ -253,6 +231,46 @@ get_header();
$validPosition
=
date_i18n
(
'Y-m-d'
,
strtotime
(
$pod
->
field
(
'valid'
)
)
)
>=
date
(
'Y-m-d'
)
?
true
:
false
;
?>
<b>
<?php
_e
(
'Valid till'
,
'biuro'
);
?>
:
</b>
<time
itemprop=
"validThrough"
datetime=
"
<?php
echo
date_i18n
(
'Y-m-d'
,
strtotime
(
$pod
->
field
(
'valid'
)
)
);
?>
"
>
<?php
echo
date_i18n
(
get_option
(
'date_format'
),
strtotime
(
$pod
->
field
(
'valid'
)
)
);
?>
</time>
<?php
$organizationName
=
'UAB „Biuro“'
;
$organizationTelephone
=
'+37064902392'
;
$organizationEmail
=
'info@biuro.lt'
;
$organizationStreetAddress
=
'Gedimino pr. 26'
;
$organizationPostalCode
=
'LT-01104'
;
$organizationAddressLocality
=
'Vilnius, Lietuva'
;
$blogID
=
get_current_blog_id
();
if
(
$blogID
==
2
)
:
$organizationName
=
'UAB „Biuro“'
;
$organizationTelephone
=
'+37064902392'
;
$organizationEmail
=
'info@biuro.lt'
;
$organizationStreetAddress
=
'Gedimino pr. 26'
;
$organizationPostalCode
=
'LT-01104'
;
$organizationAddressLocality
=
'Vilnius, Lietuva'
;
endif
;
if
(
$blogID
==
3
)
:
$organizationName
=
'UAB „Biuro“'
;
$organizationTelephone
=
'+37064902392'
;
$organizationEmail
=
'info@biuro.lt'
;
$organizationStreetAddress
=
'Gedimino pr. 26'
;
$organizationPostalCode
=
'LT-01104'
;
$organizationAddressLocality
=
'Vilnius, Lietuva'
;
endif
;
?>
<div
itemprop=
"hiringOrganization"
itemscope
itemtype=
"http://schema.org/Organization"
>
<meta
itemprop=
"name"
content=
"
<?php
echo
$organizationName
;
?>
"
/>
<meta
itemprop=
"telephone"
content=
"
<?php
echo
$organizationTelephone
;
?>
"
/>
<meta
itemprop=
"email"
content=
"
<?php
echo
$organizationEmail
;
?>
"
/>
<div
itemprop=
"address"
itemscope
itemtype=
"http://schema.org/PostalAddress"
>
<meta
itemprop=
"streetAddress"
content=
"
<?php
echo
$organizationStreetAddress
;
?>
"
/>
<meta
itemprop=
"postalCode"
content=
"
<?php
echo
$organizationPostalCode
;
?>
"
/>
<meta
itemprop=
"addressLocality"
content=
"
<?php
echo
$organizationAddressLocality
;
?>
"
/>
</div>
</div>
</div>
<?php
...
...
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