Skip to content

Instantly share code, notes, and snippets.

@faisalahammad
Last active August 26, 2022 09:12
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save faisalahammad/d479f4045314299b070b8f369b0e6872 to your computer and use it in GitHub Desktop.
Save faisalahammad/d479f4045314299b070b8f369b0e6872 to your computer and use it in GitHub Desktop.
/* 2 */
#header-left {
display: none !important;
}
#header-right {
float: unset !important;
}
#header-right .widget.widget_nav_menu {
float: unset !important;
text-align: center !important;
}
/*
1. Some guy wants all of his members to have a unique customer ID that he can display whilst they’re logged in. He wants to simply activate the plugin, which has the option of a shortcode to use in his posts/pages, and a function to use within his theme, can you make a simple plugin or some code that they can use within their theme functions.php?
Over to you!
*/
<?php
function nexy_customer_id() {
if(is_user_logged_in()) {
$userID = get_current_user_id();
return "Customer unique ID: " . $userID;
}else {
return;
}
}
add_shortcode('getCustomerID', 'nexy_customer_id');
/* 4 */
#top-navigation-bar {
background: #6391f3;
border-top: 1px solid #6391f3;
border-bottom: 1px solid #6391f3;
margin-top: 10px;
}
.sf-menu li {
background-color: #6391f3;
}
#topbar ul li a {
color: yellow;
}
#topbar ul li a {
text-shadow: #6391f3 -1px 1px 0px;
}
#topbar ul li.current, #topbar ul li.current_page_item {
background: #6391f3;
}
body {
background: #000;
}
a.comment-reply-link, a.button, input[type="submit"], input[type="button"], ul.button-nav li a, div.generic-button a, ul.button-nav li a {
background: #6592ef;
}
.articles li {
padding: 10px 48px;
border-radius: 5px;
text-align: center;
}
.articles li h3 a {
color: #6592ef;
}
.generic-box {
border-radius: 5px;
}
#content {
padding: 0px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment