Tagged: advanced layout builder, Custom Post Type, template
-
AuthorPosts
-
July 7, 2018 at 12:11 am #982291
Hi, I have a Custom Post Type and for simplicity want my clients to use the Advanced Layout Builder when they create these posts. I made a single-team_members.php file in my Child Theme, but changes there have no effect. The body tag of the single post has the class single-team_members in it.
I need to create a custom prev/next and also add a link to another page after the main content. When I try to add it as a code block in the ALB it doesn’t execute the wordpress functions like previous_post_link( ).
Anything I add to the new single template isn’t working either, I tried to put it in there (I ever tried simply putting in some new plan text). So it’s clearly not using that template.
When using the ALB for a single post, what template gets used?July 9, 2018 at 4:53 pm #983207Hey mickfollari,
There is no template that you can duplicate and load from a child theme – at least yet.
Our dev team is working to make something for that although.Best regards,
BasilisJuly 10, 2018 at 9:35 pm #983846Thanks Basilis. As a follow-up, is there a hook after the ALB content I can target? I could insert my content that way if there is one.
I may have to revert to a non-ALB method for this to help make that happen, and also because they may want these CPT’s to pop-up (I can write up the code for Magnific to do so) but I woudl strip out he header/footer and therefore need a template I can edit.
July 10, 2018 at 9:52 pm #983866And, just a quick question again about executing wordpress functions in a code block in the ALB… does that work? it seems not to. Or is there a way to create a ‘hook’ in the ALB code block where I could then inject something from my funcitons.php?
…also can you tell me how the existing ‘prev/next’ is inserted into the post? It seems to be nowhere in the index-loop or other templates so I’m assuming it’s some js.
Thanks- This reply was modified 6 years, 4 months ago by mickfollari.
July 11, 2018 at 11:11 am #984125Hi mickfollari,
Here is the function for the post navigation
https://codex.wordpress.org/Next_and_Previous_LinksWhat kind of hook do you want to use or what kind of code do you need to run?
Best regards,
VictoriaJuly 11, 2018 at 3:24 pm #984260Hi Victoria
I know how the next/prev work but I need to edit them and I can’t fine where they come from in this particular template.In the ALB if I could either use WordPress php functions (like the ones you mentioned) or create a hook on the page I could insert my custom prev next codes. I tried the WordPress php but it didn’t work for me. Thx
July 12, 2018 at 7:34 pm #984855Hi,
That does not exist on something that you can use to get it done.
We do not have such options at our theme we are afraid.Best regards,
Basilis -
AuthorPosts
- You must be logged in to reply to this topic.