Menu

wordpress

The uploaded file exceeds the upload_max_filesize directive in php.ini
source: https://atlantisthemes.com/fix-upload_max_filesize/ You may have seen this error at least once, if you have used WordPress.When installing a theme, [...]
Brushed Theme
1) Youtube video images in index.php if (strrpos($big_src, ‘youtu.be’)) { $id = basename(parse_url($big_src, PHP_URL_PATH)); $img_url_part1 = [...]
Create Child Theme Of Flat Theme
Hi there! You can read about child themes at the WordPress Codex here. You don’t necessarily have to copy any files, it depends on what you are [...]
How to Create a WordPress Database Table
Ref:- http://www.kylejlarson.com/blog/2013/how-to-create-a-wordpress-database-table/ Creating a WordPress Custom Database Table Once you have WordPress up [...]
Adding “current” class if using get_pages
<?php $current_id = get_the_ID(); $mypages = get_pages('child_of='.$post->post_parent.'&sort_column=menu_order&hierarchical=0'); if($mypages) [...]
Add skip menu to website
Css /* skip menu */ a.skip-main { left:-999px; position:absolute; top:auto; width:1px; height:1px; overflow:scroll; z-index:-999; } a.skip-main:focus, [...]
Add Javascript File to wordpress
/** * Proper way to enqueue scripts and styles */ function theme_name_scripts() { wp_enqueue_style( 'style-name', get_stylesheet_uri() ); [...]
A Guide to WordPress Custom Post Types: Creation, Display and Meta Boxes
http://wp.tutsplus.com/tutorials/plugins/a-guide-to-wordpress-custom-post-types-creation-display-and-meta-boxes/ wordpress code generator [...]
Creating custom field with drop down on new post page
// action to add meta boxes add_action( ‘add_meta_boxes’, ‘page_location_metabox’ ); // action on saving post add_action( [...]
How to Display a WordPress Post only if it has a specific Custom Field
1) <?php // The Query to show a specific Custom Field $the_query = new WP_Query('meta_key=color'); // The Loop while ( $the_query->have_posts() ) : [...]