Site logo

Archived topic

GP and Elementor

8 replies · Started by King on August 27, 2021

Viewing posts 1–9 of 9

Hey, I'm sure this has been beaten to death... however, I am working with a dev to migrate from Elementor to GB blocks. I have the premium version of GB but wanted to get away from Elementor completely. He is saying I need Elementor for ACF because he is unable to create a second post template in GB, one for posts, and a second one for credit card reviews. Seems like a second template would work, the user goes to the drop-down menu under "Cards" to find a review and it takes them to that page, as well as a separate page that has them all as an archive. He's telling me I have to continue using Elementor. Is he right? Do I need to keep paying for Elementor forever?

Hi Cody,

When you say post template, are you referring to the content template in the block element of GP?

Well I don't know actually. In Elementor I designed a post template so each post looks the same as the others without having to format each one. I guess I assumed GB blocks has the same ability. Then I had to use ACF for a different credit card review since I couldn't create another template. My main reason for getting premium GB was to replace Elementor. Can I with sufficient workarounds?

Please specify what "that" is?

OK thanks for the links. I'll read them.

Here is my site: thecashstashers.com. You can use the drop-down menu to access a card review under "Cards". The template has some fancy icons that Elementor provides, and a star rating (don't know if GB has that or not) but after you get through with that, it's pretty much a plain vanilla article.

Posts have a post format. Image, title, author bio, a lead gen form at the bottom and then some additional posts the reader can check out if they like. If you click on a category like "Make" or "Save" it takes you to an archive page with all posts under that category, or you can use the drop-down menu to search for individual posts.

Dev is saying he can't make the credit card reviews a post template with an archive page and get rid of Elementor and ACF because they're needed in the back end. My whole reason for GB premium was to no longer need Elementor.

ACF lets you change fields so if a bonus was 50,000 miles instead of 75,000 you go into ACF and just change the field. If I have to do that manually to get rid of Elementor that's fine. I just want a simple solution and not a recurring payment.

Hope this explains...

That's definitely not something GenerateBlocks pro can do - it's not what it is for.

You can take a look at the pro options here:
https://generateblocks.com/pro/

I would say that you can ask your developer to take a look at the content template I mentioned to see if that's what he's looking for.

Hi there,

the Block Element - Content Template, with GB Free supports Custom Fields ( including ACF ).
The Dynamic Data option you would select is Post Meta:

https://docs.generatepress.com/article/dynamic-data/#post-meta

Which will provide a Meta Name Field, which is where you would add your ACF Field Name.
NOTE: It won't work with ACF Repeater fields at this time, but that doesn't look to be a requirement on your site.

Maybe i have missed something but it don't see the need for the GB Pro - data-attributes - which at this time DO NOT support dynamic data types.

For the Review Stars display you would need to create a simple shortcode that can be added to a Headline Block.
Heres an example PHP Snippet for creating that shortcode:

function make_star_bar() {
  $stars = get_field( "your_ACF_field_name" );
  $percentage = 100 * $stars / 5;
  $html = '<span class="star-bar">★★★★★</span>
  <style>
  .star-bar {
      background: linear-gradient(90deg, '. $value['color'] . ' ' . $percentage .'%, rgba(0,0,0,0) '. $percentage.'%);
      color: rgba(0,0,0,.2);
      background-clip: text;
      -webkit-background-clip: text;
      color: rgba(0,0,0,.2);
  }
  </style>
  ';
  return $html;
}

add_shortcode('star_bar', 'make_star_bar');

You need to change the your_ACF_field_name for the field name, which should be a numeric value.
And then you can add the shorcode: [star_bar] to your Content Template. To note: The Headline Block supports shortcodes.

This archived topic is closed to new replies.