Is there a way to use Unique Articles on "Posts"?

Posted in: Newspaper
Post count: 49

Hi guys,

On the homepage (and on pages) I was able to eliminate duplicate postings by enabling the “unique articles” element. But when I view an article (post), I see the same article’s thumbnail showing up in a category block on the sidebar (which is populating by most recent).

Screenshot: https://docs.google.com/file/d/0BwLFxEIDQNO7ZDVqRHBLaTE0ZFU/edit?usp=drivesdk

I don’t see a “unique articles” toggle when I edit a post, only on pages. Is there is a way to eliminate this from happening on post pages? Or is there another work-around?

Also, is there a way to use visual editor on posts?

Thanks a mil

Post count: 49

Belay that last question, found out how to use VC on posts. Was hoping it would make the unique articles toggle show up, but no go.

Post count: 6600

Hi,

To exclude the current post from widgets you can go to td_data_source.php file and add this code:

global $post;
if (is_singular()){
$args['post__not_in'] = array( $post->ID );
}

…like this: http://screencast.com/t/AmOaVxW7

Thanks

Post count: 49

Awesome, you rock Lucian. Thanks for the fix.
Replying to the mobile menu issue now. Unfortunately, that one isn’t going as well.

Post count: 49

Actually, just noticed something. Ever since I popped that code in, the “unique articles” function for the homepage isn’t working anymore.

I tried turning it off – still duplicate posts. Then turned it back on – still duplicate posts.

Does the new code somehow disable the U.A. function?

Post count: 6600

Hi,

The code is made to detect if is a single post page and apply that hack, please try this instead:

global $post;
if (is_single()){
$args['post__not_in'] = array( $post->ID );
}

Hope this helps!

Thanks

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.