WordPress.org

Ready to get started?Download WordPress

Forums

Post Category Index Generator
[resolved] Adding Bold or Italicize text option to categories and subca (12 posts)

  1. optein
    Member
    Posted 2 years ago #

    Hello, How could I go about editing the Post Category Index Generator (PCIG) plugin such to make the categories in the tree Bold or Italicized font, and leaving the linked posts or sub categories as regular font?

    http://wordpress.org/extend/plugins/post-category-index-generator/

  2. Marco Constancio
    Member
    Plugin Author

    Posted 2 years ago #

    Hello, you will have to modify the css of theme. I added a few classes in the latest version to allow easier styling, so update to that version.

    After that you problably want to add to the css of your theme something like this:

    .pcig-ul-list{
    font-style: italic;
    font-weight: bold;
    }
    .pcig-category-link{ font-style: normal; font-weight: normal; }
    .pcig-subcategory-link{ font-style: normal; font-weight: normal; }
    .pcig-post-link{ font-style: normal; font-weight: normal; }

  3. msrosyidi
    Member
    Posted 2 years ago #

    Can I make a different list-style-type for category, sub category and post link?
    I try this:

    .pcig-ul-list{
    font-style: italic;
    font-weight: bold;
    }
    .pcig-category-link{ font-style: normal; font-weight: bold; list-style-type: square;}
    .pcig-subcategory-link{ font-style: normal; font-weight: bold; list-style-type: circle; }
    .pcig-post-link{ font-style: normal; font-weight: normal;list-style-type: disc; }

    but it does not work.

  4. Marco Constancio
    Member
    Plugin Author

    Posted 2 years ago #

    No, think it will not work because:

    -list-style-type is a option for list elements (ul, ol, li) not for links.

    -in order to change the list-style-type based of the content of the list elements you will probably have to use javascript to do that.

  5. msrosyidi
    Member
    Posted 2 years ago #

    Thanks for your answer and your useful plugin. But I don't understand javascript. Now I use different font size for category and sub category only.

  6. astrasuite
    Member
    Posted 2 years ago #

    Which css ? I don't seem to find any css file in this plugin's directory (folder) ...

    I mean I can edit the css of my theme and add these as custom, but we don't need any css file in your plugin's directory ? Just wondering, as I am no Javascript person.

    Thanks

  7. Marco Constancio
    Member
    Plugin Author

    Posted 2 years ago #

    The css of the theme. The plugin does nees any css file, I just added extra classes on several html elements to make easier for those who wanted to style the index.

  8. astrasuite
    Member
    Posted 2 years ago #

    Thanks !

  9. optein
    Member
    Posted 2 years ago #

    Thank you for the updates to styling.

    I see the last update was for the top ul element. Is this to allow for changing the style of the ul element without changing the subcategories? If so, what is the css code needed to do that? I would like to have the top ul elements as bold and subcategories as italics.

  10. Marco Constancio
    Member
    Plugin Author

    Posted 2 years ago #

    Something like this should suffice:

    .pcig-top-ul-list {
    font-weight: bold;
    }

    .pcig-top-ul-list > .pcig-ul-list{
    font-weight: normal;
    font-style: italic;
    }

  11. astrasuite
    Member
    Posted 2 years ago #

    Here is mine, don't know if optimal, but it works for me :

    .pcig-ul-list li {margin-top:20px;}
    .pcig-top-ul-list ul li {margin-top:5px;}
    .pcig-category-link{ font-style: normal; font-weight: bold; }
    .pcig-subcategory-link{ font: normal 15px "Trebuchet MS", Arial, Helvetica, sans-serif; color:#515151; margin-top: 30px; font-weight: bold;}
    .pcig-post-link{ font: normal 14px Arial, Helvetica, sans-serif; color:#515151; margin-top: 30px; }

    The result is here (Used HiFi For Sale is the category, the rest are subcategories) :

    http://www.astrasuite.com/astrablog/used-hifi-for-sale/

  12. optein
    Member
    Posted 2 years ago #

    Thank you! looks great.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic