• Resolved johnzoro

    (@johnzoro)


    hi tom,

    firstly see https://www.ads-software.com/support/topic/help-693?replies=17

    how would i go about adding a div?

    add_action( 'generate_after_header','generate_add_homepage_slider' );
    function generate_add_homepage_slider()
    {
        if ( ! is_front_page() )
            return;
    
        echo do_shortcode( '[smartslider3 slider=3]' );
        echo do_shortcode( '[latest-selected-content limit="3" type="post" display="title" image="thumbnail" elements="1" status="publish" orderby="dateD" css="three-columns"]' );
        echo do_shortcode( '[sc name="Opt In Form Frontpage"]' );
    
    }
Viewing 14 replies - 1 through 14 (of 14 total)
  • Hi johnzoro. You can add the html using php echo:

    add_action( 'generate_after_header','generate_add_homepage_slider' );
    function generate_add_homepage_slider()
    {
        if ( ! is_front_page() )
            return;
    
        echo '<div class="myclass">';
        echo do_shortcode( '[smartslider3 slider=3]' );
        echo do_shortcode( '[latest-selected-content limit="3" type="post" display="title" image="thumbnail" elements="1" status="publish" orderby="dateD" css="three-columns"]' );
        echo do_shortcode( '[sc name="Opt In Form Frontpage"]' );
        echo '</div>';
    
    }
    Thread Starter johnzoro

    (@johnzoro)

    add_action( 'generate_after_header','generate_add_homepage_slider' );
    function generate_add_homepage_slider()
    {
        if ( ! is_front_page() )
            return;
    
        echo do_shortcode( '[smartslider3 slider=3]' );
        echo '<div class="myclass">';
        echo do_shortcode( '[latest-selected-content limit="3" type="post" display="title" image="thumbnail" elements="1" status="publish" orderby="dateD" css="three-columns"]' );
        echo '</div>';
        echo do_shortcode( '[sc name="Opt In Form Frontpage"]' );
    
    }
    Thread Starter johnzoro

    (@johnzoro)

    if i used this code (see above) this would only affect the middle shortcode correct?

    Thread Starter johnzoro

    (@johnzoro)

    no that didn’t work

    Theme Author Tom

    (@edge22)

    The above would output:

    HTML for Smart slider
    <div class="myclass">
        HTML for latest posts
    </div>
    HTML for optin form
    Thread Starter johnzoro

    (@johnzoro)

    ok i’ve sorted it with some custom css

    is there a way to make the featured image not appear in posts

    i need it enabled for the latest posts plug in but i don’t want it displayed at the start of the post?

    You could use this CSS for the posts provided the plugin doesn’t use the same class:

    article .post-image {
        display: none;
    }
    Thread Starter johnzoro

    (@johnzoro)

    That doesn’t work

    Can you post a link to your site?

    Thread Starter johnzoro

    (@johnzoro)

    I just pulled up this post: https://pubshed.co.uk/category/garden-bars/

    And then added the CSS above to your custom css, and the post featured image is hidden. Is that what you’re trying to do?

    Thread Starter johnzoro

    (@johnzoro)

    that seems to remove them from the pubshed.co.uk/blog page, but if you click through to the article it’s still there

    Give this a try:

    article .post-image,
    article .page-header-image-single {
        display: none;
    }
    Thread Starter johnzoro

    (@johnzoro)

    That worked.

    Thanks

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘latest post’ is closed to new replies.