Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #1466524

    Kreisi:

    I have a challenge that I am hoping will be fairly simple. Please see this page noted in Private Content

    On this page you will see three screen square images with text to the right of each. The text at right is in Text Blocks for “Lesson Tuition,” “Preschool Fees,” and “Music To______ Fees. Each of these blocks is set for folded content.

    I would like to have a link from another page that links directly to one of these blocks (Preschool Fees) kind of like linking to an anchor, but I would like that specific content (Preschool Fees unfolded). Is this possible? And how?

    As a secondary issue the three “headings” with green backgrounds for each of the above blocks are built using the “notification” content element shortcode. You’ll see that the top one of the three extends longer (desired) with equal margins on left and right, whereas the other two are displaying shorter. I cannot figure out what is causing this.

    Thank you —Bill Basler

    #1466556

    Hey William,

    You can add an ID to Grid in the element options, then you can link to it like the example in private.

    Please try this in Quick CSS to align the buttons:

    .page-id-2103 .avia-fold-unfold-section .av-fold-unfold-container .avia_textblock {
      display: block;
    }

    Best regards,
    Rikard

    #1466637

    Rikard:

    Thank you for this. On the custom ID solution. This is working, in that it is taking me to the correct page and loading the correct text block. But…I am using folded content on this block. I would like the content to be unfolded upon, or shortly after page load.

    #1466694

    Hi,

    Thank you for the update.

    The site it not loading on our end. Did you transfer the site to a different domain?

    Best regards,
    Ismael

    #1466719

    No change to the domain. Please see my notes in Private Content

    #1466763

    Hi,

    We cannot load the site on our end. Did you block specific countries from accessing it? Please unblock the following countries: the Philippines, Lithuania, Sweden, and Austria.

    Best regards,
    Ismael

    #1466838

    I have double-checked all server, site and firewall settings. I have browsed the URL by the countries that you indicated, and I see no issues from any, Philippines, Lithuania, Sweden, and Austria, using https://geotargetly.com/geo-browse

    If this continues, please grab a screen shot of the error and send to me. We cannot seem to replicate the error.

    #1466870

    Hi,

    This is what we get when we visit the site: (see private field)

    Best regards,
    Ismael

    #1467108

    Site is now live. See new URL in private content

    #1467159

    Hi,

    Thank you for the info.

    Add unique class names to the Text Block elements with the fold/unfold option, such as av-fold-unfold-tuition-fees, av-fold-unfold-preschool-fees, etc. Then, create anchor links like https://site.org/fee-structure/#tuition-fees. To automatically trigger the fold/unfold on page load when a specific anchor or hash is present, include the following script in the functions file.

    function ava_script_fees_click() {
        ?>
        <script type="text/javascript">
            (function ($) {
                $(document).ready(function () {
                    function triggerClick(hash, container) {
                        if (window.location.hash === hash) {
                            $(container + ' .av-fold-button-container').trigger('click');
                        }
                    }
    
                    triggerClick("#tuition-fees", ".av-fold-unfold-tuition-fees");
                    triggerClick("#preschool-fees", ".av-fold-unfold-preschool-fees");
                    triggerClick("#music-together-fees", ".av-fold-unfold-music-together-fees");
                });
            })(jQuery);
        </script>
        <?php
    }
    
    add_action('wp_footer', 'ava_script_fees_click', 9999);
    

    Best regards,
    Ismael

    #1467223

    Ismael, thank you for the response. I have edited functions.php files before so I am comfortable with how to do that. However, I am not comfortable writing php…just kind of OK with viewing the code, and determining what it is doing.

    The end goal happens on this page: https://preucil.org/fee-structure/

    There are essentially 3 content “chunks” on this page:
    1. Lessons. #lesson-fees
    2. Preschool. #preschool-fees
    3. Music Together. #music-together-fees

    The three blocks have Custom ID Attribute assigned to them.

    Now….this page is an example page: https://preucil.org/about-preucil-preschool/
    On this page there is a sentence that reads: A full itemization of our preschool academic programs and fees can be viewed here. On this sentence “viewed here” links to: https://preucil.org/fee-structure/#preschool-fees and properly goes to that Custom ID. But I am wanting that folded content to be unfolded. Judging by the php edits, I think you are grasping what I am needing.

    After adding the snippet to functions.php, it does not seem to be unfolding the content as it should. I suspect there is something I need to edit within this text:

    triggerClick(“#tuition-fees”, “.av-fold-unfold-tuition-fees”);
    triggerClick(“#preschool-fees”, “.av-fold-unfold-preschool-fees”);
    triggerClick(“#music-together-fees”, “.av-fold-unfold-music-together-fees”);

    For example, “lesson-fees” rather than “tuition-fees”?

    As mentioned I have no experience in editing php, so I am in over my head here. In short, I have added the php snippet, but no positive results.

    #1467273

    Hi,

    For example, “lesson-fees” rather than “tuition-fees”?

    Yes, you need to update the selector to “lesson-fees” and make sure that the class names (e.g., av-fold-unfold-preschool-fees) of the Text Blocks correspond to the anchor links (e.g., #lesson-fees, #preschool-fees). If it’s not working, please provide the WP login info in the private field and make sure that the Appearance > Theme File Editor is accessible.

    Best regards,
    Ismael

    #1467331

    Ismael, thank you again for your help. I think we are on the same page with the additions to function.php, but it does not seem to be working.

    I have added a kriesi user login in Private Content. Please review if you can. I have your suggested function.php snippet inserted.

    Thank you,

    Bill Basler

    #1467474

    I am wondering if this is currently being worked on. It appears that my Custom ID names are different than they were?

    #1467498

    Hi,

    I am wondering if this is currently being worked on.

    Yes, we edited the script yesterday and updated the element attributes, but for some reason, the modification is not working. We’ve forwarded the issue to our channel and notified the rest of the team. We’ll get back to you once we have an answer.

    Best regards,
    Ismael

    #1467969

    Any update on this Ismael?

    Thank you.

    #1468041

    i do not see your selectors at all on your page
    f.e. i see no class: av-fold-unfold-tuition-fees

    i see only ID’s concerning to your buttons:
    #av-fold-unfold-lesson-fees
    #av-fold-unfold-preschool-fees
    #av-fold-unfold-music-together-fees

    there are changes in your setting ( names ) and these selectors are ID’s

    so may be try this instead:

    function ava_script_fees_click() {
    ?>
    <script type="text/javascript">
    (function ($) {
    	$(document).ready(function () {
    		function triggerClick(hash, container) {
    			if (window.location.hash === hash) {
    				$(container).find('.av-fold-button-container').trigger('click');
    			}
    		}
    
    		triggerClick("#lesson-fees", "#av-fold-unfold-lesson-fees");
    		triggerClick("#preschool-fees", "#av-fold-unfold-preschool-fees");
    		triggerClick("#music-together-fees", "#av-fold-unfold-music-together-fees");
    		
    	});		
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'ava_script_fees_click', 9999);
Viewing 17 posts - 1 through 17 (of 17 total)
  • You must be logged in to reply to this topic.