• Resolved terryscott2

    (@terryscott2)


    Hi, I have been asked to look after a site that uses your plugin.

    I have a custom field already set up, it is an author over ride field. The field appears on the edit page for the articles, but when saved it does not appear on the site, can you help please?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Sounds like you are going to need to customize your theme’s templates if you’re needing to display custom field data. CPTUI doesn’t touch the template files at all, so that’ll be something you need to handle.

    Thread Starter terryscott2

    (@terryscott2)

    OK, so the authors of Advanced Custom Fields plugin told me it wasn’t their problem, speak to the theme developer, the theme developer said not their problem, speak to you guys, so who do I speak to?

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    In summary, this is all a matter of your site is using 2 plugins, Advanced Custom Fields and Custom Post Type UI, to set up and create content for your intended audience.

    If the theme developer(s) recommended/required those two plugins and had pre-configured things set up for the theme through it, say it’s a theme for movies and they set up fields for “Actors”, “Movie Genres”, “IMDb ratings”, and all this information around the topic of movies, then it’s the theme developer’s responsibility for that potential content.

    If the theme recommended/required those plugins, but perhaps you added your own custom information that you felt was important, using either of those plugins, then that’s your responsibility to also get it added to the frontend for visitors to see.

    If the theme does NOT require any of those two plugins, and you added them yourself to the site, then it’s also your responsibility to get added to the frontend for visitors. You would need to potentially make use of documentation especially around the theme and Advanced Custom Fields, to find the correct place to use the correct code to display newly saved custom field information.

    It may sound like I’m leaving CPTUI out of this, and to a degree I am, but that’s because we’re only a small part of the overall picture, and we’re not involved in anything that Advanced Custom Fields is doing on their side.

    Thread Starter terryscott2

    (@terryscott2)

    OK, so the previous dev installed it, but it does also come with the theme that I am now using.

    So everything is set up, I just need help getting it to display on the front end.

    I am not sure what to do

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Definitely understood on that part. Best I can think of for how to handle that would be seeing if the previous developer is able to take on some extra work here or needing to reach out to someone else to help handle.

    I would be able to help to small degrees, like pointing to code resources to potentially use, but I wouldn’t be able to help the whole way through.

    Thread Starter terryscott2

    (@terryscott2)

    That would be incredibly useful! As far as I can tell, everything is set up and working.

    Here is what happened – The site was hacked, badly, and I have rebuilt it, this has however meant I had to use a new theme, all good and after a lot of work we are back online and happy.
    So, this means the portion of the system that displays it on the theme is probably missing, code wise.
    If someone could help me with that part I think we’d be all set.

    Thanks again

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    If you still have a copy of the hacked theme, then someone should be able to extract out the parts that are fetching everything via ACF functions like get_fields() and similar. You’re going to have access to field names via the ACF settings panel way more than me, so I can’t say what to search for in that regard.

    Thread Starter terryscott2

    (@terryscott2)

    Oooh, I do have a backup of that, I will search now, thanks for the top tip!

    Thread Starter terryscott2

    (@terryscott2)

    I have found this code in a file called single-tpl.php

        $overrideAuthor = get_field('override_author');
        if(!empty($overrideAuthor)){
            $author = $overrideAuthor;
        }else{
            $author = get_the_author();
        }
    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Looks like code that’s set to fetch potential author override data, with fallback to standard author information. Both assign the $author variable for I assume later echo usage.

    Thread Starter terryscott2

    (@terryscott2)

    OK great! So how do I get that to display on my site? I am not sure

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    You need to re-add to your new theme template files, and at this point it’s probably going to be best to see about finding a developer to help, if you’re not sure at that point. They’re going to be able to help you going forward more than I can on the forums here.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Not displaying on site’ is closed to new replies.