Forum Replies Created

Viewing 15 replies - 31 through 45 (of 292 total)
  • Having just had a similar issue, I restored the missing option by adding this to functions:

    
    $admin_role = get_role( 'administrator' );
    $admin_role->add_cap( 'export', true );
    

    And now, even when that code is commented-out, ‘export’ is available.

    Thread Starter gulliver

    (@gulliver)

    Further update…

    I restored the missing option by adding this to functions:

    
    $admin_role = get_role( 'administrator' );
    $admin_role->add_cap( 'export', true );
    

    And now, even when that code is commented-out, ‘export’ is available.

    Thread Starter gulliver

    (@gulliver)

    @jricketts4… thanks.Yes, they were trialed one-at-a-time and then deactivated.

    UPDATE… Although the export option is still absent, the possible cause isn’t as outlined above.

    I was mistaken/wrong about the β€˜wp_users’ table being empty – it’s not. I’d inadvertently looked at the wrong database. (Duh!)

    • This reply was modified 8 years, 11 months ago by gulliver.
    • This reply was modified 8 years, 11 months ago by gulliver.
    Thread Starter gulliver

    (@gulliver)

    UPDATE…

    I’ve just seen that the ‘wp_users’ table is empty – despite various users viewable in wp-admin/users.php.

    Because ‘export’ vanished from WP when I was testing various support-desk plugins, I’m wondering if that’s the cause of this issue.

    Thread Starter gulliver

    (@gulliver)

    @hawgtom… thanks. Will do.

    Thread Starter gulliver

    (@gulliver)

    @awesomesupport… thanks. I hadn’t seen that in the faq – my error, sorry.

    However, that mod seems to only accept one level of directory – rather than my intended two (so that individual tickets will be at /support/my-tickets/ticket-id/.

    The alternate workaround in my previous post will allow this structure, so I have a solution – but perhaps you’ll confirm if your suggested code will accept two levels (in which case I’ve done something wrong).

    Thread Starter gulliver

    (@gulliver)

    @awesomesupport… thanks. I’ve put the ‘my tickets’ and ‘submit ticket’ pages created by AwesomeSupport (AS) underneath a parent (‘support’).

    So, the urls are now ‘/support/my-tickets/’ and ‘/support/submit-ticket/’.

    But the url for individual tickets is still the default created by AS… ‘/ticket/ticket-id-or-slug/’.

    What I want to do is have individual tickets at ‘support/ticket/ticket-id-or-slug/’.

    As ‘ticket’ is a cpt, I’m guessing an appropriate filter will modify the rewrite slug accordingly – but I don’t know enough to write it.

    UPDATE…

    I found something which seems to work, so I’ll add in case it’s useful for others:

    
    function change_post_types_slug( $args, $post_type ) {
    
    /*item post type slug*/
    if ( 'ticket' === $post_type ) {
    $args['rewrite']['slug'] = 'support/ticket';
    }
    
    return $args;
    }
    
    add_filter( 'register_post_type_args', 'change_post_types_slug', 10, 2 );
    
    • This reply was modified 8 years, 11 months ago by gulliver.
    • This reply was modified 8 years, 11 months ago by gulliver.

    I also use this plugin, and here’s a suggestion…

    The class for that button is ‘wpas-btn wpas-btn-default wpas-link-logout’, so that’s what you’d need to target (probably with ‘display:none’).

    The article at https://getawesomesupport.com/documentation/awesome-support/templating/ explains how to add a css file which won’t be over-written when the plugin updates.

    It also explains how to modify various elements, and if you add a copy of ‘ticket-navigation.php’ to the suggested folder it’s easy to either remove that login button or change the page to which it directs… in my install I’ve created a simple WP page with a ‘you’re now logged out message’.

    The appropriate code is:

    
    <?php wpas_make_button( __( 'Log-out', 'awesome-support' ), array( 'type' => 'link', 'link' => wp_logout_url(), 'class' => 'wpas-btn wpas-btn-default wpas-link-logout' ) ); ?>
    

    And wp_logout_url() can be modified to: wp_logout_url( ‘add_your-desired-url_here ‘ ).

    Thread Starter gulliver

    (@gulliver)

    Thanks.

    Great… more digging-around in the innards for something which should be easier. πŸ˜‰

    Easier? Yep – business users may prefer to register a business name, and so require an appropriate (a single ‘name’) field.

    I wrongly thought that a simple change of ‘required => true’ (to false) would be enough to at least enable submission.

    From memory, basic WP registration doesn’t require a name, and hence I’m wondering where (beyond the registration template) I need to look when considering mods.

    I’m not expert in this, but am happy to learn-as-I-go.

    • This reply was modified 8 years, 11 months ago by gulliver.
    Thread Starter gulliver

    (@gulliver)

    Speedy reply – thanks.

    Not a GF user, is it possible to instead use a modified registration.php in a theme/awesome-support folder?

    My initial attempts to do so, by removing either the first/last name code block (from $first_name = to echo $first_name->get_output();) result in a ‘field is mandatory’ error.

    • This reply was modified 8 years, 11 months ago by gulliver.
    • This reply was modified 8 years, 11 months ago by gulliver.
    Thread Starter gulliver

    (@gulliver)

    @icaleb

    Thanks.

    From memory, the ‘lost password’ page doesn’t have ajax – and so there’s a case that ajax on the edit page should be a disable-able convenience rather than essential… as it is elsewhere with the add-to cart function.

    And, rather than ‘any WooCommerce Scripts’ it’s one with a specific and limited scope (the account admin section) and thus a disable should be viable.

    I also use Relevanssi, but have limited knowledge of php and don’t pretend to be expert.

    
    <?php echo get_post_type( $post_id ); ?>
    

    should show the post type.

    
    <?php the_time('F j, Y') ?>
    

    should show the date (and changing the ‘FjY’ will reformat it).

    
    <?php $category = get_the_category();
    $firstCategory = $category[0]->cat_name; echo $firstCategory;?>
    

    should show the category.

    If they’re lower-case, some css (maybe added to a span) should upper-case the first letter…

    
    ::first-letter
    {
    text-transform: uppercase;
    }
    
    • This reply was modified 8 years, 11 months ago by gulliver.
    • This reply was modified 8 years, 11 months ago by gulliver.
    • This reply was modified 8 years, 11 months ago by gulliver.
    • This reply was modified 8 years, 11 months ago by gulliver.
    Thread Starter gulliver

    (@gulliver)

    @matswes… Thanks.

    As it was awhile ago when I posted the question, and my memory isn’t as good as I’d like, I’m not sure just what I was trying to do – so please consider this resolved.

    Thread Starter gulliver

    (@gulliver)

    @matswes… Thanks.

    As it was awhile ago when I posted the question, and my memory isn’t as good as I’d like, I’m not sure just what I was trying to do – so please consider this resolved.

    Thread Starter gulliver

    (@gulliver)

    @msaari… Thanks.

    Ok – no problem. At least I now know.
    πŸ™‚

Viewing 15 replies - 31 through 45 (of 292 total)