Sticky/Featured posts always on top or as Full-screen post

Writer, blogging theme for writers and authors | Support forum.
GK User
Thu Mar 19, 2015 10:13 am
Hello guys
I've got a question about Sticky/Featured posts - is it possible to have the selected Sticky post always on top (as this function is originally meant to), or as the main Full screen post?

Apparently it adds the "Featured" blue label hover the img thumb, but the post still follow the chronological order.

Of course I understand that this is the way the theme was developed, but I'd like to know if is it possible to have this done in some way, before I'll try to figure it out checking out the loop code and stuff.

Thanks
Paolo
User avatar
Fresh Boarder

GK User
Thu Mar 19, 2015 10:57 am
Hi,

Yes, it's possible; depends on the frontpage you are using. I.e. for the portfolio, please edit Writer/template.portfolio.php file and in the custom query, change
Code: Select all
'ignore_sticky_posts' => 1,
to:
Code: Select all
'ignore_sticky_posts' => 0,

in both places, similar with other page templates.
User avatar
Moderator

GK User
Thu Mar 19, 2015 11:46 am
Hi Piotr,
after your reply I've thought that it was better to proceed creating a Child theme in order to preserve the Writer theme and keep my edits separated.

Then, I've made a copy of the template.overlay.php file in my Child theme folder, and editing as follow:

Code: Select all
<?php
/*
Template Name: Frontpage Overlay
*/

// get the options
$slug = get_theme_mod('writer_overlay_post_slug', '');
$readmore_text = get_theme_mod('writer_overlay_readmore_text', __('Read more','writer'));
//create arguments for custom main loop
if ($slug == '') {
   $args_global = array(
    'post_type' => 'post',
    'ignore_sticky_posts' => 0,
    'posts_per_page' => 1
    );
} else {
    $args_global = array( 'name' => $slug);
}
etc.......


Then I've selected ONE post as Sticky to check it out.

Now the result is that, yes I can see the Sticky post as the main full screen post, but I also see the last post under it. I mean the Sticky post overlay the last chronological post, but this one is still present under it.

To be sure, I've double-checked the presence of two Sticky posts, but nope
User avatar
Fresh Boarder

GK User
Thu Mar 19, 2015 12:03 pm
Hi,

If you are using overlay template, you can use only one post. I think I konw what do you mean, you are talking about "NEW POSTS" from right sidebar (on grey background)?

In this place, there's News Show Pro widget used, which is completely saparated from the full screen post, please check Sidebar and News SHow Pro widget, here you can set order using id, date, title etc. you can also set the offset, so your posts will not be duplicated.
User avatar
Moderator

GK User
Thu Mar 19, 2015 2:34 pm
Hi Piotr,
actually I was talking about the main big full screen post (not the grey sidebar section). I attach a screenshot, so it's more clear
Please note that I've set only ONE post as sticky in the admin

overlay-sticky.jpg
User avatar
Fresh Boarder

GK User
Fri Mar 20, 2015 8:44 am
Could you please provide me with a URL to your website and back-end access via PM (click the “Private Message” text underneath my avatar) so that I may analyze it?
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.