• Resolved sim89

    (@sim89)


    Hi – I’m using the Custom Field Suite plugin to add fields to particular pages in the WP 2017 theme. My aim was for the information from those fields to only display on the relevant home page panel. However, I can’t find a way to target the fields on a particular panel – so they display on all of them. I would normally use is_page() to target a particular page, but 2017 theme turns pages into panels on the home page. I’m using CSS to hide the fields on all panels but the ones I want to target, but that doesn’t seem the best idea, as the information is still being loaded. Does anyone have any tips? The site is here https://www.test-909.co.uk/
    Thanks in advance.
    Sim

Viewing 4 replies - 1 through 4 (of 4 total)
  • Wow, first Sim Brody, you are now a design hero of mine. That is a great site. Love it. I am doing something similar, and am trying to do the same trick with text over those featured images on the home page. You did better than I did.

    https://i-cweb.com/restaurant3/

    But, I just started on this project.

    No help with this yet?

    Thanks,
    Denise

    Thread Starter sim89

    (@sim89)

    Hi Denise
    Thanks, that’s really appreciated – you site looks really nice too.
    No – had no responses and I couldn’t figure out a way to target the individual panels – so I went ahead with the CSS approach, which works ok but feels like a bit of a hack.
    It looks like you worked out how to get the text over the featured images as you wanted it? I just went for simplicity and absolutely positioned blockquotes from the associated article – so they should hopefully be easy for the client to change.
    Sim

    Sim,

    Thanks for your response. I think I got it.

    This is what I used instead of the overly complex way I was doing it before with not great results.

    I used meta tags (for my simple purpose, this worked). Adding this code to both the content-front-page.php, and the content-front-page-panels.php –

    <?php the_meta(); ?>

    It places it right in there according to the page selected, and it is easy.

    Thanks,
    Denise

    Thread Starter sim89

    (@sim89)

    Perfect – that sounds like a really elegant way to do it.
    I’ve finished on this project but it will definitely come in handy next time.
    Cheers

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add custom field data to specific panel on the home page’ is closed to new replies.