Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #109408
    vlts
    Participant

    Even though Catch Box is using post_class() function,
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>,
    it does not add sticky class to posts.
    Is there a way to automatically add .sticky class to sticky posts?
    thanks

    #109447
    Pratik
    Participant

    Hi @vlts,

    The sticky feature is working fine. Check out demo at https://catchthemes.com/demo/catchbox-pro and see the featured post.

    If this is something else, please let me know.

    Regards,
    Pratik

    #109539
    vlts
    Participant

    Thanks for replying. Yes, the sticky feature works, but the posts don’t add a separate sticky class to the printed out article id. For example:

    <article id=”post-1234″ class=”post-1234 post type-post status-publish format-standard has-post-thumbnail hentry category-example category-blog”>

    instead of:

    <article id=”post-1234″ class=”post-1234 post type-post status-publish format-standard has-post-thumbnail <u>sticky</u> hentry category-example category-blog”>

    #109540
    Pratik
    Participant

    Hi @vlts,

    Please check the first post in demo, there is sticky class.

    
    <article id="post-49" class="post-49 post type-post status-publish format-standard has-post-thumbnail sticky hentry category-blog category-theme-test tag-sticky-post">
    
    #109541
    vlts
    Participant

    <article id=”post-49″ class=”post-49 post type-post status-publish format-standard has-post-thumbnail hentry category-blog category-theme-test tag-sticky-post”>

    when I check out that post – the above is what I get. There is no sticky class?

    #109543
    Pratik
    Participant

    Hi @vlts,

    This is very strange. Please check Catch Box Pro line 262. The class is there. View the source instead of using browser console.

    #109545
    vlts
    Participant

    Thanks. Now I see where the issue is. The sticky class shows on the homepage, but when you click on the actual post – https://catchthemes.com/demo/catchbox-pro/tag/sticky-post/, the sticky isn’t added to the post id.

    #109546
    Pratik
    Participant

    Hi @vlts,

    In single post, there is a class in body class tag-sticky-post. you will need to use this one.

    Regards,
    Pratik

    #109547
    vlts
    Participant

    Thanks, the tag method worked.

    #109551
    Pratik
    Participant

    Hi @vlts,

    You are welcome.

    Regards,
    Pratik

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Sticky Posts’ is closed to new replies.