Home › Forums › MapPress Support › Mashup shortcde not limiting no post per page › Reply To: Mashup shortcde not limiting no post per page
Hi Chris,
The guys at content views were not able to help very much. Here is their reply
# modify global $wp_query I checked with our team and found that is not possible to modify global $wp_query from our plugin. So that is not the solution we can help you. # any other solutions? According to your information, MapPress Pro is showing articles from a list. How was the list generated? I suspect that you are using a shortcode of MapPress Pro. Am I correct? If so, that list is generated by MapPress Pro, so it is duty of MapPress Pro developer to update code to hide the expired events.
If he wants to get the list queried by Content Views Pro, he can use this PHP variable $GLOBALS[ 'cv_posts' ]
.
I looked at the documentation that you provided and if I had to re-create the qp-query the following would be required – sample from the WordPres doco
Display posts where the custom field key is a set date and the custom field value is now. Displays only posts which date has not passed.
<div>
<div id=”highlighter_690213″ class=”syntaxhighlighter php”>
<table style=”height: 350px;” border=”0″ width=”522″ cellspacing=”0″ cellpadding=”0″>
<tbody>
<tr>
<td class=”gutter”>
<pre class=”line number1 index0 alt2″>1
2
3
4
5
6
7
</td>
<td class=”code”>
<div class=”container”>
<pre class=”line number1 index0 alt2″><code class=”php variable”>$args <code class=”php plain”>= <code class=”php keyword”>array<code class=”php plain”>(
<code class=”php spaces”> <code class=”php string”>’post_type’ <code class=”php plain”>=> <code class=”php string”>’Event’<code class=”php plain”>,
<code class=”php spaces”> <code class=”php string”>’meta_key’ <code class=”php plain”>=> <code class=”php string”>’Expires’<code class=”php plain”>,
<code class=”php spaces”> <code class=”php string”>’meta_value’ <code class=”php plain”>=> <code class=”php functions”>date<code class=”php plain”>( <code class=”php string”>”Ymd” <code class=”php plain”>),
<code class=”php spaces”> <code class=”php string”>’meta_compare’ <code class=”php plain”>=> <code class=”php string”>’>’<code class=”php plain”>,
<code class=”php plain”>);
<code class=”php variable”>$query <code class=”php plain”>= <code class=”php keyword”>new <code class=”php plain”>WP_Query( <code class=”php variable”>$args <code class=”php plain”>);
</div></td>
</tr>
</tbody>
</table>
</div>
</div>
So if we had to re-create the wp-query how would we apply this?
Hope this helps