Support Forum » User Profile

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • ChristianChristian
    Participant

    in the case of saving data a custom table? should I also call up the table?

    example my table where i save the custom fields is called custom_mb_field

    i tried following this guide
    /**
    * Action: 'rank_math/vars/register_extra_replacements' - Allows you to add extra variables.
    * Snippet to register the variable that will return the number of posts in the current term.
    */
    add_action('rank_math/vars/register_extra_replacements', function () {
    rank_math_register_var_replacement(
    'term_count',
    [
    'name' => esc_html__('Term Count', 'rank-math'),
    'description' => esc_html__('Number of posts in the current term', 'rank-math'),
    'variable' => 'term_count',
    'example' => term_count_callback(),
    ],
    'term_count_callback'
    );
    });
    term_count_callback() function
    {
    $term = get_queried_object();
    return isset($term) ? $term->count : null;
    }

    available at this link https://rankmath.com/kb/variables-in-seo-title-description/#how-to-add-custom-variables

    and I tried saving it inside wpcodebox2 but it always returns the empty field

    in reply to: Can't create any list in any way #41882
    ChristianChristian
    Participant

    Thank you very much for your reply. I already did the lists with text fields but I can see some problems with this solution:

    1. It is not scalable - I'm forced to create as many text fields as the ingredients are
    2. It is not self manageable - Our customer is not able to add other text fields so we will need to add text fields on their account every time
    3. we're using a builder (Bricks Builder in this case) so I can't retrieve all the fields in a single way and, once again, I would be forced to edit the template to add dynamic fields for every specific text field that will be added in future

    Isn't there a better way to handle this kind of informations? As far as I can see the WYSIWYG problem isn't that news.

    Please let me know it.

    Thanks and best regards.
    Christian

Viewing 2 posts - 1 through 2 (of 2 total)