Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1336509

    Hi,
    I have long been wanting to work on “read more sections on my page. The idea is that on click a section opens up below the text, not that the button takes you to another page. I can seem to make it work in the advanced builder, although there the option seems to be there

    #1336660

    Hey metafora29,
    Thank you for your patience, do you mean that you would like to manually create a hidden text section on your page that will be shown when a button or link is clicked like a toggle or accordion section?
    An example of this would be to use this css:

    .learn-this { 
    	display: none; 
    }
    span.click-learn-more {
    	color: #000;
    	font-weight: bolder;
    }
    span.click-learn-more:hover {
    	cursor: pointer;
    }

    this html in a code block element:

    <span class="click-learn-more">Learn more…</span>
    <span class="learn-this"> your hidden text </span>

    and this script in your child theme functions.php:

    add_action('wp_footer', 'ava_custom_script', 10);
    function ava_custom_script(){
    ?> <script>
        (function($) {
            $('.click-learn-more').on('click', function() {
                $('.learn-this').toggle();
            });
        }(jQuery)); 
        </script>
    <?php
    }  

    If you mean that you would like the “read more” from the blog element to behave like this, then unfortunately we can not do this.
    You could use the masonry element or the ajax portfolio as a solution.

    Best regards,
    Mike

    #1337147

    Hi Mike
    Thanks for your answer. I forgot to turn on the email notification of your reply so I only just saw it now. Tomorrow I will be investigating more and come back to you if the solution at hand it not enough.
    Thanks again.

    #1337257

    Hi,

    Thanks for the update. We’ll keep this thread open for you.

    Best regards,
    Rikard

    #1337356

    Hi rikard
    It works, Thank you!
    But I wonder if instead of just the text “Learn More…” I could insert a button? I tried to do it via short code, but it does not work….

    #1337397

    Hi,

    Thanks for the update. We could help you styling it as a button if you like. If you would like that, then please post a link to where we can see the actual element.

    Best regards,
    Rikard

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