Jump to content

Archived

This topic is now archived and is closed to further replies.

jane

Different colour border bottom depending on post category

Recommended Posts

jane    6
jane

Hi,

 

I was in the middle of creating custom styling class for my post pins so that each of my four categories could be further differentiated bay a different border bottom colours. 

 

I just realized though in creating this custom class, how would I be able to properly assign colours to different categories? Use the category classes?

 

I was thinking along the lines of something like this:


^ as you can see I have 4 different styling classes for my 4 categories however it's not working (I think the issue is the .category-xxx classes; I'm not sure if they are in the right spot)

 

Any help would be really great!

Share this post


Link to post
Share on other sites
James B    436
James B

Hi there

 

I'm not sure I'm following what you mean, on your main postpin page you're trying to get the each pin to be colored depending on the category? There's no category classes inside of the postpin box/class for you to make those changes, its not like a static post or page where the category class is in the body tag. Are you manually adding these classes in?


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
jane    6
jane

Hi James, 

 

Yes, that's right, I want different colour pins depending on category. 

 

Is it possible to add those classes in to make what I'd like possible? Where abouts would I add that class in?

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

You can't create custom classes and use them in that fashion, the only way to actually do that would be to add the class name to each of the postpins, which you can't do.

 

You can create custom classes and then use the Styling classes field on sections which adds those class(es) names to your section, but this isn't possible on individual post pins.

 

So to answer your question, this isn't possible out-of-the-box, as there is no category class you can use to assign custom stylings too. The only to do something like this would be for you to create a child section of PostPins and add this functionality yourself. Please be aware that creating a child section is considered advanced and user generated code. Therefore, we are unable to provide any assistance.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

No problem. I will make a note of this and mark as a feature request on your behalf (the addition of category classes if possible).

  • Like 1

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
jane    6
jane

That would be wonderful if you could do that - thanks Danny!

Share this post


Link to post
Share on other sites

  • Similar Content

    • Jennifer Conway
      By Jennifer Conway+
      I recently installed PostPins and it was working great until I accidentally deleted the section. When I added the section back onto the page (without changing a thing), the posts were separated by a significant gap. I tried removing my custom CSS, reinstalling the plugin, deactivating other plugins, refreshing the cache -- but nothing seems to work. Unfortunately, I was also unable to revert to the published site (although I had not published the the new layout). 
      The section is currently working on the published site (insatiablecuriosities.com). The mis-stacked section is shown in the attached image. 

    • Janardan
      By Janardan+
      I want to know - how to load POSTS/ARTICLES from SUBDOMAIN of same main domain to homepage sidebar of main domain with the help of PostPins section adding in right side of sidebar .. but, there are no option to load posts from sub domains posted articles? or can we add custom links? to this PostPins section to display articles/posts from subdomain to show on main domain right side sidebar area?
      Because; main domain have posts overused I want to display from sub domain post LINKS to sidebar with the PostPins section help.
      I hope you got my question.. Thanks!
    • MrFent
      By MrFent+
      When PostPins is active on a page, I get PHP warnings:
      Notice: Undefined property: PostPins::$icon in /www/wp-content/plugins/postpins/postpins.php on line 318 Notice: register_metatab is deprecated since version 1.2 of PageLines DMS! Use section_opts() instead. in /www/wp-content/themes/dms/dms/includes/deprecated.php on line 280
      It looks like PostPins is still using section_optionator() and should be using section_opts()
    • roryorr
      By roryorr+
      Hi guys, need some help aligning PostPins left using CSS?
      http://www.cabaritaoceanhealthretreat.com.au/specialised-retreats/
      Cheers!
      Rory
    • petere21
      By petere21+
      I want to change meta info in postpins blog Editor offers me to do it with shortcodes: 
      Use shortcodes to customize the meta information for these pins.
      But I ma not able to set it by right way
      for example if I want to chande meta to show tags what is the right syntax? 
      [the_tags] doesnt work
×