This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
global $post; | |
$args = array( 'posts_per_page' => 4, 'post_type'=> 'post-type' ); | |
$myposts = get_posts( $args ); | |
foreach( $myposts as $post ) : setup_postdata($post); ?> | |
<?php | |
$custom_field = get_post_meta($post->ID, 'custom_field', true); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_enqueue_scripts', 'jk_masonry' ); | |
function jk_masonry() { | |
wp_enqueue_script( 'jquery-masonry', array( 'jquery' ) ); | |
} | |
/* | |
How to use? | |
$('#container').masonry({ singleMode: true }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if( !defined('ABSPATH') ) die; | |
add_filter( 'cs_framework_settings', 'meteor_theme_options_settings' ); | |
function meteor_theme_options_settings($settings) { | |
$settings = array( | |
'menu_title' => 'Theme Options', | |
'menu_type' => 'menu', // menu, submenu, options, theme, etc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(! function_exists('hasan_initilize')){ | |
add_action('after_setup_theme','hasan_initilize'); | |
function hasan_initilize(){ | |
register_nav_menus( array( | |
'primary_menu' => __('Header Menu','hasan') | |
)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php wp_head(); ?> //Add end of header section. | |
<?php wp_footer(); ?> //Add end of footer section. | |
// Include style and escript in wordpress | |
<?php | |
if(! function_exists('hasan_theme_scripts')){ | |
add_action('wp_enqueue_scripts','hasan_theme_scripts'); | |
function hasan_theme_scripts(){ | |
wp_enqueue_style('bootstrap', get_template_directory_uri().'/css/bootstrap.min.css', array(),'1.0.0','all'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 = Dashboard | |
4 = Separator | |
5 = Posts | |
10 = Media | |
15 = Link | |
20 = Pages | |
25 = Comments | |
59 = Seperator | |
60 = Appearance | |
65 = Plugins |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Student { | |
// public function __construct() { | |
// | |
// } | |
public function save_student_info($data){ | |
$host_name='localhost'; | |
$user_name='root'; | |
$password =''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=============================FONTEND FORM=============================== | |
<form class="form-horizontal" action="" method="post" enctype="multipart/form-data"> | |
<input type="file" name="image" accept="image/*" multiple /> | |
===========================BACKEND================================ | |
if(isset($_POST['save'])){ | |
$message = $blog->save_image_info($_POST); | |
} | |
$query_result = $blog->selectAllimageinfo(); | |
============================FUNCTION====================================== | |
public function save_image_info() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<div class="row"> | |
<div class="col-md-4 col-md-offset-4"> | |
<div class="login-panel panel panel-default"> | |
<div class="panel-heading"> | |
<h3 class="panel-title">Please Sign In</h3> | |
</div> | |
<div class="panel-body"> | |
{!! Form::open(['url'=>'/login','method'=>'POST'])!!} | |
<fieldset> |
OlderNewer