- This topic has 38 replies, 3 voices, and was last updated 1 year, 5 months ago by David.
-
AuthorPosts
-
October 20, 2022 at 9:43 pm #2380684Fernando Customer Support
I see. Let us know if you’ll need assistance with anything else.
October 20, 2022 at 10:42 pm #2380705DarrylAfter several hours.. just realized the entire Block Element approach to placing my navigation pages won’t work…
While the primary and secondary navs are consistent across x pages… the left hand Headline and middle “text” changes on certain pages.. and if I change the block in one place it changes everywhere…
so I’m still better off either trying to set up a child theme.. or just manually adding a nav block on every page I create, which creates an extra step when I am trying to focus on content.
Any suggestions?
October 20, 2022 at 10:49 pm #2380709Fernando Customer SupportYou’ll need to use a GenerateBlocks Headline Block. Then, enable Dynamic data.
Reference: https://docs.generateblocks.com/article/headline-overview/#dynamic-data
You should be able to dynamically retrieve meta data unique to posts through that. Example for title: https://share.getcloudapp.com/6quG1rqZ
October 20, 2022 at 11:08 pm #2380724DarrylOk.. thanks for that… that solved the Title part of my problem… but what about the middle “text” section illustrated as a place holder… I may want that to be blocks containing images, text, etc…
How do I handle that ?
October 20, 2022 at 11:58 pm #2380753DarrylSo I created a custom page and the gp CHILD theme is active:
$ ls generatepress_child/ content-custom-page.php css custom-page.php functions.php functions.php~ js screenshot.png style.css
$ cat generatepress_child/content-custom-page.php <?php /** * Template Name: Page template * Template Post Type: page * @package GeneratePress */
So now… How do I select the custom page so that I edit and make new pages?
There isn’t an option for the template in the menu
October 21, 2022 at 12:11 am #2380765DarrylRealized my idiotic nature… created child theme in wrong terminal window (wrong server) ignore the last post
October 21, 2022 at 12:27 am #2380780DarrylOk … I got the page templates to be available correctly…
What I don’t understand is how do I get my various nav blocks to appear by default for each relative template, without running into the same problem, I faced above using the Block Element.
October 21, 2022 at 12:58 am #2380806Fernando Customer SupportIf you’re using a Content Template on a static page, you can use a Dynamic Content Block. Reference: https://docs.generatepress.com/article/dynamic-blocks/#dynamic-content
This Block can pull the unique content of each page.
With the “Nav Blocks”, are your referring to the default Header or the WP Navigation Block?
October 21, 2022 at 1:16 am #2380822Darrylthanks for trying, but the content types within the dynamic blocks are far too limited…
I am thinking of images with popover content, maybe guided tour js script…
When I say “Nav Block” I am referring to the Headline, primary nav, “text” block, and secondary nav menu that I created inside of one grid and added to reusuable blocks..
October 21, 2022 at 1:19 am #2380825DarrylAt this point, I am starting think that I am better off just manually adding the my block for each page I create… unless you can tell me how to my block to appear by default on a custom template page that I created (screenshot above)..
October 21, 2022 at 1:21 am #2380826Darryl…. appearing in such a way that I am still able to edit it as necessary on some pages… which is what I can’t do with the block element
October 21, 2022 at 1:42 am #2380844Fernando Customer SupportIn general, these are the two template files used for the Page Template by default:
https://github.com/tomusborne/generatepress/blob/adfe090929b0515cdf894f4c6b722cfe8c0790dc/page.php
https://github.com/tomusborne/generatepress/blob/master/content-page.php
You’ll see that there’s GP hooks in these files.
If you’re creating a custom Template, it would be best to include the Hooks so you can use them in your Elements.
The default header works with the
get_header();
line. theheader.php
file also includes hooks. You’ll need this line or the hooks in this file to assure that the Nav will work in your custom templates.October 21, 2022 at 6:19 am #2381073DarrylOk… my child theme experiments have not been going well. I don’t have a lot of time to keep troubleshooting… so in order to save a full-day’s progress, I need to re-visit the dynamic content blocks that you told me about previously.
I was quick with my assessment, maybe I made too much of an assumption.
Most guided tour scripts an href link on an element such as an image or text.
Question 1:
If I used a dynamic image block with a featured image that had an href link possibly containing “rel” or other attributes do you possibly foresee any problem with the script launching?Question 2:
If I use a dynamic content block, can I somehow specify the exact content to be display using tags of some sort (I assume). And can that content itself contain links?October 21, 2022 at 8:22 am #2381348DarrylSeems my initial reactions to the gp dynamic blocks were correct
Question 1: no links can be added to the featured image, so that kills any thought of a pop-over or tour link
Question 2: I can’t control / specify what body content gets used in the block, its just grabbing the first 55 words.. while it does accept links… it doesn’t accept body content images thereby killing any notion of popvers or guided tours again…
At this point I am better off cutting my losses on the issue and just manually add my navs on every page… :-/
October 21, 2022 at 9:30 am #2381432DavidStaffCustomer SupportI am not sure what it is you want to achieve, but it sounds like a re-invention of the wheel.
For example:
At this point I am better off cutting my losses on the issue and just manually add my navs on every page… :-/
Are you wanting a different Navigation on every page ?
-
AuthorPosts
- You must be logged in to reply to this topic.