mkbn
Forum Replies Created
-
resolved
Beetlebrow link was exactly what I was saying I would need to do and how. thanks angelo.
Okay so additional test was taking place and the front end editor forms are not the only thing effected.
The $locations is also effecting if Events are shown on Location pages. So if get_default_search attributes do match args of events it will not show.
Meanwhile to your point I put in an If statement and it corrected the Front end editor however now users who can edit will loose the ability to have the customized default list based off zipcode on search form page..
Where would be the best location to put the if user can edit statement to reset the args to false??
I want users who can edit to be able to get the default list and edit there locations on the front end no matter what the default list args. Same applys to events on location pages.
public static function get_default_search( $array_or_defaults = array(), $array = array() ){ self::$context = EM_POST_TYPE_LOCATION; if(current_user_can('edit_locations')){ $defaults = array( 'eventful' => false, //Locations that have an event (scope will also play a part here 'eventless' => false, //Locations WITHOUT events, eventful takes precedence 'orderby' => 'location_name', 'town' => false, 'state' => false, 'country' => false, 'region' => false, 'status' => 1, //approved locations only 'scope' => 'all', //we probably want to search all locations by default, not like events 'blog' => get_current_blog_id(), 'private' => current_user_can('read_private_locations'), 'private_only' => false, 'post_id' => false ); }else{ $defaults = array( 'eventful' => false, //Locations that have an event (scope will also play a part here 'eventless' => false, //Locations WITHOUT events, eventful takes precedence 'orderby' => 'location_name', 'town' => false, 'state' => $Specifystate, 'country' => false, 'region' => false, 'status' => 1, //approved locations only 'scope' => 'all', //we probably want to search all locations by default, not like events 'blog' => get_current_blog_id(), 'private' => current_user_can('read_private_locations'), 'private_only' => false, 'post_id' => false ); }
To add to above in reference of what is the other coding conflict creating it.. On the Front-End’s location.php file the following code is the beginning of an If Statement that determines if the list of locations show (vice versa for events)
<?php if ( $locations_count > 0 ) : ?>
Where is the $locations_count being pulled from? That has to be the same place of the hook pulling default list for search forms instead of list of user created events/etc..
is $locations the issue?
In the Class Folder the file em_events.php contains the following function to specify default search list (List of events or locations that show up with search form before any user input args are specified)
public static function get_default_search( $array_or_defaults = array(), $array = array() ){ self::$context = EM_POST_TYPE_EVENT; $defaults = array( 'orderby' => get_option('dbem_events_default_orderby'), 'order' => get_option('dbem_events_default_order'), 'bookings' => false, //if set to true, only events with bookings enabled are returned 'status' => 1, //approved events only 'format_header' => '', //events can have custom html above the list 'format_footer' => '', //events can have custom html below the list 'town' => false, 'state' => $Specifystate, 'country' => false, 'region' => false, 'blog' => get_current_blog_id(), 'private' => current_user_can('read_private_events'), 'private_only' => false, 'post_id' => false );
Changing the location state or city from false to specific state or city will replicate the issue.
1)Change the state in array to specific state
2) Create a location in backend(admin dashboard) using DIFFERENT state then specified
3) Go to the front-end location Edit locations page and the list of your created location will not display.
4) Change your state arg above to same state as your created location
5) Go back to the front-end edit location page and it will show on listThe front-end editors should not be hooking into this function for list of user created events.
the error you see is due to NUMEROUS 404 errors being generated by the admin-ajax.php. To get around it you will have to login in from a different device and whitelist your current IP address or edit .htaccess to whitelist address and then you can disable plugin.
correct me if im wrong but I think you might be able to whitelist your IP by directly editing your .htaccess file if you have the permission set to do so on your FTP software
Forum: Plugins
In reply to: [WP CSV] 1k draft posts created, Trash disappearedHi, Siriomi. To delete it you would have to access your SQL Database and request table with the contents as draft then delete them from there.
CPK Web Solutions, I have the same problem however it has to do with importing .csv file of custom post type.
The importing status shows that everything is imported successfully however there is no custom post pages created. The SQL database shows all entry’s I tried to import. (some with “Null errors”, etc)
Please Advise.
Forum: Plugins
In reply to: WPTouch Pro – Show Link in Post Based on User AgentExample: since only iOS devices can click this url scheme instagram://camera then only iOS devices can see it.. andriod or other devices see a different url which is compatible for them
looking for same input
which file??
but the =”NY” I have to define? Or can the javascript variable define it for me? I do not want to have to type city or state that will mean I need 50 pages.. and 50 links.
Also what file(s) do I input the codes in link you sent me?