Title: Hiding posts with custom solution, need multiple array from SQL
Last modified: August 19, 2016

---

# Hiding posts with custom solution, need multiple array from SQL

 *  [f15d9f87d](https://wordpress.org/support/users/boyevul/)
 * (@boyevul)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/hiding-posts-with-custom-solution-need-multiple-array-from-sql/)
 * I took [WP Favorite Posts](http://wordpress.org/extend/plugins/wp-favorite-posts/),
   and reversed it so that it can be used as a “Hated” posts.
 * I then added:
    `style="display:<?php if (function_exists('wphp_txt')) { wphp_txt();}?
   >;"`
 * to each individual div in the loop, and changed the “hated” text (what it says
   when something is “hated”) to hidden so that when someone clicks on the Hide 
   this link it makes the div become hidden, no longer showing up.
 * The functionality is still the same from the original plugin, so the value is
   stored as such:
 * `a:1:{i:0;s:5:"43247";}`
 * in the database/cookie.
 * Now, while this works for my purposes, I want to take it a step further and instead
   of simply hiding a post by hiding the div, I want to incorporate some sort of
   continue function so that it not only hides the post, it skips it altogether 
   in the loop, keeping the loop in-tact and showing the post directly after that.
 * So it would be like this:
 * Post 1
    Post 2 Post 3 –next page– Post 4 Post 5
 * Person hides Post 3, for example, so the new loop looks like this:
 * Post 1
    Post 2 Post 4 –next page– Post 5 Post 6
 * Now, since it stores it like it does (a:1:{i:0;s:5:”43247″;}) I can’t simply 
   echo the MYSQL value because it doesn’t _just_ store a simple post id (multiple
   hates looks like: a:2:{i:0;s:5:”43247″;i:1;s:5:”43246″;}, or a:3:{i:0;s:5:”43247″;
   i:1;s:5:”43246″;i:2;s:5:”43248″;}.
 * So is there a way to strip out everything _but_ the individual post IDs from 
   this, and then echo those IDs into a continue function?
 * You can see it in action [here](http://www.itrevino.com/Posts/).

The topic ‘Hiding posts with custom solution, need multiple array from SQL’ is closed
to new replies.

## Tags

 * [hide posts](https://wordpress.org/support/topic-tag/hide-posts/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [f15d9f87d](https://wordpress.org/support/users/boyevul/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/hiding-posts-with-custom-solution-need-multiple-array-from-sql/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
