Hide WordPress Admin Toolbar Based On User Role
…admin bar you can use current_user_can and pass the user role into it. add_action(‘after_setup_theme’, ‘wl_remove_admin_bar’); // Remove admin bar for subscribers and editors. function wl_remove_admin_bar() { if (get_users( [ ‘role__in’…
Read MoreWhat is a reference assignment in PHP?
…= new MyExample(); $blackboard->method_inside_example(); $blackboard->hello(); So an instance is made of the class $blackboard -then it calls 2 methods, the first one outputs the class name in the method_inside_example method…
Read MoreHiding the Meta Generator Tag in WordPress in the Header and RSS
…the application tool used to create your website. The bad thing about this is that it openly declares what software and version you are using – if that software and…
Read MoreAdding & Sorting ACF Repeater Field Data into Responsive Tabs
…grouped into the relevant tab. Demo *I have added a further bit to this by getting the colors array straight out of the ACF repeater sub-field choices (or values)…
Read MoreRemove all Inner HTML Mark Up Content on Genesis Home Page
…running the genesis(); function we are running a custom one cgp_genesis_no_content(); which contains the 2 amended header and footer functions below it. As for a demo, this site uses the…
Read MoreAdding a centered horizontal submenu in Genesis Theme
…guide uses the latest Genesis Sample theme CSS. So going from this… to this… There are only 5 CSS selectors to edit, you can either paste in the…
Read MoreAdding in a Hello Tool Bar to the Top of a Genesis Theme
How to add in a hello style tool bar to the head of a Genesis theme and make it appear visible after scrolling down part way down the page. Demo…
Read MoreUsing ScrollNav to control long documents in WordPress
…Demo —————————————————————————————————- */ .content .post { margin-left: 160px; } .scroll-nav { position: absolute; } .scroll-nav.fixed .scroll-nav__wrapper { position: fixed; top: 60px; } .scroll-nav__wrapper { padding: 15px 10px; } .scroll-nav__heading {…
Read MoreOutputting Genesis Simple Share with Actions and in Widgets
…using $Genesis_Simple_Share->icons Or you can manually specify the sites with an array as below.. Some widget demo action going on. Archive & Home Pages One thing to note is that…
Read MoreFilter CPT Archive by Custom Taxonomy with Isotope
…this instance it uses ‘cpt‘. The Isoptope library is loaded to the archive page as well as an isotope-init file and also imagesloaded is called which comes bundled with WordPress….
Read More