Iurie Malai
Forum Replies Created
-
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Adverts expiration date/timeIt seems that the WordPress treats an expired advert as expired at the specified time by local timezone, but WP Adverts by UTC time.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] questions and suggestionI think the “expired” adverts MUST be deleted after a grace period set by administrator, and the advert authors MUST be somehow notified/informed about this.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] questions and suggestionGreg, maybe a paid add-on? I am interested too in this feature.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Adverts can't be updated in the backendChanged the code to this:
/* Make Categories field as required */ add_filter( 'adverts_form_load', 'my_adverts_form_require_category' ); function my_adverts_form_require_category( $form ) { if($form['name'] != 'advert') { return $form; } if(!is_admin()) { foreach($form['field'] as $k => $field) { if($field['name'] == 'advert_category') { $field['is_required'] = true; if( ! isset($field['validator']) || !is_array($field['validator'])) { $field['validator'] = array(); } $field['validator'][] = array( 'name' => 'is_required' ); $form['field'][$k] = $field; break; } } } return $form; }
Now is OK!
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Adverts can't be updated in the backendGreg, the same message in the backend:
Post updated, but cannot be published since some required data is not filled properly.
The code was changed to:
//if($form['name'] != 'advert') { if($form['name'] != 'advert' || !is_admin()) { return $form; }
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Add a css class selector to a custom fieldGreg, I tried this, but my custom textarea has only a name attribute, no id, no class.
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Add a css class selector to a custom field…, or an id? I mean attributes. Can be the “adverts_form_load” filter adapted for this?
Ok, after some unsuccessful testings, I’m inclined to replace the ‘advert’ slug with a more generic word, but I can’t find one yet :(.
Resolved this by moving translation files to the plugin directory ‘languages’ and adding the next code to the plugin itself:
/* Load the WP Adverts Custom Settings plugin's translation */ function wpadverts_custom_settings_translation() { $plugin_dir = plugin_basename( dirname( __FILE__ ) ) . '/languages'; load_plugin_textdomain( 'wpadverts-custom-settings', false, $plugin_dir ); } add_action('plugins_loaded', 'wpadverts_custom_settings_translation');
I am upset! The above code seemed to work when I have tested it and now it doesn’t want to work anymore! What is wrong here? I must to research more this.
I resolved my problem in proportion of 99% using this plugin and the next function (stolen from here):
/* Remove the 'advert' slug from published post permalinks */ function gp_remove_cpt_slug( $post_link, $post, $leavename ) { if ( 'advert' != $post->post_type || 'publish' != $post->post_status ) { return $post_link; } $post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link ); return $post_link; } add_filter( 'post_type_link', 'gp_remove_cpt_slug', 10, 3 );
P.S. If the slug was customized/renamed with the Customize Adverts slugs plugin (and the above function accordingly corrected) it will be NOT removed from the published post permalinks.
With this plugin I have added the category name to the permalink structure of the “advert” custom post type. Now the question is 1) how to keep the “advert” slug only for some advert categories, and to remove it fully for others OR 2) just how to remove it fully?
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] Custom single advert displayGreg, thank you very much!
Forum: Plugins
In reply to: [WPAdverts - Classifieds Plugin] More features?– locations menu: ability to have a locations menu at homepage and sort ads accordingly
Maybe this will help you: https://www.ads-software.com/support/topic/locations-in-a-drop-down-list
– default visibility: ability to notify users the visibility period expired for a given ad AND allow them to extend it (re-publishing)
I subscribe to this.
Forum: Themes and Templates
In reply to: [Minn Lite] The mobile menu button doesn't work properlyAfter a further testing I found that it is enough just to hide the input[type=”checkbox”]#nav-respond, that is visible sometimes as a little blue square in the top left corner of the menu bar when the menu button is touched and that not allow the button to work as expected.
@media only screen and (max-width: 580px) { input[type="checkbox"]#nav-respond { display: none !important; } }
UPDATE
Sorry! It seems that the next code block is also needed, so I ended with this:
@media only screen and (max-width: 580px) { input[type="checkbox"]#nav-respond { display: none !important; } #nav-respond-wrapper { overflow: hidden; display: table; width: 100%; } }
I do not understand fully why this is needed, but it works.