Skip to content

Instantly share code, notes, and snippets.

View onuproy's full-sized avatar
🏠
Working from home

Onup Chandra Barmon onuproy

🏠
Working from home
View GitHub Profile
<?php
$custom_query_args = array (
'post_type' => 'news',
'posts_per_page' => '4'
);
$custom_query_args['paged'] = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
$custom_query = new WP_Query( $custom_query_args );
@onuproy
onuproy / index.php
Created January 4, 2021 11:40
ACF Repeater loop By Wordpress
<!-- banner-area -->
<div id="owl-id" class="aaaaaa owl-carousel owl-theme">
<!-- single item -->
<?php if(have_rows('hero_slider_item')) :?>
<?php while(have_rows('hero_slider_item')) : the_row();
$add_single_slider = get_sub_field('add_single_slider');
$slider_title = get_sub_field('slider_title');
$slider_sub_title = get_sub_field('slider_sub_title');
$learn_more_button_text = get_sub_field('learn_more_button_text');
@onuproy
onuproy / index.php
Created May 28, 2020 06:53
ACF Custom post Type Left Right Right left WordPress
<?php if(have_rows('onup_row')) : ?>
<?php $i = 0; while(have_rows('onup_row')) : the_row(); $i++;
$title = get_sub_field( 'title' );
$img = get_sub_field( 'image' );
?>
<?php if($i %2 !=0) : ?>
<!-- left image content -->
<img src="<?php echo $img['url'];?>">
<h2><?php echo $title;?></h2>
@onuproy
onuproy / index.php
Created February 20, 2020 09:10
Custom Front Page Templates WordPress
if ( is_front_page() ) :
get_header( 'front' );
else :
get_header();
endif;
<?php if(is_front_page()){ ?>
<div class="logo">
@onuproy
onuproy / index.html
Created October 28, 2019 08:29
CSS Only Responsive Navigation Menu
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>An Anonymous Pen on CodePen</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<!-- partial:index.partial.html -->
@onuproy
onuproy / index.html
Created October 26, 2019 20:06
Sticky Header fixed
<section class="header_logo">
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="logo">
<a href="index.html">
<img src="assets/images/LOGO.png" alt="logo">
</a>
</div>
</div>
@onuproy
onuproy / style.css
Created July 22, 2019 09:27
::placeholder color custom
::-webkit-input-placeholder { /* Chrome/Opera/Safari */
color: pink;
}
::-moz-placeholder { /* Firefox 19+ */
color: pink;
}
:-ms-input-placeholder { /* IE 10+ */
color: pink;
}
:-moz-placeholder { /* Firefox 18- */
@onuproy
onuproy / style.css
Created July 22, 2019 09:24
How to remove the default arrow icon from a dropdown list (select element)?
select::-ms-expand {
display: none !important;
}
select {
-webkit-appearance: none;
-moz-appearance: none;
text-indent: 1px;
text-overflow: '';
}
@onuproy
onuproy / index.html
Created July 22, 2019 09:21
CSS user-select Property
<!DOCTYPE html>
<html>
<head>
<style>
div {
-webkit-user-select: none; /* Safari 3.1+ */
-moz-user-select: none; /* Firefox 2+ */
-ms-user-select: none; /* IE 10+ */
user-select: none; /* Standard syntax */
}
@onuproy
onuproy / index.html
Created July 21, 2019 05:06
Copy Text to Clipboard
<!DOCTYPE html>
<html>
<body>
<p>Click on the button to copy</p>
<input type="text" value="Hello World" id="myInput">
<button onclick="myFunction()">Copy text</button>
<p>The document.execCommand() method is not supported in IE8 and earlier.</p>