My Blog

Custom WP Menu

function clean_custom_menus() { $menu_name = 'primary'; // specify custom menu slug if (($locations = get_nav_menu_locations()) && isset($locations[$menu_name])) { $menu = wp_get_nav_menu_object($locations[$menu_name]); $menu_items = wp_get_nav_menu_items($menu->term_id); $menu_list = '<ul class="nav navbar-nav">'; foreach( $menu_items as $menu_item ) { if( $menu_item->menu_item_parent == 0 )Continue reading…

Changing Post Title Placeholder As "Enter Title Here"

On functions.php   function changing_enter_title_here_on_wp_post( $title ){ $screen = get_current_screen(); if ( 'branch' == $screen->post_type ){ $title = 'Enter Branch Name'; } return $title; } add_filter( 'enter_title_here', 'changing_enter_title_here_on_wp_post' );Continue reading…

Custom Page Information Display On Any Page

For Custom Page Information display on any page <?php $args_movies = array( 'pagename' => 'page-name' ); $the_query_movies = new WP_Query($args_movies); if($the_query_movies->have_posts()) { while($the_query_movies->have_posts()) : $the_query_movies->the_post(); ?> <?php the_title();?> <?php the_content();?> <?php the_permalink();?> <?php the_date();?> <?php $page_id = get_the_ID();?> <?php endwhile;Continue reading…

Custom Post Type Not Supporting Default Category

For custom post type not supporting default category Use this code on functions.php at the bottom: function add_custom_types_to_tax( $query ) { if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { // Get all your post types // $post_types =Continue reading…

Install PHP 5.5 On CentOS 7

Using CentOS 7, rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm Now we can install PHP 5.5 using, yum install php55w php55w-opcache yum install yum-plugin-replace yum replace php-common --replace-with=php55w-common yum install php55w-Continue reading…

How To Install VLC In Ubuntu

Step 1 : sudo apt-get update Step 2 : sudo apt-get install vlc If Needed for embedding in Mozilla Firefox, use following codes, sudo apt-get update sudo apt-get install vlc browser-plugin-vlcContinue reading…

Related Blogs