Skip to content

Instantly share code, notes, and snippets.

View nataliakovtsuniak's full-sized avatar

Natalia Kovtsuniak nataliakovtsuniak

View GitHub Profile
@nataliakovtsuniak
nataliakovtsuniak / video-background.php
Created June 20, 2017 18:02
Video background/wordpress
<section id="video">
<div class="container">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div id="video-wrap" class="video-wrap">
<div class="content-overlay">
<h5 class="os-animation" data-os-animation="zoomIn" data-os-animation-delay="0.3s"><?php echo get_theme_mod('video_heading1', 'Custom Video Text 1');?></h5>
<div id ='line'></div>
<h5 class="os-animation" data-os-animation="zoomIn" data-os-animation-delay="0.5s"><?php echo get_theme_mod('video_heading2', 'Custom Video Text 2');?></h5>
</div>
@nataliakovtsuniak
nataliakovtsuniak / tabs.php
Created June 4, 2017 06:47
Bootstrap tabs for WordPress
<div id="tab">
<ul class="nav nav-tabs" role="tablist">
<?php $loop = new WP_Query( array( 'post_type' => 'candidates', 'posts_per_page' => -1 ) ); ?>
<?php
$counter = 0;
while ( $loop->have_posts() ) : $loop->the_post();
$counter++;
?>
<li role="presentation" class="post-<?php the_ID(); ?> <?=($counter == 1) ? 'active' : ''?>"><a href="#post-<?php the_ID(); ?>" aria-controls="home" role="tab" data-toggle="tab"><?php the_title();?></a></li>
<?php endwhile; wp_reset_query(); ?>
@nataliakovtsuniak
nataliakovtsuniak / page-login.php
Created May 28, 2017 16:52 — forked from ahmadawais/page-login.php
WordPress Frontend Login Page [UPDATED]
<?php
/**
* Template Name: Login Page AA
*
* Login Page Template.
*
* @author Ahmad Awais
* @since 1.0.0
*/
(function ($) {
"use strict";
/*global wp,jQuery */
var CustomGalleryEdit,CustomFrame;
function customClasses() {
var media = wp.media;
var l10n = media.view.l10n;
@nataliakovtsuniak
nataliakovtsuniak / wordpress-get-all-fields.php
Created May 12, 2017 02:33 — forked from agragregra/wordpress-get-all-fields.php
WordPress Get All Custom Fields without _edit_lock, _edit_last, _thumbnail_id
<?php
$custom_fields = get_post_custom($post->ID);
foreach ( $custom_fields as $field_key => $field_values ) {
if(!isset($field_values[0])) continue;
if(in_array($field_key,array("_edit_lock", "_edit_last", "_thumbnail_id"))) continue;
echo "<strong>$field_key:</strong> $field_values[0] <br>";
}
@nataliakovtsuniak
nataliakovtsuniak / functions.php
Created May 7, 2017 16:50
wp_enqueue_scripts
<?php
require_once('wp_bootstrap_navwalker.php');
function theme_name_styles() {
wp_enqueue_style('bootstrap_css', get_template_directory_uri() . '/css/bootstrap.css', array(), '1.0.0', false);
wp_enqueue_style('style', get_stylesheet_uri());
@nataliakovtsuniak
nataliakovtsuniak / functions.php
Last active May 6, 2017 19:01 — forked from taniarascia/functions.php
Inlcuding custom fields and uploads in a WordPress post
<?php
function create_post_your_post() {
register_post_type( 'your_post',
array(
'labels' => array(
'name' => __( 'Your Post' ),
),
'public' => true,
'hierarchical' => true,
@nataliakovtsuniak
nataliakovtsuniak / page.php
Created May 6, 2017 18:54 — forked from taniarascia/page.php
Displaying all the output from your custom meta box
<?php get_header(); ?>
<?php
$args = array(
'post_type' => 'your_post',
);
$your_loop = new WP_Query( $args ); if ( $your_loop->have_posts() ) : while ( $your_loop->have_posts() ) : $your_loop->the_post();
$meta = get_post_meta( $post->ID, 'your_fields', true ); ?>
@nataliakovtsuniak
nataliakovtsuniak / header-custom.php
Last active May 22, 2017 13:22
3 level menu using wp_get_nav_menu_items
<!DOCTYPE html>
<html>
<head>
<title> <?php wp_title(); ?></title>
<?php wp_head(); ?>
<style>
ul {
position: absolute;
margin: 0;
list-style:none;