Skip to content

Instantly share code, notes, and snippets.

View Wadizorg's full-sized avatar
😳

Vladyslav Wadizorg

😳
  • Lanars
  • UKRAINE
View GitHub Profile
@Wadizorg
Wadizorg / media-query.css
Created January 31, 2019 15:07 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@Wadizorg
Wadizorg / coming-soon-landing-page.markdown
Created November 4, 2018 19:47
Coming Soon Landing Page

Coming Soon Landing Page

I got the evening off and I decided to rebuild my personal page. Will probably be adding some things to it, but I will try to keep it as clean as possible.

A Pen by Yahia Refaiea on CodePen.

License.

<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@Wadizorg
Wadizorg / functions.php
Created April 4, 2018 00:16
AJAX functionality for WordPress themes
function fetch_modal_content() {
if ( isset($_REQUEST) ) {
$post_id = $_REQUEST['id'];
?>
<div class="modal-body">
<h1><?php echo get_the_title($post_id); ?></h1>
<?php echo wpautop(get_the_content($post_id)); ?>
</div>
< ?php $myroles = array('photographer', 'general', 'makeup artist');
echo"<select name='list_of_roles'>";
foreach ($myroles as $myrole){
echo "<option value='$myrole'>$myrole</option>";
}
echo "</select>"; ?>
add_action(‘register_form’,’show_role_field’);
@Wadizorg
Wadizorg / wordpress-change-domain-migration.sql
Created February 7, 2018 21:59 — forked from chuckreynolds/wordpress-change-domain-migration.sql
Use this SQL script when changing domains on a WordPress site. Whether you’re moving from an old domain to a new domain or you’re changing from a development domain to a production domain this will work. __STEP1: always backup your database. __STEP2: change the ‘oldsite.com’ and ‘newsite.com’ variables to your own. __STEP3: make sure your databa…
SET @oldsite='http://oldsite.com';
SET @newsite='http://newsite.com';
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite);
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite);
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite);
/* only uncomment next line if you want all your current posts to post to RSS again as new */
#UPDATE wp_posts SET guid = replace(guid, @oldsite, @newsite);
@Wadizorg
Wadizorg / enable-compression
Created February 6, 2018 00:23 — forked from raewrites/enable-compression
Enabling Compression
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
@Wadizorg
Wadizorg / first-post-image
Created February 6, 2018 00:20 — forked from raewrites/first-post-image
Use First Post Image
//function to call first uploaded image in functions file
function main_image() {
$files = get_children('post_parent='.get_the_ID().'&amp;post_type=attachment
&amp;post_mime_type=image&amp;order=desc');
if($files) :
$keys = array_reverse(array_keys($files));
$j=0;
$num = $keys[$j];
$image=wp_get_attachment_image($num, 'large', true);
$imagepieces = explode('"', $image);
@Wadizorg
Wadizorg / custom-nav-walker-usage.php
Created January 21, 2018 19:01 — forked from kosinix/custom-nav-walker-usage.php
WordPress: Using a custom nav walker to create navigation menus in plain <a> tags. That is the <ul> and <li> tags are not present. Very useful if you want to create simple links that can be centered with a simple text-align:center on the containing element.
<?php
// In your template files like footer.php
// The items_wrap value ('%3$s') removes the wrapping <ul>, while the custom walker (Nav_Footer_Walker) removes the <li>'s.
wp_nav_menu(array('items_wrap'=> '%3$s', 'walker' => new Nav_Footer_Walker(), 'container'=>false, 'menu_class' => '', 'theme_location'=>'footer', 'fallback_cb'=>false ));
?>
@Wadizorg
Wadizorg / js-task-1.md
Created October 3, 2017 10:08 — forked from codedokode/js-task-1.md
Задания на яваскрипт (простые)