-
AuthorPosts
-
January 7, 2016 at 2:39 pm #561245
Hi Kriesi & Co,
Wanting to do that blue bubble you have on my site and I have read the instructions here but it didn’t give me enough to do it on my site.
Please tell me… should I go to Enfold >> General Settings >> Quick CSS??
Do i copy the code into Quick CSS? Because I did so and it didn’t work. It could be that i am not replacing jobs with the right word??
.jobs-menu > a > span.avia-menu-text:after { content: "1"; font-size: 9px; color: #FFF; background: #42A0BD; line-height: 17px; width: 17px; display: inline-block; text-align: center; border-radius: 100px; position: relative; top: -9px; left: 2px; }
January 8, 2016 at 4:56 am #561806Hi jamie,
Not sure what you mean by bubble? Please link to your site and try to explain a bit further what you are looking to achieve.
Best regards,
RikardJanuary 8, 2016 at 12:20 pm #561904I want to copy from the blue number 4 “Jobs” next to “Jobs”
And put a blue number 1 next to “Investments” on my site here
January 8, 2016 at 12:21 pm #561905Image links http://imgur.com/75JczYQ and http://imgur.com/fD18x9M
January 8, 2016 at 3:59 pm #562053Hey!
You should add following code to Quick CSS
.jobs-menu > a > span.avia-menu-text:after { content: "1"; font-size: 9px; color: #FFF; background: #42A0BD; line-height: 17px; width: 17px; display: inline-block; text-align: center; border-radius: 100px; position: relative; top: -9px; left: 2px; }
And then go to Appearance > Menus and click “Screen options” and check “CSS classes” and then add “jobs-menu” to your menu item on which you would like to display bubble :)
Regards,
YigitJanuary 8, 2016 at 10:35 pm #562219So clear and easy to do. Thank you!
I LOVE IT!!!!
Great :)
January 9, 2016 at 9:24 am #562384November 21, 2018 at 11:58 am #1035994Hi,
thanks so much! Love it too!
It would be nice if this number is dynamic.I’m not that much into CSS, so maybe someone can help me out:
Every Job offer on our website is a portfolio entry with the category “jobs”. Is there a way to count the numbers of those entries and then use them inside the bubble?
Any ideas?
Thanks and best regards,
DavidNovember 21, 2018 at 5:30 pm #1036191Hi David,
Please add following code to bottom of Functions.php file in Appearance > Editor
function jobs_count_func( $count_posts ){ $count_posts = wp_count_posts( 'portfolio' )->publish; return $count_posts; } add_shortcode( 'jobs_count', 'jobs_count_func' );
Then edit your menu item and following shortcode
[jobs_count]
Best regards,
YigitNovember 26, 2018 at 1:58 pm #1037645Thanks a lot, Ygit!
The function seems to work fine but I’m not sure where exactly to insert the shortcode to generate the number inside the bubble… :/
Also the function counts the number of all portfolio entries…is it possible to filter to count only the entries with a specific category?Thanks a lot and best regards,
DavidDecember 2, 2018 at 1:17 pm #1039912Hi David,
This is a bit out of scope of our support unfortunately, we’d like to help you out but this is very much bordering custom work. The WordPress function that Yigit used doesn’t allow for narrowing it down to a single category, but maybe you could try to create a new query using WP_Query?
$args = array( 'post_type' => 'portfolio', 'tax_query' => array( array( 'taxonomy' => 'people', 'field' => 'slug', 'terms' => 'bob' ) ) ); $query = new WP_Query( $args );
http://codex.wordpress.org/Class_Reference/WP_Query
Best regards,
RikardMarch 8, 2021 at 8:50 pm #1286548How can I implement this bubble with woocommerce products?
I prefer having my cart inside main menu instead of using an attached cart to the side on menu.
March 11, 2021 at 1:05 pm #1287412Hi @mannys1985,
Please go to Enfold theme options > Shop Options > Header Shopping Cart Icon and choose to display it attached to main menu? :)
Best regards,
YigitMarch 11, 2021 at 2:16 pm #1287430Hello Yigit,
That option you mention I know but I wanted to insert cart in my main menu area not to the side attached. I added the code to show cart count I just need the css code in order to get that same bubble like the option you mention.
Thank you
March 11, 2021 at 2:39 pm #1287436Hey,
Please add following code to Quick CSS field in Enfold theme options > General Styling tab
.avia-menu-text .counter { content: "1"; font-size: 9px; color: #FFF; background: #42A0BD; line-height: 17px; width: 17px; display: inline-block; text-align: center; border-radius: 100px; position: relative; top: -9px; left: 2px; }
I think it would look better if you remove “/” from the counter :)
Best regards,
YigitMarch 11, 2021 at 2:57 pm #1287439Yes!!! It worked
I think you should add this to the topics for woocommerce cart count in main menu.
Thank you !
March 11, 2021 at 3:08 pm #1287445 -
AuthorPosts
- The topic ‘Number in the bubble Above the Jobs Menu Button on the Enfold Site’ is closed to new replies.