• Resolved nikdow

    (@nikdow)


    When I go to the funds menu, it’s empty (I haven’t created any funds yet). However there is no “create” button. Most of the usual furniture that WP provides on a list of posts or custom posts is missing.

    I have used the option to fold the funds and other menu items into the main SD menu item, but that shouldn’t affect the list of (custom) posts?

    https://www.ads-software.com/plugins/seamless-donations/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author David Gewirtz

    (@dgewirtz)

    On the dashboard, under the Funds icon should be an Add New menu item.

    As for Compact Menus, no, that doesn’t impact the storage architecture, but it is definitely a bit wonky from a UI point of view. It works, kinda. Which is why it’s listed as beta (and probably always will be).

    –David

    P.S. Marking as resolved because questions answered.

    Thread Starter nikdow

    (@nikdow)

    Thanks for the help, I’m just returning to this as funds are back on our agenda. Where is the dashboard, nothing called dashboard on my menu. I’m assuming you aren’t referring to the WP dashboard, anyhow I looked there and only found your recent posts widget.

    “Designated Funds Checkbox and Section” is turned on in my “form fields and sections”.

    Plugin Author David Gewirtz

    (@dgewirtz)

    The dashboard is the big black bar (it could be another color if you changed it in WordPress settings) that’s on the left of your admin screen. It often has words like Posts and Pages on it. You should see the word Funds on it as well.

    –David

    Thread Starter nikdow

    (@nikdow)

    Thanks again for support. OK the problem is that the “Add New” submenu disappears when Donations, Donors and Funds are folded into the Seamless Donations menu. I’ve disabled that tweak and I can see “Add New” now.

    Thread Starter nikdow

    (@nikdow)

    Also didn’t understand that funds is included in the “create new” select in the admin bar – that’s the black band across the top of the screen when logged in as administrator.

    Plugin Author David Gewirtz

    (@dgewirtz)

    Yep. That’s because Funds, Donors, and Donations are standard WordPress custom post types, so they benefit from the resources provided by WordPress. That’s why they’re implemented that way. Also gives room for expansion in a way that can be compatible outside Seamless Donations.

    –David

    Thread Starter nikdow

    (@nikdow)

    Yes, I’m about to add some more fields to the custom post type so I can display each fund as a page with a featured image, and display that image as a thumbnail when a fund is selected, plus the post_excerpt. BTW for possible use by others, here is my code so far. It allows the post ID of the fund to be passed as a GET parameter so the form opens with the fund already selected:

    add_filter( 'seamless_donations_form_donation_section', function( $donation_section ){
    ...
    $fund = intval( filter_input(INPUT_GET, 'fund', FILTER_SANITIZE_NUMBER_INT ) );
    if( $fund ) $donation_section = set_designated_fund( $donation_section, $fund );
    ...
    
    function set_designated_fund( $donation_section, $fund ){
            $funds = $donation_section['funds_section']['elements']['_dgx_donate_designated_fund']['options'];
            foreach( $funds as $post_id => $title ) {
                if( $post_id === $fund ) {
                    $donation_section['elements']['_dgx_donate_designated']['select'] = 1;
                    unset( $donation_section['funds_section']['elements']['designated_fund_label']['cloak'] );
                    unset( $donation_section['funds_section']['elements']['_dgx_donate_designated_fund']['cloak'] );
                    $donation_section['funds_section']['elements']['_dgx_donate_designated_fund']['value'] = $fund;
                    unset( $donation_section['repeating_section'] );
                    unset( $donation_section['elements']['regular_intro'] );
                }
            }
            return $donation_section;
    }

    Note that I’ve removed the repeating donations when a fund is preselected. That makes sense for our use-case but if I leave the repeating donations enabled their heading is misplaced, it places above the funds section while the checkbox for repeating donations is placed below the funds section. This relates to a different bug you have on your list. What is puzzling me is that that heading: “Optional — regular giving:” doesn’t appear in function seamless_donations_get_donation_section which makes it impossible to force it to appear in the right place.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘creating funds’ is closed to new replies.