- This topic has 4 replies, 2 voices, and was last updated 6 years, 1 month ago by Tom.
-
AuthorPosts
-
March 21, 2018 at 8:22 am #525506Cristina
So I’ve tried before to do a custom post type for work.
Installed ACF and CPT UI, but no way did i manage to achieve a similar blog post on a project.So to the beginning i went, new localhost install, nothing in here (a brand new DB and WP installation) and still the custom fields from wordpress (no plugin) do not appear on any post. I mean real post.
No i’m not versed on php, that’s why I gave up on trying to create my templates in child theme.
But really? What is the problem with custom fields on this theme?I’ve checked the blog settings, there’s nothing wrong also.
So, no custom ‘native’ WP fields, neither on gp theme or its child.
What am i missing?All help is most appreciated.
March 21, 2018 at 8:54 pm #525961TomLead DeveloperLead DeveloperHi there,
How are you trying to output your custom fields?
Once custom fields are created, they need to be output on the page using PHP (either straight code, or a shortcode).
March 22, 2018 at 7:23 am #526313CristinaHi,
In the localhost (new test) I’ve tried adding the code to php, but either nothings happens or the page goes blank, so i don’t know really.
It’s frustrating…On another test (on the live site) i got somewhat closer image
But, i have categories for my projects but they are not appearing.
See the image, i even got the navigation between projects, but i can’t seam to replicate the part of code from blog that has the icon with a folder, stating the category.Also, i have now: featured image; title; content; tag, nav, custom fields…footer.
I wanted : image; title; content; [space for anything else], custom fields and then, tag, nav, …footer.Even though outsourcing this part, but i was asked 75dlr for a CPT template :/
This is what is inside my child theme: child files
March 22, 2018 at 3:47 pm #527036CristinaSo i thought could register the project template…
<?php /** * Template Name: Project * Template Post Type: post, page, project */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. }
see its there template project here
Is it because i named ”groups” for categories they don’t appear?
March 22, 2018 at 8:27 pm #527217TomLead DeveloperLead DeveloperI’m not really sure what you mean re: your second question. Doing that at the top of the file should make the template appear in the “Page Template” area when adding a post, page or project. Is that not working?
As for the first issue, it looks like you’re using ACF?
If nothing is appearing, it could be:
a) The fields aren’t saving.
b) No fields exist for that post ID
c) The name is wrong when calling the custom fieldIf the screen goes white, it means there’s a PHP syntax error.
It may be something you need to bring up with ACF support, as that functionality isn’t a part of GeneratePress by default.
PHP is difficult and can definitely be frustrating to learn.
-
AuthorPosts
- You must be logged in to reply to this topic.