Commit d5274012 authored by Simonas's avatar Simonas

job listing by taxonomies

parent 4f4170b9
</div><!-- #custom -->
</div><!-- .container -->
</div><!-- .advert_page -->
<?php
/*
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-THF42F"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-THF42F');</script>
*/
if ( is_active_sidebar( 'append_area' ) ) :
dynamic_sidebar( 'append_area' );
endif;
?>
<script async src="/wp-content/themes/biuro/js/main.js"></script>
<script src="/wp-content/themes/biuro/_js/main.min.js" async></script>
</body>
</html>
<?php
$type = get_post_type( get_the_ID() );
?>
<?php
if ($type == 'page'):
?>
<?php
/*
<!--
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-116106305-1"></script>
<script>
// window.dataLayer = window.dataLayer || [];
// function gtag(){dataLayer.push(arguments);}
// gtag('js', new Date());
// gtag('config', 'UA-116106305-1');
</script>
-->
<footer role="contentinfo" class="l-footer">
footer goes here
</footer>
<?php wp_footer(); ?>
<script src="/wp-content/themes/biuro/js/main.js" async></script>
</body>
</html>
*/
?>
</div> </div>
...@@ -54,19 +16,9 @@ ...@@ -54,19 +16,9 @@
</div> </div>
<?php elseif ($type == 'job'): ?>
</div><!-- #advert_page -->
</div><!-- .container -->
</div><!-- #custom -->
<?php endif; ?>
<?php <?php
/* /*
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-THF42F" <noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-THF42F"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
...@@ -83,8 +35,6 @@ ...@@ -83,8 +35,6 @@
endif; endif;
?> ?>
<script> <script>
var coords = eval('') || null; var coords = eval('') || null;
</script> </script>
......
<?php
/**
* The front page template file
*
* If the user has selected a static page for their homepage, this is what will
* appear.
* Learn more: https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Biuro
* @since 1.0
* @version 1.0
*/
get_header(); ?>
<?php
// $slug = pods_v( 'last', 'url' );
// echo '<p><b>slug:</b> ' . $slug . '</p>';
// //get pods object for current item
// $pods = pods( 'job' );
// debug( $pods->data() );
// $jobs = new WP_Query( array( 'post_type' => 'job' ) );
if ( $jobs->have_posts() ) :
while ( $jobs->have_posts() ) :
echo '<h1>Lorem ipsum</h1>';
debug( $jobs->the_post() );
endwhile;
endif;
wp_reset_query();
// $jobs = new WP_Query( array( 'post_type' => 'job' ) );
// debug( $jobs->posts );
// foreach ( $jobs->posts as $key=> $job ) {
// echo '<p>' . get_the_terms( $job, 'city' ) . '</p>';
// }
while ( have_posts() ) :
the_post();
the_content();
endwhile;
?>
<?php get_footer();
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<?php
include 'content/meta.html';
?>
<?php
include 'content/icons.html';
?>
<meta name="google-site-verification" content="Xlpzg6WVpXXrivwjXrOaEzjxZQcPP2x0oCoUizYyCDM" />
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<style><?php include 'css/core.min.css'; ?></style>
<link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
</noscript>
<?php wp_head(); ?>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" class="u-hidden">
<symbol id="biuro-logo" viewBox="0 0 108 63">
<title>Biuro</title>
<path d="M12.91 39.688L11.1 39.686v11.7h1.809c0.375 0 0.693-0.131 0.959-0.396 c0.264-0.263 0.398-0.584 0.398-0.962v-8.984c0-0.375-0.134-0.695-0.398-0.963C13.603 39.8 13.3 39.7 12.9 39.688z M63.684 23.92h-1.809v11.358h1.809c0.376 0 0.696-0.132 0.96-0.396c0.264-0.261 0.396-0.583 0.396-0.96v-8.645 c0-0.378-0.133-0.698-0.396-0.961C64.38 24.1 64.1 23.9 63.7 23.92z M12.91 23.92H11.1v9.608h1.809 c0.375 0 0.693-0.133 0.959-0.398c0.264-0.263 0.398-0.583 0.398-0.958v-6.896c0-0.378-0.134-0.698-0.398-0.961 C13.603 24.1 13.3 23.9 12.9 23.92z M107.216 7.496c-0.907-1.476-3.211-2.783-5.211-1.261l-12.774 9.1 c-0.426 0.014-0.844-0.206-1.058-0.607c-0.122-0.231-0.15-0.481-0.113-0.719l4.428-7.936c0.695-1.001 0.869-1.489 0.869-2.434 c0-1.856-1.621-3.525-3.477-3.525c-0.26 0-0.673-0.127-0.916-0.07H4.752C2.127 0 0 2.1 0 4.766V57.5 c0 2.6 2.1 4.8 4.8 4.752h98.176c2.627 0 4.753-2.128 4.753-4.752V8.919C107.641 8.4 107.5 8 107.2 7.496z M38.126 9.543c1.664 0 3 1.4 3 3.019c0 1.665-1.351 3.015-3.015 3.015c-1.666 0-3.017-1.35-3.017-3.015 C35.109 10.9 36.5 9.5 38.1 9.543z M27.623 9.543c1.666 0 3 1.4 3 3.019c0 1.665-1.352 3.015-3.018 3 c-1.665 0-3.017-1.35-3.017-3.015C24.606 10.9 26 9.5 27.6 9.543z M20.876 30.647c0 1.732-0.528 3.182-1.581 4.3 c-0.567 0.602-1.242 1.093-2.035 1.471c0.828 0.3 1.5 0.7 2 1.242c0.528 0.5 0.9 1.1 1.2 1.9 c0.263 0.7 0.4 1.5 0.4 2.371v8.365c0 0.98-0.188 1.901-0.564 2.768c-0.377 0.867-0.885 1.622-1.526 2.3 c-0.642 0.642-1.392 1.151-2.259 1.528c-0.867 0.374-1.792 0.564-2.769 0.564H5.28c-0.527 0-0.79-0.265-0.79-0.792V18.664 c0-0.525 0.262-0.79 0.79-0.79h8.478c0.976 0 1.9 0.2 2.8 0.565c0.867 0.4 1.6 0.9 2.3 1.5 c0.642 0.6 1.1 1.4 1.5 2.261c0.377 0.9 0.6 1.8 0.6 2.77V30.647z M31.067 56.193c0 0.529-0.264 0.792-0.789 0.8 h-5.031c-0.529 0-0.791-0.263-0.791-0.792V18.654c0-0.529 0.262-0.791 0.791-0.791h5.031c0.525 0 0.8 0.3 0.8 0.791V56.193z M51.261 50.706c0 0.981-0.189 1.904-0.566 2.77c-0.377 0.866-0.884 1.62-1.524 2.261c-0.645 0.64-1.396 1.148-2.261 1.5 c-0.868 0.374-1.792 0.563-2.771 0.563h-2.145c-0.982 0-1.907-0.189-2.771-0.563c-0.867-0.378-1.619-0.887-2.258-1.526 c-0.643-0.641-1.151-1.395-1.526-2.261c-0.377-0.865-0.566-1.788-0.566-2.77v-21.23c-0.005-0.054-0.022-0.1-0.022-0.157V18.654 c0-0.529 0.264-0.791 0.791-0.791h5.03c0.527 0 0.8 0.3 0.8 0.791v10.082c0.008 0 0 0.1 0 0.146v21.542 c0 0.4 0.1 0.7 0.4 0.962c0.262 0.3 0.6 0.4 1 0.395h0.453c0.375 0 0.697-0.13 0.961-0.395 c0.261-0.265 0.393-0.585 0.393-0.962V18.836c0-0.526 0.264-0.791 0.793-0.791h5.029c0.527 0 0.8 0.3 0.8 0.791V50.706z M72.216 57.433h-5.142c-0.225 0-0.442-0.077-0.65-0.227c-0.208-0.15-0.35-0.337-0.425-0.565l-4.125-13.845v14.637l-0.055-0.564 c-0.078 0.374-0.321 0.564-0.735 0.564h-5.031c-0.527 0-0.791-0.262-0.791-0.792V18.664c0-0.525 0.264-0.79 0.791-0.79h8.478 c0.979 0 1.9 0.2 2.8 0.565c0.867 0.4 1.6 0.9 2.3 1.524c0.641 0.6 1.1 1.4 1.5 2.3 c0.377 0.9 0.6 1.8 0.6 2.77v9.212c0 1.393-0.359 2.647-1.074 3.757c-0.718 1.111-1.657 1.97-2.826 2.572l5.029 16.1 C72.896 57.2 72.7 57.4 72.2 57.433z M91.941 50.706c0 0.981-0.188 1.904-0.565 2.77c-0.379 0.866-0.883 1.62-1.528 2.3 c-0.64 0.64-1.393 1.148-2.259 1.526c-0.864 0.374-1.79 0.563-2.769 0.563h-2.147c-0.979 0-1.904-0.189-2.769-0.563 c-0.869-0.378-1.621-0.887-2.261-1.526c-0.641-0.641-1.15-1.395-1.523-2.261c-0.379-0.865-0.566-1.788-0.566-2.77V24.598 c0-0.979 0.188-1.901 0.566-2.767c0.373-0.867 0.883-1.62 1.523-2.263c0.64-0.639 1.392-1.147 2.261-1.524 c0.864-0.377 1.789-0.565 2.769-0.565h2.147c0.979 0 1.9 0.2 2.8 0.565c0.866 0.4 1.6 0.9 2.3 1.5 c0.645 0.6 1.1 1.4 1.5 2.263c0.377 0.9 0.6 1.8 0.6 2.767V50.706z M83.972 23.525h-0.453 c-0.377 0-0.696 0.134-0.959 0.396c-0.265 0.264-0.396 0.585-0.396 0.961v25.543c0 0.4 0.1 0.7 0.4 1 c0.263 0.3 0.6 0.4 1 0.395h0.453c0.376 0 0.695-0.13 0.96-0.395c0.266-0.265 0.396-0.585 0.396-0.962V24.881 c0-0.376-0.131-0.697-0.396-0.961C84.668 23.7 84.3 23.5 84 23.525z" style="fill: #006957"/>
</symbol>
</svg>
<div class="advert_page">
<div class="container">
<div id="custom">
...@@ -36,61 +36,7 @@ ...@@ -36,61 +36,7 @@
</symbol> </symbol>
</svg> </svg>
<?php
$type = get_post_type( get_the_ID() );
/*
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<?php
include 'content/meta.html';
?>
<?php
include 'content/icons.html';
?>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<style><?php include 'css/core.min.css'; ?></style>
<link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
</noscript>
<?php wp_head(); ?>
</head>
<body>
<header role="banner" class="l-header">
<a href="/" class="c-logo" title="">
<?php include 'content/logo.svg'; ?>
</a>
</header>
<nav role="navigation" class="l-nav">
<ul class="o-nav c-nav">
<li class="o-nav--item c-nav--item">
<a href="/" class="o-nav--link c-nav--link is-nav-link-active">Lorem ispum</a>
</li>
<li class="o-nav--item c-nav--item">
<a href="/" class="o-nav--link c-nav--link">Noster apster</a>
</li>
</ul>
</nav>
*/
?>
<?php
if ($type == 'page'):
?>
<div id="main" class="main"> <div id="main" class="main">
...@@ -237,23 +183,53 @@ ...@@ -237,23 +183,53 @@
<div id="content"> <div id="content">
<?php elseif ($type == 'job'): ?>
<div class="advert_page"> <?php
/*
<div class="container"> <head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<div id="custom"> <?php
include 'content/meta.html';
?>
<div class="biuro-header"> <?php
<div class="logo"> include 'content/icons.html';
<a href="<?php echo pll_home_url(); ?>" title="<?php echo get_the_title( get_option('page_on_front') ); ?>"> ?>
<svg width="133px" height="78px">
<use xlink:href="#biuro-logo"></use> <link rel="profile" href="http://gmpg.org/xfn/11">
</svg> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
</a>
</div> <style><?php include 'css/core.min.css'; ?></style>
<p>BIURO - padedame, kai labiausiai reikia. Paprastas ir greitas laikinasis įdarbinimas.</p>
</div> <link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
</noscript>
<?php wp_head(); ?>
</head>
<body>
<header role="banner" class="l-header">
<a href="/" class="c-logo" title="">
<?php include 'content/logo.svg'; ?>
</a>
</header>
<nav role="navigation" class="l-nav">
<ul class="o-nav c-nav">
<li class="o-nav--item c-nav--item">
<a href="/" class="o-nav--link c-nav--link is-nav-link-active">Lorem ispum</a>
</li>
<li class="o-nav--item c-nav--item">
<a href="/" class="o-nav--link c-nav--link">Noster apster</a>
</li>
</ul>
</nav>
<?php endif; ?> */
?>
...@@ -17,16 +17,6 @@ ...@@ -17,16 +17,6 @@
get_header(); ?> get_header(); ?>
<?php
if (get_post_type( get_the_ID() ) == 'job'):
?>
<div class="biuro-title">
<h1><span>IEŠKOME UŽSAKYMŲ KOMPLEKTUOTOJŲ! GALIMYBĖ UŽSIDIRBTI 1020 EUR Į RANKAS!</span></h1>
</div>
<?php
endif;
?>
<?php <?php
while ( have_posts() ) : while ( have_posts() ) :
...@@ -40,21 +30,29 @@ get_header(); ?> ...@@ -40,21 +30,29 @@ get_header(); ?>
<?php <?php
/* /*
<main class="l-main" role="main"> <!--
<h1>index.php</h1> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-116106305-1"></script>
<p>main</p> <script>
<hr > // window.dataLayer = window.dataLayer || [];
// function gtag(){dataLayer.push(arguments);}
// gtag('js', new Date());
// gtag('config', 'UA-116106305-1');
</script>
-->
<?php the_title( '<h1>', '</h1>' ); ?> <footer role="contentinfo" class="l-footer">
<?php the_content(); ?> footer goes here
</footer>
</main> <?php wp_footer(); ?>
<aside role="complementary" class="l-aside"> <script src="/wp-content/themes/biuro/js/main.js" async></script>
<p>aside</p> </body>
</aside> </html>
*/ */
?> ?>
<?php get_footer(); <?php get_footer();
<?php
/**
* Template Name: Jobs listing
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Biuro
* @since 1.0
* @version 1.0
*/
get_header(); ?>
<?php
// Use for search
// https://pods.io/docs/code/pods/find/
while ( have_posts() ) :
the_post();
the_content();
endwhile;
?>
<?php
$ID = get_the_ID();
$keys = get_post_custom_keys();
$taxonomies = array();
foreach ( $keys as $key => $value ) {
$val = trim($value);
$taxonomy = substr($val, 20);
if ( '_' == $val{0} || substr($val, 0, 20) != 'built_in_taxonomies_' || !$taxonomy):
continue;
endif;
$res = get_post_custom_values( $val, $ID );
if ( !$res ) {
continue;
}
$term = $res[0];
if ( !$term ) {
continue;
}
$taxonomies[] = array(
'taxonomy' => $taxonomy,
'field' => 'slug',
'terms' => $term
);
}
$jobs = get_posts( array(
'posts_per_page' => -1,
'post_type' => 'job',
'tax_query' => $taxonomies
) );
// debug($jobs);
foreach ($jobs as $job) :
echo '<h3><a href="' . get_post_permalink( $job->ID ) . '" target="_blank">' . $job->post_title . '</a></h3>';
endforeach;
?>
<?php get_footer();
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Biuro
* @since 1.0
* @version 1.0
*/
get_header('job'); ?>
<div class="biuro-header">
<div class="logo">
<a href="<?php echo pll_home_url(); ?>" title="<?php echo get_the_title( get_option('page_on_front') ); ?>">
<svg width="133px" height="78px">
<use xlink:href="#biuro-logo"></use>
</svg>
</a>
</div><!-- .logo -->
<p>BIURO - padedame, kai labiausiai reikia. Paprastas ir greitas laikinasis įdarbinimas.</p>
</div><!-- .biuro-header -->
<?php
while ( have_posts() ) :
?>
<div class="biuro-title">
<h1><span><?php the_title(); ?></span></h1>
</div><!-- .biuro-title -->
<?php
the_post();
the_content();
endwhile;
?>
<?php get_footer('job');
<!--
<link rel="apple-touch-icon" sizes="180x180" href="/wp-content/themes/biuro/i/icons/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="180x180" href="/wp-content/themes/biuro/i/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/wp-content/themes/biuro/i/icons/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="32x32" href="/wp-content/themes/biuro/i/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/wp-content/themes/biuro/i/icons/favicon-16x16.png"> <link rel="icon" type="image/png" sizes="16x16" href="/wp-content/themes/biuro/i/icons/favicon-16x16.png">
...@@ -7,3 +8,4 @@ ...@@ -7,3 +8,4 @@
<meta name="msapplication-TileColor" content="#fcfcfc"> <meta name="msapplication-TileColor" content="#fcfcfc">
<meta name="msapplication-config" content="/wp-content/themes/biuro/i/icons/browserconfig.xml"> <meta name="msapplication-config" content="/wp-content/themes/biuro/i/icons/browserconfig.xml">
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
-->
<!--
<link rel="apple-touch-icon" sizes="180x180" href="/wp-content/themes/biuro/i/icons/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="180x180" href="/wp-content/themes/biuro/i/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/wp-content/themes/biuro/i/icons/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="32x32" href="/wp-content/themes/biuro/i/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/wp-content/themes/biuro/i/icons/favicon-16x16.png"> <link rel="icon" type="image/png" sizes="16x16" href="/wp-content/themes/biuro/i/icons/favicon-16x16.png">
...@@ -7,3 +8,4 @@ ...@@ -7,3 +8,4 @@
<meta name="msapplication-TileColor" content="#fcfcfc"> <meta name="msapplication-TileColor" content="#fcfcfc">
<meta name="msapplication-config" content="/wp-content/themes/biuro/i/icons/browserconfig.xml"> <meta name="msapplication-config" content="/wp-content/themes/biuro/i/icons/browserconfig.xml">
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
-->
</div><!-- #custom -->
</div><!-- .container -->
</div><!-- .advert_page -->
<?php
/*
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-THF42F"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-THF42F');</script>
*/
if ( is_active_sidebar( 'append_area' ) ) :
dynamic_sidebar( 'append_area' );
endif;
?>
<script async src="/wp-content/themes/biuro/js/main.js"></script>
<script src="/wp-content/themes/biuro/_js/main.min.js" async></script>
</body>
</html>
<?php
$type = get_post_type( get_the_ID() );
?>
<?php
if ($type == 'page'):
?>
<?php
/*
<!--
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-116106305-1"></script>
<script>
// window.dataLayer = window.dataLayer || [];
// function gtag(){dataLayer.push(arguments);}
// gtag('js', new Date());
// gtag('config', 'UA-116106305-1');
</script>
-->
<footer role="contentinfo" class="l-footer">
footer goes here
</footer>
<?php wp_footer(); ?>
<script src="/wp-content/themes/biuro/js/main.js" async></script>
</body>
</html>
*/
?>
</div> </div>
...@@ -54,19 +16,9 @@ ...@@ -54,19 +16,9 @@
</div> </div>
<?php elseif ($type == 'job'): ?>
</div><!-- #advert_page -->
</div><!-- .container -->
</div><!-- #custom -->
<?php endif; ?>
<?php <?php
/* /*
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-THF42F" <noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-THF42F"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
...@@ -83,8 +35,6 @@ ...@@ -83,8 +35,6 @@
endif; endif;
?> ?>
<script> <script>
var coords = eval('') || null; var coords = eval('') || null;
</script> </script>
......
<?php
/**
* The front page template file
*
* If the user has selected a static page for their homepage, this is what will
* appear.
* Learn more: https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Biuro
* @since 1.0
* @version 1.0
*/
get_header(); ?>
<?php
// $slug = pods_v( 'last', 'url' );
// echo '<p><b>slug:</b> ' . $slug . '</p>';
// //get pods object for current item
// $pods = pods( 'job' );
// debug( $pods->data() );
// $jobs = new WP_Query( array( 'post_type' => 'job' ) );
if ( $jobs->have_posts() ) :
while ( $jobs->have_posts() ) :
echo '<h1>Lorem ipsum</h1>';
debug( $jobs->the_post() );
endwhile;
endif;
wp_reset_query();
// $jobs = new WP_Query( array( 'post_type' => 'job' ) );
// debug( $jobs->posts );
// foreach ( $jobs->posts as $key=> $job ) {
// echo '<p>' . get_the_terms( $job, 'city' ) . '</p>';
// }
while ( have_posts() ) :
the_post();
the_content();
endwhile;
?>
<?php get_footer();
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<?php
include 'content/meta.html';
?>
<?php
include 'content/icons.html';
?>
<meta name="google-site-verification" content="Xlpzg6WVpXXrivwjXrOaEzjxZQcPP2x0oCoUizYyCDM" />
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<style><?php include 'css/core.min.css'; ?></style>
<link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
</noscript>
<?php wp_head(); ?>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" class="u-hidden">
<symbol id="biuro-logo" viewBox="0 0 108 63">
<title>Biuro</title>
<path d="M12.91 39.688L11.1 39.686v11.7h1.809c0.375 0 0.693-0.131 0.959-0.396 c0.264-0.263 0.398-0.584 0.398-0.962v-8.984c0-0.375-0.134-0.695-0.398-0.963C13.603 39.8 13.3 39.7 12.9 39.688z M63.684 23.92h-1.809v11.358h1.809c0.376 0 0.696-0.132 0.96-0.396c0.264-0.261 0.396-0.583 0.396-0.96v-8.645 c0-0.378-0.133-0.698-0.396-0.961C64.38 24.1 64.1 23.9 63.7 23.92z M12.91 23.92H11.1v9.608h1.809 c0.375 0 0.693-0.133 0.959-0.398c0.264-0.263 0.398-0.583 0.398-0.958v-6.896c0-0.378-0.134-0.698-0.398-0.961 C13.603 24.1 13.3 23.9 12.9 23.92z M107.216 7.496c-0.907-1.476-3.211-2.783-5.211-1.261l-12.774 9.1 c-0.426 0.014-0.844-0.206-1.058-0.607c-0.122-0.231-0.15-0.481-0.113-0.719l4.428-7.936c0.695-1.001 0.869-1.489 0.869-2.434 c0-1.856-1.621-3.525-3.477-3.525c-0.26 0-0.673-0.127-0.916-0.07H4.752C2.127 0 0 2.1 0 4.766V57.5 c0 2.6 2.1 4.8 4.8 4.752h98.176c2.627 0 4.753-2.128 4.753-4.752V8.919C107.641 8.4 107.5 8 107.2 7.496z M38.126 9.543c1.664 0 3 1.4 3 3.019c0 1.665-1.351 3.015-3.015 3.015c-1.666 0-3.017-1.35-3.017-3.015 C35.109 10.9 36.5 9.5 38.1 9.543z M27.623 9.543c1.666 0 3 1.4 3 3.019c0 1.665-1.352 3.015-3.018 3 c-1.665 0-3.017-1.35-3.017-3.015C24.606 10.9 26 9.5 27.6 9.543z M20.876 30.647c0 1.732-0.528 3.182-1.581 4.3 c-0.567 0.602-1.242 1.093-2.035 1.471c0.828 0.3 1.5 0.7 2 1.242c0.528 0.5 0.9 1.1 1.2 1.9 c0.263 0.7 0.4 1.5 0.4 2.371v8.365c0 0.98-0.188 1.901-0.564 2.768c-0.377 0.867-0.885 1.622-1.526 2.3 c-0.642 0.642-1.392 1.151-2.259 1.528c-0.867 0.374-1.792 0.564-2.769 0.564H5.28c-0.527 0-0.79-0.265-0.79-0.792V18.664 c0-0.525 0.262-0.79 0.79-0.79h8.478c0.976 0 1.9 0.2 2.8 0.565c0.867 0.4 1.6 0.9 2.3 1.5 c0.642 0.6 1.1 1.4 1.5 2.261c0.377 0.9 0.6 1.8 0.6 2.77V30.647z M31.067 56.193c0 0.529-0.264 0.792-0.789 0.8 h-5.031c-0.529 0-0.791-0.263-0.791-0.792V18.654c0-0.529 0.262-0.791 0.791-0.791h5.031c0.525 0 0.8 0.3 0.8 0.791V56.193z M51.261 50.706c0 0.981-0.189 1.904-0.566 2.77c-0.377 0.866-0.884 1.62-1.524 2.261c-0.645 0.64-1.396 1.148-2.261 1.5 c-0.868 0.374-1.792 0.563-2.771 0.563h-2.145c-0.982 0-1.907-0.189-2.771-0.563c-0.867-0.378-1.619-0.887-2.258-1.526 c-0.643-0.641-1.151-1.395-1.526-2.261c-0.377-0.865-0.566-1.788-0.566-2.77v-21.23c-0.005-0.054-0.022-0.1-0.022-0.157V18.654 c0-0.529 0.264-0.791 0.791-0.791h5.03c0.527 0 0.8 0.3 0.8 0.791v10.082c0.008 0 0 0.1 0 0.146v21.542 c0 0.4 0.1 0.7 0.4 0.962c0.262 0.3 0.6 0.4 1 0.395h0.453c0.375 0 0.697-0.13 0.961-0.395 c0.261-0.265 0.393-0.585 0.393-0.962V18.836c0-0.526 0.264-0.791 0.793-0.791h5.029c0.527 0 0.8 0.3 0.8 0.791V50.706z M72.216 57.433h-5.142c-0.225 0-0.442-0.077-0.65-0.227c-0.208-0.15-0.35-0.337-0.425-0.565l-4.125-13.845v14.637l-0.055-0.564 c-0.078 0.374-0.321 0.564-0.735 0.564h-5.031c-0.527 0-0.791-0.262-0.791-0.792V18.664c0-0.525 0.264-0.79 0.791-0.79h8.478 c0.979 0 1.9 0.2 2.8 0.565c0.867 0.4 1.6 0.9 2.3 1.524c0.641 0.6 1.1 1.4 1.5 2.3 c0.377 0.9 0.6 1.8 0.6 2.77v9.212c0 1.393-0.359 2.647-1.074 3.757c-0.718 1.111-1.657 1.97-2.826 2.572l5.029 16.1 C72.896 57.2 72.7 57.4 72.2 57.433z M91.941 50.706c0 0.981-0.188 1.904-0.565 2.77c-0.379 0.866-0.883 1.62-1.528 2.3 c-0.64 0.64-1.393 1.148-2.259 1.526c-0.864 0.374-1.79 0.563-2.769 0.563h-2.147c-0.979 0-1.904-0.189-2.769-0.563 c-0.869-0.378-1.621-0.887-2.261-1.526c-0.641-0.641-1.15-1.395-1.523-2.261c-0.379-0.865-0.566-1.788-0.566-2.77V24.598 c0-0.979 0.188-1.901 0.566-2.767c0.373-0.867 0.883-1.62 1.523-2.263c0.64-0.639 1.392-1.147 2.261-1.524 c0.864-0.377 1.789-0.565 2.769-0.565h2.147c0.979 0 1.9 0.2 2.8 0.565c0.866 0.4 1.6 0.9 2.3 1.5 c0.645 0.6 1.1 1.4 1.5 2.263c0.377 0.9 0.6 1.8 0.6 2.767V50.706z M83.972 23.525h-0.453 c-0.377 0-0.696 0.134-0.959 0.396c-0.265 0.264-0.396 0.585-0.396 0.961v25.543c0 0.4 0.1 0.7 0.4 1 c0.263 0.3 0.6 0.4 1 0.395h0.453c0.376 0 0.695-0.13 0.96-0.395c0.266-0.265 0.396-0.585 0.396-0.962V24.881 c0-0.376-0.131-0.697-0.396-0.961C84.668 23.7 84.3 23.5 84 23.525z" style="fill: #006957"/>
</symbol>
</svg>
<div class="advert_page">
<div class="container">
<div id="custom">
...@@ -36,61 +36,7 @@ ...@@ -36,61 +36,7 @@
</symbol> </symbol>
</svg> </svg>
<?php
$type = get_post_type( get_the_ID() );
/*
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<?php
include 'content/meta.html';
?>
<?php
include 'content/icons.html';
?>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<style><?php include 'css/core.min.css'; ?></style>
<link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
</noscript>
<?php wp_head(); ?>
</head>
<body>
<header role="banner" class="l-header">
<a href="/" class="c-logo" title="">
<?php include 'content/logo.svg'; ?>
</a>
</header>
<nav role="navigation" class="l-nav">
<ul class="o-nav c-nav">
<li class="o-nav--item c-nav--item">
<a href="/" class="o-nav--link c-nav--link is-nav-link-active">Lorem ispum</a>
</li>
<li class="o-nav--item c-nav--item">
<a href="/" class="o-nav--link c-nav--link">Noster apster</a>
</li>
</ul>
</nav>
*/
?>
<?php
if ($type == 'page'):
?>
<div id="main" class="main"> <div id="main" class="main">
...@@ -237,23 +183,53 @@ ...@@ -237,23 +183,53 @@
<div id="content"> <div id="content">
<?php elseif ($type == 'job'): ?>
<div class="advert_page"> <?php
/*
<div class="container"> <head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<div id="custom"> <?php
include 'content/meta.html';
?>
<div class="biuro-header"> <?php
<div class="logo"> include 'content/icons.html';
<a href="<?php echo pll_home_url(); ?>" title="<?php echo get_the_title( get_option('page_on_front') ); ?>"> ?>
<svg width="133px" height="78px">
<use xlink:href="#biuro-logo"></use> <link rel="profile" href="http://gmpg.org/xfn/11">
</svg> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
</a>
</div> <style><?php include 'css/core.min.css'; ?></style>
<p>BIURO - padedame, kai labiausiai reikia. Paprastas ir greitas laikinasis įdarbinimas.</p>
</div> <link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
</noscript>
<?php wp_head(); ?>
</head>
<body>
<header role="banner" class="l-header">
<a href="/" class="c-logo" title="">
<?php include 'content/logo.svg'; ?>
</a>
</header>
<nav role="navigation" class="l-nav">
<ul class="o-nav c-nav">
<li class="o-nav--item c-nav--item">
<a href="/" class="o-nav--link c-nav--link is-nav-link-active">Lorem ispum</a>
</li>
<li class="o-nav--item c-nav--item">
<a href="/" class="o-nav--link c-nav--link">Noster apster</a>
</li>
</ul>
</nav>
<?php endif; ?> */
?>
...@@ -17,16 +17,6 @@ ...@@ -17,16 +17,6 @@
get_header(); ?> get_header(); ?>
<?php
if (get_post_type( get_the_ID() ) == 'job'):
?>
<div class="biuro-title">
<h1><span>IEŠKOME UŽSAKYMŲ KOMPLEKTUOTOJŲ! GALIMYBĖ UŽSIDIRBTI 1020 EUR Į RANKAS!</span></h1>
</div>
<?php
endif;
?>
<?php <?php
while ( have_posts() ) : while ( have_posts() ) :
...@@ -40,21 +30,29 @@ get_header(); ?> ...@@ -40,21 +30,29 @@ get_header(); ?>
<?php <?php
/* /*
<main class="l-main" role="main"> <!--
<h1>index.php</h1> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-116106305-1"></script>
<p>main</p> <script>
<hr > // window.dataLayer = window.dataLayer || [];
// function gtag(){dataLayer.push(arguments);}
// gtag('js', new Date());
// gtag('config', 'UA-116106305-1');
</script>
-->
<?php the_title( '<h1>', '</h1>' ); ?> <footer role="contentinfo" class="l-footer">
<?php the_content(); ?> footer goes here
</footer>
</main> <?php wp_footer(); ?>
<aside role="complementary" class="l-aside"> <script src="/wp-content/themes/biuro/js/main.js" async></script>
<p>aside</p> </body>
</aside> </html>
*/ */
?> ?>
<?php get_footer(); <?php get_footer();
<?php
/**
* Template Name: Jobs listing
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Biuro
* @since 1.0
* @version 1.0
*/
get_header(); ?>
<?php
// Use for search
// https://pods.io/docs/code/pods/find/
while ( have_posts() ) :
the_post();
the_content();
endwhile;
?>
<?php
$ID = get_the_ID();
$keys = get_post_custom_keys();
$taxonomies = array();
foreach ( $keys as $key => $value ) {
$val = trim($value);
$taxonomy = substr($val, 20);
if ( '_' == $val{0} || substr($val, 0, 20) != 'built_in_taxonomies_' || !$taxonomy):
continue;
endif;
$res = get_post_custom_values( $val, $ID );
if ( !$res ) {
continue;
}
$term = $res[0];
if ( !$term ) {
continue;
}
$taxonomies[] = array(
'taxonomy' => $taxonomy,
'field' => 'slug',
'terms' => $term
);
}
$jobs = get_posts( array(
'posts_per_page' => -1,
'post_type' => 'job',
'tax_query' => $taxonomies
) );
// debug($jobs);
foreach ($jobs as $job) :
echo '<h3><a href="' . get_post_permalink( $job->ID ) . '" target="_blank">' . $job->post_title . '</a></h3>';
endforeach;
?>
<?php get_footer();
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Biuro
* @since 1.0
* @version 1.0
*/
get_header('job'); ?>
<div class="biuro-header">
<div class="logo">
<a href="<?php echo pll_home_url(); ?>" title="<?php echo get_the_title( get_option('page_on_front') ); ?>">
<svg width="133px" height="78px">
<use xlink:href="#biuro-logo"></use>
</svg>
</a>
</div><!-- .logo -->
<p>BIURO - padedame, kai labiausiai reikia. Paprastas ir greitas laikinasis įdarbinimas.</p>
</div><!-- .biuro-header -->
<?php
while ( have_posts() ) :
?>
<div class="biuro-title">
<h1><span><?php the_title(); ?></span></h1>
</div><!-- .biuro-title -->
<?php
the_post();
the_content();
endwhile;
?>
<?php get_footer('job');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment