{"id":15622,"date":"2015-04-29T11:32:26","date_gmt":"2015-04-29T11:32:26","guid":{"rendered":"https:\/\/docs.wpgeodirectory.com\/?p=15622"},"modified":"2018-09-21T23:55:05","modified_gmt":"2018-09-21T23:55:05","slug":"common-styling-examples","status":"publish","type":"post","link":"https:\/\/wpgeodirectory.com\/docs\/common-styling-examples\/","title":{"rendered":"Common styling examples"},"content":{"rendered":"<p><a class=\"cnt1\" href=\"#feature\">Changing the look of a featured listing<\/a> <a class=\"cnt1\" href=\"#switch\">Adjusting the location switcher for cities only or a one country site<\/a> <a class=\"cnt1\" href=\"#legend\">Hiding category legend from location map<\/a> <a class=\"cnt1\" href=\"#count\">Hiding the listings count in the popular categories widget<\/a> <a class=\"cnt1\" href=\"#bubble\">Changing the link in the map bubble<\/a><br \/>\n<a class=\"cnt1\" href=\"#search\">Modifying the GD Search bar<\/a> <a class=\"cnt2\" href=\"#cpt-selector\">Hiding\u00a0the\u00a0Custom\u00a0Post\u00a0Type\u00a0(CPT)\u00a0selector<\/a> <a class=\"cnt2\" href=\"#cpt-post\">Removing one CPT only from the Custom Post Type (CPT) selector<\/a> <a class=\"cnt2\" href=\"#search-field\">Hiding the\u00a0&#8220;Search for&#8221; field<\/a> <a class=\"cnt2\" href=\"#cog\">Changing\u00a0the\u00a0Advanced Search cogwheel\u00a0icon to\u00a0text<\/a><br \/>\n<a class=\"cnt1\" href=\"#address\">Customizing or hiding address details<\/a> <a class=\"cnt1\" href=\"#cpt-reviews\">Removing reviews from one CPT only<\/a> <a class=\"cnt1\" href=\"#recaptcha\">Making the reCAPTCHA V2 box resize to smaller screens<\/a><br \/>\n<a class=\"cnt1\" href=\"#supreme-overlay\">Adjust Supreme Directory Featured Image Overlay Opacity<\/a><\/p>\n<h3><a id=\"feature\"><\/a>Changing the look of a featured listing<\/h3>\n<p>Each featured listing has the class <em><strong>gd-post-featured<\/strong><\/em>\u00a0applied in listings pages.<br \/>\nThis class can then be targeted to change the look of featured listings.<br \/>\nFor example adding this to your CSS:<\/p>\n<p>[css].gd-post-featured {background: #BDFF00 none repeat scroll 0 0;}[\/css]<\/p>\n<p>results in this:<br \/>\n<img class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/04\/featured.png\" alt=\"featured\" \/><\/p>\n<h3><a id=\"switch\"><\/a>Adjusting the location switcher for cities only or a one country site<\/h3>\n<p>The default location switcher looks like this:<\/p>\n<p><img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/04\/css5.png\" alt=\"\" width=\"265\" height=\"149\" \/><\/p>\n<p>If you have a GeoDirectory site for one country only, you can add this to your child theme&#8217;s style.css file:<\/p>\n<p>[css]#menu-item-gd-location-switcher dd {width: 50%;}[\/css]<\/p>\n<p>And then your switcher will look like this:<\/p>\n<p><img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/04\/css6.png\" alt=\"\" width=\"242\" height=\"177\" \/><\/p>\n<p>And if you have a GeoDirectory site for one region only, you can add this\u00a0to your child theme&#8217;s style.css file:<\/p>\n<p>[css]#menu-item-gd-location-switcher dd {width: 100%;}[\/css]<\/p>\n<p>And then your switcher will look like this:<\/p>\n<p><img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/04\/css7.png\" alt=\"\" width=\"255\" height=\"138\" \/><\/p>\n<h3><a id=\"legend\"><\/a>Removing category legend from location map<\/h3>\n<p>The default location map will have a legend showing the categories in the bottom right hand corner, like this:<\/p>\n<p><img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/04\/legend1.png\" alt=\"Legend\" width=\"681\" height=\"236\" \/><\/p>\n<p>If you want to hide that category list hidden by default, use the code posted below. Clicking on the expand\/reduce icon will then open\/close it:<\/p>\n<p><img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/04\/css2.png\" alt=\"\" width=\"681\" height=\"232\" \/><\/p>\n<p>Then add this CSS to your child theme&#8217;s style.css file:<\/p>\n<p>[css].map_category {display: none;}[\/css]<\/p>\n<p>To only hide it on mobile views, you can add this CSS, adjust as required:<\/p>\n<p>[css]@media only screen and (max-width: 1040px) {.map_category {display: none;}}[\/css]<\/p>\n<h3><a id=\"count\"><\/a>Hiding the listings count in the popular categories widget<\/h3>\n<p>The popular categories widget will have show the number of listings in the categories for the selected location like this:<\/p>\n<p><img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/04\/css9.png\" alt=\"\" width=\"479\" height=\"36\" \/><\/p>\n<p>If you want to hide those numbers, use the code posted below:<\/p>\n<p><img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/04\/css8.png\" alt=\"\" width=\"479\" height=\"36\" \/><\/p>\n<p>[css]span.geodir_term_class {display: none;}[\/css]<\/p>\n<h3><a id=\"bubble\"><\/a>Changing the link in the map bubble<\/h3>\n<p>If you want to change how the main link to the listing looks, use the code below, and adjust as required:<\/p>\n<p>[css].geodir-bubble_desc h4 a {background: white; padding: 3px; border: 1px solid blue;}[\/css]<\/p>\n<p>These pictures show <strong>before<\/strong> and <strong>after<\/strong>:<br \/>\n<img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/04\/css11.png\" alt=\"\" width=\"250\" height=\"185\" \/>\u00a0<img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/04\/css10.png\" alt=\"\" width=\"245\" height=\"190\" \/><\/p>\n<h3><a id=\"search\"><\/a>Modifying the GD Search bar<\/h3>\n<p>The GD Search bar can have a few different components depending on the addons you use, and your settings.<br \/>\n<a href=\"https:\/\/wpgeodirectory.com\/docs\/gd-search\/\">Learn more about the search bar here.<\/a><\/p>\n<h4><a id=\"cpt-selector\"><\/a>Hiding the\u00a0Custom Post Type (CPT) selector<\/h4>\n<p>This CSS will hide the <a href=\"https:\/\/wpgeodirectory.com\/docs\/gd-search\/#cpt\">CPT selector<\/a> everywhere:<\/p>\n<p>[css].gd-search-field-cpt {display: none;}[\/css]<\/p>\n<p>This CSS will hide the <a href=\"https:\/\/wpgeodirectory.com\/docs\/gd-search\/#cpt\">CPT selector<\/a> on all Listings (CPT and categories) pages:<\/p>\n<p>[css].gd-search-input-wrapper.gd-search-field-cpt {display: none;}[\/css]<\/p>\n<p>This CSS will hide the <a href=\"https:\/\/wpgeodirectory.com\/docs\/gd-search\/#cpt\">CPT selector<\/a> on all Listings (CPT and categories) pages:<\/p>\n<p>[css].gd-search-input-wrapper.gd-search-field-cpt {display: none;}[\/css]<\/p>\n<h4><a id=\"cpt-post\"><\/a>Removing one CPT only from the Custom Post Type (CPT) selector<\/h4>\n<p>This CSS will hide one CPT from the <a href=\"https:\/\/wpgeodirectory.com\/docs\/gd-search\/#cpt\">CPT selector<\/a> everywhere (adjust as required):<\/p>\n<p>[css].search_by_post option[value=gd_event] {display: none;}[\/css]<\/p>\n<h4><a id=\"search-field\"><\/a>Hiding the\u00a0&#8220;Search for&#8221; field<\/h4>\n<p>This CSS will hide the <a href=\"https:\/\/wpgeodirectory.com\/docs\/gd-search\/#search\">&#8220;Search for&#8221; field<\/a> everywhere:<\/p>\n<p>[css].gd-search-field-search {display: none;}[\/css]<\/p>\n<h4>Full width with all search inputs inline<\/h4>\n<p>This CSS will allow the search bar to expand to 100% width on the screen, allowing all the items inline:<\/p>\n<p>[css].geodir-loc-bar-in {max-width: 100%;}[\/css]<\/p>\n<p>Using Supreme Theme you can add:<\/p>\n<p>[css].sd.home .featured-area .geodir-loc-bar-in {max-width: 100%;}[\/css]<\/p>\n<h4><a id=\"cog\"><\/a>Changing the Advanced Search cogwheel\u00a0icon to\u00a0text<\/h4>\n<p>To change from <img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/04\/adv19.png\" alt=\"\" width=\"168\" height=\"46\" \/>\u00a0to <img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2015\/04\/adv18.png\" alt=\"\" width=\"257\" height=\"47\" \/>\u00a0add this CSS:<\/p>\n<p>[css].fa-cog:after {content: &quot; Advanced Filter&quot;;}[\/css]<\/p>\n<h4><a id=\"cog\"><\/a>Change the Advanced Search icons<\/h4>\n<p>Adjust this CSS for your own style; find more icons at <a href=\"http:\/\/fontawesome.io\/cheatsheet\/\" target=\"_blank\" rel=\"noopener\">http:\/\/fontawesome.io\/cheatsheet\/<\/a><br \/>\nTo change the cog wheel:<\/p>\n<p>[css]<br \/>\n.fa-cog:after {font-family: FontAwesome;<br \/>\ncontent: &quot;\\f1b9&quot;; color:white; font-size: 16px;}<br \/>\n.fa-cog {color:transparent; font-size: 0}<br \/>\n[\/css]<\/p>\n<p>To change the search icon:<\/p>\n<p>[css]<br \/>\n.fa-search:after {font-family: FontAwesome;<br \/>\ncontent: &quot;\\f1b9&quot;; color:white; font-size: 16px;}<br \/>\n.fa-search {color:transparent; font-size: 0}<br \/>\n[\/css]<\/p>\n<p>Use font awesome icons in any text area or as links <a href=\"http:\/\/fontawesome.io\/cheatsheet\/\" target=\"_blank\" rel=\"noopener\">http:\/\/fontawesome.io\/cheatsheet\/<\/a><\/p>\n<p>[html]<br \/>\n&lt;i class=&quot;fa fa-facebook-square&quot; aria-hidden=&quot;true&quot;&gt;&lt;\/i&gt;<br \/>\n[\/html]<\/p>\n<h3><a id=\"address\"><\/a>Customizing or hiding address details<\/h3>\n<p>The display of the different levels of the address are controlled by CSS classes:<\/p>\n<ol>\n<li>span[itemprop=&#8221;streetAddress&#8221;]<\/li>\n<li>span[itemprop=&#8221;addressLocality&#8221;]<\/li>\n<li>span[itemprop=&#8221;addressRegion&#8221;]<\/li>\n<li>span[itemprop=&#8221;addressCountry&#8221;]<\/li>\n<li>span[itemprop=&#8221;postalCode&#8221;]<\/li>\n<\/ol>\n<p>For example, if you only want to display the region and country, add this to your child theme&#8217;s <em><strong>style.css<\/strong><\/em> file:<\/p>\n<p>[css]span[itemprop=&quot;streetAddress&quot;],<br \/>\nspan[itemprop=&quot;addressLocality&quot;],<br \/>\nspan[itemprop=&quot;postalCode&quot;] {<br \/>\n  display: none;<br \/>\n}[\/css]<\/p>\n<h4>Hide the default phone number from logged out users<\/h4>\n<p>Sometimes you may want to hide some listing information from users that are not logged in. Here is an example of how you can do that with the default phone number.<\/p>\n<p>[css]<br \/>\n.geodir_contact {display: none}<br \/>\n.logged-in .geodir_contact {display: initial}<br \/>\n[\/css]<\/p>\n<h3><a id=\"cpt-reviews\"><\/a>Removing reviews from one CPT only<\/h3>\n<p>If you only want to disable reviews for some but not all CPTs, you can use this CSS, adjust for the CPTs you want to hide. For example, replace every <strong><em>event<\/em><\/strong> with <strong><em>place<\/em><\/strong>:<\/p>\n<p>[css]<br \/>\n.post-type-archive-gd_event .geodir_Star {display: none;}<br \/>\n.post-type-archive-gd_event .geodir-bubble-meta-bottom .geodir-bubble-reviews {display: none;}<br \/>\n.search-results .geodir-bubble-meta-bottom .geodir-bubble-reviews {display: none;}<br \/>\n.post-type-archive-gd_event a.geodir-pcomments {display: none !important;}<br \/>\n#reviewsTab {display: none !important;}<br \/>\n.single-gd_event dl.geodir-tab-head [data-tab=&quot;#reviews&quot;] {display: none !important;}<br \/>\n.single-gd_event .sd-detail-cta .dt-btn {display: none;}<br \/>\n.single-gd_event .sd-ratings {display: none;}<br \/>\n.gd-post-gd_event .geodir-rating {display: none;}<br \/>\n.search-results .geodir-bubble-meta-bottom .geodir-rating {display: none;}<br \/>\n.gd-post-gd_event a.geodir-pcomments {display: none !important;}<br \/>\n[\/css]<\/p>\n<h3><a id=\"recaptcha\"><\/a>Making the reCAPTCHA V2 box resize to smaller screens<\/h3>\n<ol>\n<li>You have the option to choose two different reCAPTCHA versions:\n<ol>\n<li>reCAPTCHA V2 which requires visitors to tick a box<\/li>\n<li>Invisible reCAPTCHA which works in the background<\/li>\n<\/ol>\n<\/li>\n<li>reCAPTCHA V2 has a fixed width as provided by Google and therefore sometimes is to wide for a small screen or another container element on your screen.<\/li>\n<li>To fix this you can apply the following CSS:\n<p>[css]<br \/>\n@media screen and (max-height: 575px){<br \/>\n .gd-captcha {transform:scale(0.8);<br \/>\n  -webkit-transform:scale(0.8);transform-origin:0 0;-webkit-transform-origin:0 0;}<br \/>\n}<br \/>\n[\/css]<\/p>\n<\/li>\n<li>Adjust the @media screen settings to target the sizes you want.<\/li>\n<\/ol>\n<h3><a id=\"supreme-overlay\"><\/a>Adjusting Supreme Directory theme featured image overlay opacity<\/h3>\n<ol>\n<li style=\"list-style-type: none\">\n<ol>\n<li>Supreme Directory theme has a really strong display of the featured image.<\/li>\n<li>Adjusting the opacity of the featured image overlay can brighten or darken your site to suit your needs<\/li>\n<li>Here is some CSS that you can adjust to suit your site:\n<p>[css]<br \/>\n\/*location pages overlay *\/<br \/>\n.sd-location .featured-area::before {<br \/>\n    opacity:0.5!important;<br \/>\n}<\/p>\n<p>\/* listing pages overlay *\/<br \/>\n.single .featured-area::before {<br \/>\nopacity:0.2 !important;<br \/>\n}<\/p>\n<p>\/* homepage overlay *\/<br \/>\n.sd-homepage .featured-area::before {<br \/>\nopacity:0.5 !important;<br \/>\n}[\/css]<\/p>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>&lt;\/ol<\/p>\n<h4>Remove Supreme Parallax Effect<\/h4>\n<p>Want a little less movement on your page?<br \/>\nHere&#8217;s some CSS to remove the parallax effect.<br \/>\nEach page type has a class, so, there are different ways to target the CSS, based on your needs.<\/p>\n<p>First, this CSS will remove the effect everywhere:<\/p>\n<p>[css]<br \/>\n.featured-img {<br \/>\n    background-position: 50% 50% !important;<br \/>\n}<br \/>\n[\/css]<\/p>\n<p>This CSS is targeted at the single page for a gd_place:<\/p>\n<p>[css]<br \/>\n.single-gd_place .featured-img {<br \/>\n    background-position: 50% 50% !important;<br \/>\n}<br \/>\n[\/css]<\/p>\n<p>This is targeted more widely at any CPT for a single page, but will leave the effect in place on the home page:<\/p>\n<p>[css]<br \/>\n.single .featured-img {<br \/>\n    background-position: 50% 50% !important;<br \/>\n}<br \/>\n[\/css]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Changing the look of a featured listing Adjusting the location switcher for cities only or a one country site Hiding category legend from location map Hiding the listings count in the popular categories widget Changing the link in the map bubble Modifying the GD Search bar Hiding\u00a0the\u00a0Custom\u00a0Post\u00a0Type\u00a0(CPT)\u00a0selector Removing one CPT only from the Custom Post &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/wpgeodirectory.com\/docs\/common-styling-examples\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Common styling examples&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1676,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[15],"tags":[],"amp_validity":null,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts\/15622"}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/users\/1676"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/comments?post=15622"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts\/15622\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/media?parent=15622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/categories?post=15622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/tags?post=15622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}