- This topic has 9 replies, 2 voices, and was last updated 7 years, 7 months ago by Pratik.
-
AuthorPosts
-
February 11, 2017 at 11:02 am #109408vltsParticipant
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?
thanksFebruary 12, 2017 at 7:52 am #109447PratikParticipantHi @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,
PratikFebruary 13, 2017 at 1:06 pm #109539vltsParticipantThanks 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”>
February 13, 2017 at 1:08 pm #109540PratikParticipantHi @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">
February 13, 2017 at 1:12 pm #109541vltsParticipant<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?
February 13, 2017 at 1:22 pm #109543PratikParticipantHi @vlts,
This is very strange. Please check Catch Box Pro line 262. The class is there. View the source instead of using browser console.
February 13, 2017 at 1:30 pm #109545vltsParticipantThanks. 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.
February 13, 2017 at 1:32 pm #109546PratikParticipantHi @vlts,
In single post, there is a class in body class tag-sticky-post. you will need to use this one.
Regards,
PratikFebruary 13, 2017 at 1:35 pm #109547vltsParticipantThanks, the tag method worked.
February 13, 2017 at 1:38 pm #109551 -
AuthorPosts
- The topic ‘Sticky Posts’ is closed to new replies.