How can I allow a client to edit certain parts of a static site?

in first you have to know how convert your static html pages into wordpress themes , then about your navbar put this code in your theme function.php function register_my_menu() { register_nav_menu(‘header-menu’,__( ‘Header Menu’ ));}add_action( ‘init’, ‘register_my_menu’ ); then go to your header.php where your navbar is and remove nav and put this code in it … Read more

Bootstrap 4 Optimization

You just make a big mistake. use this guideline. header.php <link rel=”stylesheet” href=”https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css” integrity=”sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm” crossorigin=”anonymous”> You also made a mistake calling js file. Frist needs jQuery then popper.js then bootstrap and the big mistake is you call all of them in the header file, that’s why when the page is loaded it takes time to … Read more

Link permalink in Twitter Bootstrap “TypeAhead” results

As @OneTrickPoney points out, there’s an alternative in core. jQuery UI autocomplete comes with WP default install. Autocomplete, when added to an input field, enables users to quickly find and select from a pre-populated list of values as they type, leveraging searching and filtering. By giving an Autocomplete field focus or entering something into it, … Read more

change the icon of a custom post type in WordPress to use twitter boostrap

I always like using this tutorial which would give you this code. <?php add_action( ‘admin_head’, ‘cpt_icons’ ); function cpt_icons() { ?> <style type=”text/css” media=”screen”> #menu-posts-POSTTYPE .wp-menu-image { background: url(<?php bloginfo(‘template_url’) ?>/images/YOURIMAGE.png) no-repeat 6px -17px !important; } #menu-posts-POSTTYPE:hover .wp-menu-image, #menu-posts-POSTTYPE.wp-has-current-submenu .wp-menu-image { background-position:6px 7px!important; } </style> <?php } ?>

How to echo a different field if another field is empty?

You might try to replace the foreach( $myCarousel as $carousel ) with: foreach($myCarousel as $carousel){ $myimg = get(‘projectdetails_image’,1,$carousel); if ( !$myimg ) { // use this if you want to show a default image when no image is available in the post $myimg = get_template_directory_uri().’/images/default_banner.jpg’; } if ( $myimg ) { echo “<div class=”item”.( $counter … Read more