geraldjim

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Mashup shortcde not limiting no post per page #18464
    geraldjim
    Participant

    Your are champ Chris,

    I did not realized that I need to use the slug name –  thanks all working now.

    Will be definitely be recommending your plugin – your support is just A+++

    Thanks s much

    Gerald

    in reply to: Mashup shortcde not limiting no post per page #18462
    geraldjim
    Participant

    Hi Chris

    Firstly, Ive created a login for you on our test site so you can have a look at what I done and you may want to add your patch.

    url: https://simpson.smallbizwebsolutions.com.au

    u: chrismappro

    Send me an email to geraldj@smallbizwebsolutions.com.au so I can send you the password.

    I created a shortcode using the above and none of the points display.  I checked the fields and made an adjustment as the date store in Expires is YYYY-MM-DD to
    <p class=”prettyprint prettyprinted”><span class=”pln”>  $date </span><span class=”pun”>=</span><span class=”pln”> date</span><span class=”pun”>(</span><span class=”str”>’Y-m-d'</span><span class=”pun”>);

    Which still does not work. Not sure what else to check. Below is a screen grab of the fields how they appear on the database.

    </span></p>
    Tried to add <code class=”php string”>meta_compare’ <code class=”php plain”>=> <code class=”php string”>’>’ to the quuery but did not like it,

    Any help will be much appreciated.

     

    in reply to: Mashup shortcde not limiting no post per page #18460
    geraldjim
    Participant

    The copy and pate failed badly – sorry

    Here it is again

     

    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.

    $args = array(
    ‘post_type’ => ‘Event’,
    ‘meta_key’ => ‘Expires’,
    ‘meta_value’ => date( “Ymd” ), // change to how “event date” is stored
    ‘meta_compare’ => ‘>’,
    );
    $query = new WP_Query( $args );

    in reply to: Mashup shortcde not limiting no post per page #18459
    geraldjim
    Participant

    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

    in reply to: Mashup shortcde not limiting no post per page #18452
    geraldjim
    Participant

    Thanks Chris

    I’ve duplicated the map so you can see both on the same page and if you need access to the backend please let me know

    Have a great day

     

    Gerald

    in reply to: Mashup shortcde not limiting no post per page #18450
    geraldjim
    Participant

    Hi Chris

    Thanks for the prompt response.

    Try the code you provided but did ot work – I suspect because I am working off a view the was created using “Content Views” plugin where I select all Custom Post ie Events where the custom field Expiry is equal or in the future of the current date.

    Is there a way to do this in the query string?

Viewing 6 posts - 1 through 6 (of 6 total)