It would be very important and useful to add Excrept valuse and featured image value from default wordpress features.
Now we are editing out pages in Bricks Builder, but when / if want to use Featured image or Excrept features, we have to quit from Bricks go to default wordpress gutenberg editor and add these. After save and go back to Bricks.
I think it is very useful and powerfull feature if add example the page options > General tab.
Of course, the real thing would be if we used an already existing function of Wordpress, rather than something separate. Thus, compatibility and interoperability would be complete.
I think I was misunderstood. I am aware that the featured image (already loaded) can be called up dynamically in the Bricks editor, just as I am also aware that there is an excrept element.
1.)
Featured image ASSOCIATION is not resolved within the Bricks editor.
2.) The Excerpt solution is not good in this form, as it is now available in the Bricks editor. Because there are many cases when we fill it in, but we don’t necessarily use it, we call it dynamically only in rare cases.
Currently, the featured image can only be called up dynamically in the Bricks editor, but it is not possible to set such an image. To do this, you need to go back to the Gutenberg editor and set it there.
Same problem with Excerpt. If I use the Bricks Editor Excprt element, it will definitely appear on the page. However, if this was also integrated into e.g. the page options > General section, then I could enter the text here and it would only dynamically call up on another page if I need it!
@simplecreative I do understand what the problem is, because i have it myself
I coded a solution. You can download it here:
How it works:
Since the Bricks controls API is very limited, and there’s no way to update the actual featured image using it, i took another approach. The featured image is actually just stored in the Bricks page settings but being synchronized with the post on save.
It works both ways - meaning if you update the post using classic editor or Gutenberg, it will update the data in the Bricks page settings as well.
It automatically recognizes the post types that you have enabled Bricks on, so it only runs on those.
I’ve added some custom CSS to hide the size and URL fields, as they are not used in Featured Images, but cannot be removed in the Bricks controls API.
Disclaimer:
I just finished coding it about an hour ago. I’ve tested it, and it doesn’t seem to have any side effects, but i can’t guarantee anything
How to use:
You can either copy the code and paste it into your functions.php, or create a separate file (for example featured-image.php) and include it (@me if you don’t know how to)
Sounds great. Since Google seems not not recognize the preferred images I chose in Gutenberg editor.
I have no experience with php files. But all I need to do is create another file with the name you propose, put the code in it and upload?
In your child theme (hopefully you use one ) create a new file named featured-image.php
In this file, paste the full code from my link and save it.
After this, go to your functions.php and put this code in a separate line: require_once('featured-image.php');
Now, should have the expected functionality.
If it doesn’t work, i can make it into a plugin for you. This code was honestly just meant as a quick fix until (if) the team behind Bricks someday decides to implement this in the builder themselves. Thats why i just made it as a Github Gist.
I’m not sure i understand the Google issue you’re mentioning and if there’s even a relation to this. This just gives you the option to set the featured image directly in the editor instead of having to switch editor to change the featured image. You would still need to render the image using the Bricks editor with an image that uses the dynamic data source {featured_image}
Hi there. Thanks a lot for this explanation to a complete beginner. But now I see the point and I think, I do not need to make use of your solution. But thanks again.
BUT: If you are willing to help in another matter, this would be very much appreciated, because I am stuck and nobody replies to my question, which can be found here:
Ok, I admit that this is not really something that concerns Bricks, but I also posted in StackOverflow and other forums. So maybe you do have an idea …
Best, Laic