1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 How to remove forumLink from sidebar New Posts

Discussion in 'Styling and Customization Questions' started by loplo, Dec 27, 2015.

  1. loplo

    loplo Active Member

    Hey,
    I'm trying to remove forumLink from the New Posts sidebar module.

    I've found that this is the code in the css that controls it, but I'd like to disable it via extra.css, instead of deleting it.
    Code:
    .threadListItem .additionalRow
    {
        overflow: hidden;
        white-space: nowrap;
        word-wrap: normal;
        text-overflow: ellipsis;
    }
    Thanks!
     
  2. wang

    wang Well-Known Member

    To remove the forum link from the New Posts sidebar widget, you must remove this code from the sidebar_new_posts template.

    HTML:
    <div class="additionalRow muted">
                    <a href="{xen:link forums, $thread.forum}" class="forumLink">{$thread.forum.title}</a>
                </div>
    Or better yet, wrap it inside the <xen:comment></xen:comment> tags.
     
    loplo likes this.
  3. loplo

    loplo Active Member

    I wouldn't like to change the template, this is why I'm looking for an extra.css solution.
     
  4. Dadparvar

    Dadparvar Well-Known Member

    Then you may add a display: none; to its selector.
     
    loplo likes this.
  5. loplo

    loplo Active Member

    adding display: none hides the username and post time info too.
     
  6. Dadparvar

    Dadparvar Well-Known Member

    When you get forumlink's selector it just will do that. No?
     
  7. Dadparvar

    Dadparvar Well-Known Member

    for example I tested this now:
    Code:
    div:nth-child(3) > a.forumLink
    and the result:
    forumlink.gif
     
  8. loplo

    loplo Active Member

    On the left is the clean version, on the right the following code in extra.css

    Code:
    .threadListItem .additionalRow
    {
        display: none;
        overflow: hidden;
        white-space: nowrap;
        word-wrap: normal;
        text-overflow: ellipsis;
    }
    [​IMG]
     
    Last edited: Feb 26, 2017

Share This Page