Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Display category in project page

Display category in project page

Scheduled Pinned Locked Moved General Discussion
4 Posts 2 Posters 467 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F
    F
    franksvamp
    wrote on last edited by
    #1

    Hey there!

    I was wondering if there was a way to display the categories of a project in the project's page.

    Best case scenario would be to give it a specific div so I can style each category.

    Do you think it would be possible? That could be done with some PHP code right? or should I manually write the project categories for each project? (preferably not hehe)

    Best,

    Frank

    1 Reply Last reply
    0
    • RichardR
      RichardR
      Richard
      Global Moderator
      wrote on last edited by Richard
      #2

      Dear Frank

      @franksvamp

      Sorry that i cant go deeper into custom coding at the moment but in my opinion this would be best ( i'm not always right, and i'm sure you already knew this 🌝 )

      I hope some other users speak up too!

      For example the category data (id's) is stored in the body of your project:

      Screen Shot 2022-02-26 at 6.05.35 PM.png

      You could use these to your advantage, or use jQuery to return values of categories as well

      https://laytheme.com/documentation/custom-javascript.html

      See what you get in the developer console when this is added:

      <script>
      window.laytheme.on("newpageshown", function(layoutObj, type, obj){
      	console.log("layoutObj", layoutObj);
      	console.log("type", type);
      	console.log("obj", obj);
      });
      </script>
      

      Best
      Richard
      1 Reply Last reply
      0
      • F
        F
        franksvamp
        wrote on last edited by
        #3

        Hey @Richard ,

        indeed I get an array with the "catid" values.

        Screen Shot 2022-02-26 at 16.36.10.jpg

        However I'm struggling to get the category names out of the id.

        F 1 Reply Last reply
        0
        • F franksvamp

          Hey @Richard ,

          indeed I get an array with the "catid" values.

          Screen Shot 2022-02-26 at 16.36.10.jpg

          However I'm struggling to get the category names out of the id.

          F
          F
          franksvamp
          wrote on last edited by
          #4

          @Richard @Armin-Unruh ,
          Do you think I should write a custom jquery script that translates each number to it's actual category name? and then for each category, display it as a button?

          Or is there a way easier way that I'm not aware of?
          my first obvious solution was to PHP get-category, but I see that it is impossible in Laytheme, right?

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          Online Users
          GonzaloG
          Gonzalo
          Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
          laytheme.com
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Recent
          • Tags
          • Popular
          • Users
          • Search