Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 34 total)
  • Author
    Posts
  • in reply to: Hide Block Editor #45454
    zenjukai@gmail.com[email protected]
    Participant

    Still works fine for me. Make sure you change 'post' to 'page' if you are wanting it to work on your pages.

    If you need it for both posts and pages, then use this.

    // Remove the editor. Change 'post' to your custom post type.
    add_action( 'init', function () {
        remove_post_type_support( 'post', 'editor' );
        remove_post_type_support( 'page', 'editor' );
    } );
    in reply to: Twig HREF Markup #41771
    zenjukai@gmail.com[email protected]
    Participant

    Sorry Peter, but again I am not sure what page you are on, but the link you provided has nothing to do with the issue or question that I asked.

    I am NOT needing to generate PHP code to then apply to my functions file, as I would be deactivating the Met Box plugin.

    I am NOT using PHP!!! I am using HTML and Twig -- NOT PHP!

    I am creating a GUtenberg Block via the Custom Fields extension within Met Box AIO. I choose "Code" for the Rendering option, NOT PHP or a template, but code. I then type my own markup using standard HTML and Twig.

    So again, the question I am asking (and it seems you don't have it) is, "What is the Twig syntax to put in the HREF so one can output the custom field value"???

    If you can't answer the question, then please find someone who can. Thanks

    in reply to: Twig HREF Markup #41760
    zenjukai@gmail.com[email protected]
    Participant
    in reply to: Twig HREF Markup #41759
    zenjukai@gmail.com[email protected]
    Participant

    Hey Peter,

    Sorry, but I think you are not on the same page. I am not using PHP, I am using MB Blocks and rendering in the Code module, building it with HTML and Twig templating, so cannot generate any PHP code for you.

    What I am simply asking is, what is the Twig syntax to use within a href when calling the Page Field?

    null

    in reply to: Twig HREF Markup #41754
    zenjukai@gmail.com[email protected]
    Participant

    Hey Peter,

    Sorry if it was confusing ... I know about href and anchor tags, what I am referring to is the Twig markup for the href.

    In my code you can see I am using either {{ hero_button_1_url }} or {{ hero_button_2_url }} to reference the custom field name. As you can see they are using the button tag, so I have a custom field for the button name and also the button href (which is using the Page field.

    In my example the front-end output breaks and it is caused by {{ hero_button_1_url }} or {{ hero_button_2_url }} within the href, so my code is not correct.

    in reply to: Query Post Not Working #41596
    zenjukai@gmail.com[email protected]
    Participant

    Update: Nevermind the post -- I see what the issue was.

    I was trying to apply this to a single page and not an archive. I needed to use the custom query and now all works just fine.

    in reply to: UI Changes on fields with a Page #40094
    zenjukai@gmail.com[email protected]
    Participant

    Hey there,

    Yes, some border, background, padding to help separate the different areas of data. MB is just a white block and very messy -- where ACF is clean and much easier to read.

    JUst a thought. Cheers

    in reply to: Hide Block Editor #35201
    zenjukai@gmail.com[email protected]
    Participant

    Perfect, thank you Long, that will do the trick. =)

    Cheers

    in reply to: Hide Block Editor #35178
    zenjukai@gmail.com[email protected]
    Participant

    Hey Long,

    Thank you for your reply and yes, I know I can do that with the custom post type. But what if I do not use a post type and just creating a custom fields for say a view template?

    What I am ding is using metabox as a page builder -- so I would create a custom field group and them show it on a specific page. What I don't want showing up is the extra content editor, as I will have specific areas where the page content will be.

    Are you able to do that? Or does it require a custom post type?

    Cheers

    in reply to: Fields not rendering in View #30898
    zenjukai@gmail.com[email protected]
    Participant

    Hello there,

    Awww, that makes sense -- so it was me making the mistake. =)

    Thanks for your help and the solution.

    Cheers

    in reply to: Fields Not Showing in Views -- or Frontend #30878
    zenjukai@gmail.com[email protected]
    Participant

    Hey folks,

    Sorry to reopen this thread ... but I noticed another issue that is related to this posting.

    I can get the fields to render no problem now in the archives page, but that is it. It will no render the fields data on single page, single post, or shortcode.

    Any thoughts?

    Here is a video showing what I am running into: https://www.youtube.com/watch?v=ft8TI3J8qQw

    Cheers

    in reply to: Fields Not Showing in Views -- or Frontend #28695
    zenjukai@gmail.com[email protected]
    Participant

    Awesome, thanks Long ... appreciate that -- it also might help folks out, was a hair puller for sure. =)

    Cheers

    in reply to: Fields Not Showing in Views -- or Frontend #28680
    zenjukai@gmail.com[email protected]
    Participant

    Hey Long,

    Yes post type plural name is "Animals", the slug, which is autogenerated from the "Singular Name" is "animal". I also tried to change the slug so that it is plural as well, but did not work.

    So after some digging (and maybe this should be put into your documentation) is that when you are adding that page/archive to your menu, you cannot add it from your "Pages" section, but rather from the post type section. You have to click on that post type, then "View All", then you have the Animal Archives which then shows the correct information.

    So all is working but again this should not be so hard. Maybe consider updating your documentation with some clear understanding.

    Cheers

    in reply to: SVG with Image Advanced Custom Field #28470
    zenjukai@gmail.com[email protected]
    Participant

    Hey Long,

    Thank you ... yes, I also came to that conclusion this morning after doing some Googling. I did find that the solution above that I mentioned is the best option in this case.

    {% for item in post.icon %}
    <img src="{{ item.full.url }}" width="42" height="42" alt="{{ item.full.alt }}">
    {% endfor %}

    Thanks again for your time.

    Cheers

    in reply to: Location Bug, Error, Or? #28464
    zenjukai@gmail.com[email protected]
    Participant

    Hey Long,

    LOL, ok ... silly me, that was an easy fix. =)

    Cheers

Viewing 15 posts - 16 through 30 (of 34 total)