• Resolved NeiltheSpacechimp

    (@neilthespacechimp)


    I’m using the manage_adverts shortcode on a page. It works as expected. However customers are confused as to why the Renew ad button is hidden behind the more button.

    I’m planning to edit the manage.php template to add a title to the expiry date. I was also thinking of removing the more button that hides the renew button. Before I do why is the renew button hidden? and what happens when an advert which hasn’t expired is renewed?

    I just want to make sure I don’t cause more problems for myself. Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    1. to make the “Renew” button always visible you do not need to modify the template, you can do that by adding the code below in your theme functions.php file

    
    add_action( "init", function() {
        remove_action( "adverts_sh_manage_actions_more", "adext_payments_action_renew" );
        remove_action( "adverts_sh_manage_actions_more", "adext_payments_action_complete" );
    
        add_action( "adverts_sh_manage_actions_right", "adext_payments_action_renew" );
        add_action( "adverts_sh_manage_actions_right", "adext_payments_action_complete" );
    }, 1000 );
    

    This code snippet will work with the default Payments Module, you would need a bit different one to make it work with WC Integration.

    2. it is ok to renew the Ad which is still active, it will work the same as for expired Ad except calculating the expiration date.

    For example, if the Ad expires in 5 days and your renewal product makes the Ad visible for 10 days then the expiration will be set to 15 days in the future.

    Plugin Author Greg Winiarski

    (@gwin)

    3. if you are planning to customize the [adverts_manage] template (wpadverts/templates/manage.php) then please consider creating a child template file for the manage.php as explained here https://wpadverts.com/documentation/child-themes-and-templates/ so your changes will not be overwritten on WPAdverts update.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Edit Manage ads page’ is closed to new replies.