Removing "Project Type:" From Page Headers

  • Author
    Posts
  • #2946356

    travelluster
    Member

    Hello!

    I use the Booklet template and have two Pages that are pulled from two different Portfolio project types.

    Currently when you’re on those pages, at the top it says “PROJECT TYPE: SHORT STORIES” and “PROJECT TYPE: REVIEWS”.

    Is there a way to remove “PROJECT TYPE:” so it just says “SHORT STORIES” or “REVIEWS”?

    The advice I’ve gotten so far is that it’s all or nothing, but I’m really hoping there is a work around.

    Any advice?

    Thanks!

    The blog I need help with is lifeinmiles.com.

    #2946553

    Hi @travelluster, the theme and WordPress software create those titles as a single string of text, so we can’t remove just part of that string. We can do a bit of CSS trickery and hide the existing titles and then use CSS to add just name back in. If you are going to have more project types in the future, you would have to create CSS rules for each of those also. Here is the CSS for Short Stories and Reviews.

    .tax-jetpack-portfolio-type .entry-title {
      visibility: hidden;
    }
    .tax-jetpack-portfolio-type.term-short-stories .entry-title:after {
      content: "Short Stories";
      visibility: visible;
      display: block;
      margin-top: -50px
    }
    .tax-jetpack-portfolio-type.term-reviews .entry-title:after {
      content: "Reviews";
      visibility: visible;
      display: block;
      margin-top: -50px
    }

    As an alternative to the above, if you are going to have more and don’t want to have to create CSS for each of them, the following will hide the titles on the project pages.

    .tax-jetpack-portfolio-type .entry-title {
      display: none;
    }

    #2946636

    travelluster
    Member

    Thank you! Unfortunately, when I use the first option, it’s doubling up on all the text (i.e. it has just “Short Stories” but underneath that, it still says Project Type: Short Stories” and all of the stories on that page have “Short Stories” layered over them). It’s quite mysterious. Any insight on why that would be happening or how to fix that? Thanks so much!

    #2946639

    Hi, when put the code directly into your customizer, it works for me. Can you try again and make sure you add the code below all of the info text in the CSS entry area?

    #2946640

    travelluster
    Member

    Great.

    Tried again and it works at the top of the page, which is awesome (and not sure what I did wrong before, apologies).

    Unfortunately, it also changed the title of all posts on those pages to be either Short Stories or Reviews rather than the title I’d given them (i.e. Trunkh, Siem Reap.” Mysterious. Any insight on how to fix that?

    Thanks so much for your help!
    Cheers!
    Anita

    #2946648

    Wow, sorry I didn’t notice that. I looked at the CSS and HTML again, and add this, which has more specific CSS selectors to limit it to just the page titles.

    .tax-jetpack-portfolio-type .archive-header .entry-title {
      visibility: hidden;
    }
    .tax-jetpack-portfolio-type.term-short-stories .archive-header .entry-title:after {
      content: "Short Stories";
      visibility: visible;
      display: block;
      margin-top: -50px
    }
    .tax-jetpack-portfolio-type.term-reviews  .archive-header .entry-title:after {
      content: "Reviews";
      visibility: visible;
      display: block;
      margin-top: -50px
    }

    #2946657

    travelluster
    Member

    Hi, there.

    Sorry this is such trouble — it’s still not working.

    Is there a way to assign portfolios to pages? I think if I could just create a page for Reviews and a page for Short Stories all would be solved. I know how to create the pages, but not how to assign the project types to them.

    Do you think that could work?

    Thanks so much for your help!
    Cheers!
    Anita

    #2946658

    You can use the Portfolio Shortcode on static pages. The styling will be different than the full Portfolio pages, but you might try it on a new draft page and then preview it to see what you think.

    #2946659

    Hi there, I tried to change the written code above to fit my needs, but I’m stuck.
    My issue: I have a portfolio page that lists all entries with a specific project type. So far so good. Now, when I am on that page, at the top it says: Project Type: Work. Ideally, I would like to delete the “Project Type:” and just have “Work” there. Any ideas how to get this done?

    #2946660

    The theme and WordPress software create that page title as a single string of text, so there is no way to hide just part of it. We can use a bit of CSS trickery to replace that title, but you would need to create CSS rules for each and every portfolio type page. This would be the code for your Work page, which uses a unique CSS class from the opening body html tag for the page.

    .archive.term-short-stories .entry-title {
      visibility: hidden;
      font-size: 1px;
    
    }
    .archive.term-short-stories .entry-title:before {
      content: "Work";
      visibility: visible;
      font-size: 32px;
    }

    We can also hide the entire thing with the following custom CSS though.

    .tax-jetpack-portfolio-type .entry-title {
      display: none;
    }

    #2946661

    Thanks. I tried that before. Doesn’t work for me, sadly.
    When I try “.tax-jetpack-portfolio-type .entry-title {
    display: none;
    }” the project title disappears but the title “Project Type: Work” still stands. Where as it should be the other way round.

    The first code doesn’t seem to work at all.

    #2946662

    @misswalters5430, you are using the Sela theme, which is different from the theme the other user has on their site, and CSS is theme specific. Can I ask you to create a new thread in the CSS Forum? Many thanks in advance.

    #2946663

    @thesacredpath, yeah, I get that. I have another wordpress domain that is indeed using the Olsen theme, hence my post here.
    And I would gladly appreciate any insights in how to fix this issue.
    Thanks

    #2946664

    @misswalters5430, the above code was specific to the original poster’s category names, so unless you had the exact same category name it would not work. I see two published projects under Work, and that page is using the Portfolio Shortcode and has a title of “Work”.

    Are you going to stick with the Portfolio Shortcode? The CSS above would have to be changed to work with your project types names and such and the CSS is specific to the Project Types names.

    #2946665

    travelluster
    Member

    Hi, there. Just wanted to chime in that the css didn’t work for me either. Still looking for a solution. Cheers!

    #2946666

    @travelluster, I just added the CSS I had given in my first reply directly at Customize > CSS on your site, and it works for me. When I switched from Short Stories to Reviews in the Customizer Preview, it did not show the change on that page, but the code actually does work. Try adding it again and saving and then visit your site.

    @misswalters5430, you may also want to try adding the code I gave you and save and then visit your site to see if it is a problem with the Preview in the Customizer.

    #2946668

    travelluster
    Member

    Yay, it worked! Not sure what I was doing wrong before, but thanks so much for your patience with me. Cheers!

    #2946669

    No worries, and you are welcome.

The topic ‘Removing "Project Type:" From Page Headers’ is closed to new replies.