Grow your CSS skills. Land your dream job.

Help link to page instead of post using custom field

  • # January 16, 2013 at 12:08 am

    Hi,
    I’m using the Imbalance theme for our site [www.finedecor.se](http://www.finedecor.se “”) and have stumbled upon a problem. I want to have all posts in main page linked to different address’ instead of the corresponding post and permalink. I tried to use a solution found here and provided by the user “The Doc”:

    http://css-tricks.com/forums/discussion/13569/custom-field-or-/p1

    using a custom field with the proper address but that takes only care of one of the links orpost. I have solved it temporarily with a html redirect but that isn’t as effective as it could be.

    I found a site using Imbalance that works like I want: [www.eduardorh.com](http://www.eduardorh.com “”)

    my original code in index.php

    `

    < ?php echo "$thumbID"; ?>

    `

    and here’s the solution provided by TheDoc:

    `

    `

    Question is how to solve if you have multiple (nine) post with nine different custom fields? I’m thinking of some sort of if-sentence but my knowledge is somewhat limited.

    Thanks in beforehand for any help on this! Please let me know if you need to whole index.php

    # January 16, 2013 at 12:12 am

    ..

    # January 16, 2013 at 12:24 am
    Check out this Pen!

    # January 17, 2013 at 11:54 pm

    Solved: It was me not knowing exactly how the custom field worked. Obviously you should set one custom field and then at each post call for that custom field with a unique value set for each post. Thank you TheDoc for the solution provided.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".