Forum Replies Created

Viewing 15 replies - 16 through 30 (of 50 total)
  • Thread Starter tkhan

    (@tkhan)

    Hi I worked it out using a template it’s still a work in progress so won’t post but will mark as resolved. Thank you for the kind offer to help though.

    Thread Starter tkhan

    (@tkhan)

    I can get the post id of the venue, is there anyway I can include this number in query posts argument so only posts related to this venue appear?

    Thanks

    Thread Starter tkhan

    (@tkhan)

    Hi sorry you are right I looked several times for a solution and came across the post last night. I will test it a bit more and see if I can figure out any possible solutions.

    Thread Starter tkhan

    (@tkhan)

    Hi,

    Thanks for getting back to me, sorry it took so long to respond having computer problems. I did notice it works for OR, I will have a look at the premium plugin as suggested.

    Thanks

    Thread Starter tkhan

    (@tkhan)

    Hi thanks Marius got it working.

    Tkhan

    Thread Starter tkhan

    (@tkhan)

    Hi that’s great thanks for getting back to me.

    Thread Starter tkhan

    (@tkhan)

    Hi thanks for getting back to me, I am trying to let the user change the order of the comments by highest rating lowest rating etc. at the moment I can order the comments by:

    ”orderby’ => ‘meta_value_num’,
    ‘order’ => ‘DESC’,
    ‘meta_key’ => ‘meta_option_1′,’

    I would like to grab the values of each slider and create a new comment meta_key (meta_option_total) on submit so I can order the comments on the total values.

    Thanks

    Tkhan

    Thread Starter tkhan

    (@tkhan)

    Hi Dylan,

    Thanks for the feedback managed to do it with the query filters, although I had to opt for giving each user role a hidden taxonomy term and filtering this, as excluding the object ids of users with the role of subscriber worked but slowed my site down drastically.

    Thanks again

    I am now trying to filter a custom post type using custom fields using the following code in a filter, it does not seem to be having any effect. I did read somewhere in the forum that querying by custom fields is not possible at the moment. Is this right.

    ‘add_filter( “geo_mashup_search_query_args”, “add_meta_to_mashup_search” );
    function add_meta_to_mashup_search( $args ) {
    if (isset($_POST[‘colour’]) && !empty($_POST[“colour”])){
    $args[“meta_query”] = array(
    array(
    “key” => “colour”,
    “value” => “white”,
    “compare” => “=”
    ));
    }
    return $args;
    }’

    TKhan

    Thread Starter tkhan

    (@tkhan)

    Hi dinamiko,

    Sorry for not responding I overlooked the email, the function works but the like icons are still being output before the actual portfolio items, have got a feeling it may be a jquery. I have stopped working on it for the moment. will mark as resolved and get back to you at a later date.

    tkhan

    Thread Starter tkhan

    (@tkhan)

    Hi caimin_nwl

    wasn’t sure what code you are referring to the code used to create the styles as per walkthrough or the code used to produce the output. To create the output I am using the events-list.php.

    As mentioned above ‘$args’ produces [category] => 73 [style] => 2.

    my events-list.php is as follows:

    ‘$args = apply_filters(’em_content_events_args’, $args);
    if( get_option(‘dbem_css_evlist’) ) echo “<div class=’css-events-list’>”;

    $array = get_term_by(‘id’, $_POST[‘category’], ‘event-categories’, ‘ARRAY_A’); print_r($array[name]);

    print_r($args[style]);

    echo EM_Events::output( $args );

    if( get_option(‘dbem_css_evlist’) ) echo “</div>”;’

    I can output each of the styles using

    ‘$my_em_styles = (is_array(get_option(‘my_em_styles’))) ? get_option(‘my_em_styles’):array();
    printArray2($my_em_styles);
    function printArray2($array){
    foreach ($array as $key => $value){
    echo “$value”;
    }
    }’
    unfortunately this prints all the style names and is not restricted to those searched for, would it be possible to modify the top line to include only search values.

    Sorry for asking so many questions its not that important really, just really annoying when you get a idea and don’t know have a clue how to implement it.

    Thanks again Tkhan.

    Thread Starter tkhan

    (@tkhan)

    Hi,
    Have tried ‘print_r($args);’ as suggested, unfortunately the category and style are in id format. For instance if I use ‘print_r($args[category]);’ it prints the category id of 73.

    Although I have managed to sort this for the categories as they are taxonomies by using

    ‘$array = get_term_by(‘id’, $_POST[‘category’], ‘event-categories’, ‘ARRAY_A’);print_r($array[name]);}’

    it doesn’t work for the styles which are generated via the ‘CREATING AN EVENTS MANAGER ADD-ON : A COMPLETE WALKTHROUGH’ tutorial and are not taxonomy terms.

    Any pointers would be fantastic.

    Tkhan

    Thread Starter tkhan

    (@tkhan)

    Hi,

    Thanks for the pointers eventually managed to work it out using
    ‘$events = EM_Events::get($args);’ and then using a foreach loop with an incrementing variable.

    Thanks Again.

    Tkhan

    Thread Starter tkhan

    (@tkhan)

    Hi,

    Have been looking through the templates is it the events-list.php? if so all I can see is the events output argument.

    Is there a way to pass a search argument to ‘EM_Events::count( )’ or an array that I could do a foreach loop on to get the results count.

    Any help or pointers would be much appreciated.

    Cheers

    Thread Starter tkhan

    (@tkhan)

    thanks for the prompt reply

    Will have a mess around see what I can come up with, if need be I can always resort to creating a custom taxonomy and add this into the form.

    Tkhan

    Thread Starter tkhan

    (@tkhan)

    Hi philipjohn,

    Thanks for the quick reply that works for displaying an events list with my custom key (which no doubt will come in very handy), I do not have clue how to incorporate this as a filtering option in a search form however.

    I also tried the tutorials Creating an Events Manager Add-On : A Complete Walkthrough. The style taxonomy? appeared under the events menu and the meta boxes appeared in the event posts the part I was interested in “Step 7 – Insert a style search drop-down menu into the events search form” code as follows

    add_action('em_template_events_search_form_ddm', 'my_em_styles_search_form');
    function my_em_styles_search_form(){
    	$my_em_styles = (is_array(get_option('my_em_styles'))) ? get_option('my_em_styles'):array();
    	?>
    	<!-- START Styles Search -->
    	<select name="style">
    		<option value=''>All Styles</option>
    		<?php foreach($my_em_styles as $style_id=>$style_name): ?>
    		 <option value="<?php echo $style_id; ?>" <?php echo ($_POST['style'] == $style_id) ? 'selected="selected"':''; ?>><?php echo $style_name; ?></option>
    		<?php endforeach; ?>
    	</select>
    	<!-- END Styles Search -->
    	<?php
    }

    did not seem to work however, I added the code to the top of my themes functions.php

    Yours Tkhan

Viewing 15 replies - 16 through 30 (of 50 total)