Site logo

[Support request] GP and Elementor

Home Forums Support [Support request] GP and Elementor

Home Forums Support GP and Elementor

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1910294
    King

    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?

    #1910296
    Leo
    Staff
    Customer Support

    Hi Cody,

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

    #1910314
    King

    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?

    #1910322
    Leo
    Staff
    Customer Support

    That’s not something GenerateBlocks offers.

    But you can create a content template for single posts though:
    https://docs.generatepress.com/article/block-element-content-template/

    #1910327
    King

    Please specify what “that” is?

    #1910350
    Leo
    Staff
    Customer Support

    It allows you to create templates for things like single posts or archive pages with the help of dynamic data:
    https://docs.generatepress.com/article/dynamic-blocks/
    https://docs.generatepress.com/article/dynamic-data/

    Can you link me to an example of what you are trying to achieve?

    Perhaps duplicate an existing page then switch out the content in order to create new pages would be sufficient for what you are trying to do?

    #1910357
    King

    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…

    #1910584
    Leo
    Staff
    Customer Support

    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.

    #1910811
    David
    Staff
    Customer Support

    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.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.