• Hi Support team

    How can i add few text in blog at the top of page. for example i want to add like this above the first post.
    <p>Reference site about Lorem Ipsum, giving information on its origins, as well as a random Lipsum generator.</p>
    <p>Reference site about Lorem Ipsum, giving information on its origins, as well as a random Lipsum generator.</p>

    link: https://pasteboard.co/JF0VR6E.png

    Please advice if is there any filter should we use?

    Thanks
    Make

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Make carlos

    (@make-carlos)

    Ah

    Something like this:

    
    function is_blog () {
        return ( is_archive() || is_author() || is_category() || is_home() || is_single() || is_tag()) && 'post' == get_post_type();
    }
    
    function myCustomFun(){
    	if ( is_blog() ):
    	echo "Hello here";
    	endif;
    }
    add_action('astra_primary_content_top','myCustomFun');

    This is correct way to do ?

    Hi @make-carlos,

    The feature you are looking for is not available on the Astra free and you will need a custom code for that.

    As I can see, your code will work. And you can refer to this doc to see Astra’s hooks.

    I hope it will help. Feel free to reach out to us if you have any further queries.

    Kind regards,
    Herman ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add few content at top of blog page.’ is closed to new replies.