How to modify presentation of default fundraiser post type

I want my default post features (comes with theme) in fundraising post type as well but I'm unable to do that.

I created single-funder.php as well as wdf_funder.php (as mentioned in plugin's templates.txt) but I didn't see any change on the frontend.

Fundraising post type is also not showing feature image option in its admin area. I want to make fundraiser page like the image attached. I'm stuck here. Any help would be highly valuable.

Thanks in advance!

  • Adam Czajczyk

    Hello mycomedy,

    I hope you're well today and thank you for your question!

    The template file for single Funraiser view should be called "wdf_funder.php" and should be uploaded to your current theme's folder on the server (in "/wp-content/themes/YOUR_THEME" folder). I have tested this on my test site with Twenty Sixteen theme and it seems to be working as expected. The featured image is also there so I suppose it's rather a matter of a theme that you're currently using (a conflict is possible).

    That said, there's no featured image for "Fundraiser" posts only or other posts does not show it either on edit screen? Have you tried already to expand the "Screen Options" tab (while on fundraiser edit page) and make sure that "Featured Image" option is turned on?

    As for template file. Could you tell me please how did you create it: is that a fully custom template or did you copied an existing single.php template and just changed its file name?

    Let me know please!
    Best regards,
    Adam

  • mycomedy

    Hi Adam,

    Thanks for looking into it. I created new template file "wdf_funder.php" in my theme's root folder and have copied "single.php" content in it (as a test). I can't see any change after making that. I basically want to make fundraiser post to look like this: http://prntscr.com/az63mg
    Could you guide me that if I'm doing it the right way to achieve what I want?

    I have a hack to achieve what I'm looking for. That is to create default posts for fundraising purpose and add fundraising panel as a widget in its sidebar. But I'm facing an issue with that as well. The widget panel says that it'll display information and call to actions for the Fundraiser but in my case it only works to display information for a specific Fundraiser. So, can't use that as a generic widget to display fundraiser panel in all posts.

    Meanwhile, the featured image is also not there in screen options of fundraiser post. I've attached the screenshots of post and fundraiser's post screen options. have a look. Looking forward to get some guidance in this regard.

    Thanks.

  • Adam Czajczyk

    Hello mycomedy!

    Thank you for your replay!

    I created new template file "wdf_funder.php" in my theme's root folder and have copied "single.php" content in it (as a test). I can't see any change after making that.

    The chances are that the template file is used but you're not seeing any changes because the tempate file code is the same as for "single.php" file. This won't make any difference until you customize the "wdf_funder.php" template file.

    I'm wondering however why there's also no featured image available for your Fundraiser pages. This should be enabled on a theme level and as "Fundraisers" are in fact WordPress custom posts (custom post types) this should work. I suppose the theme or some other plugin is affecting this (I tested it on Twenty Sixteen theme and it worked as expected).

    Do you think I could have a closer look at your setup? I could access it via support access feature of our WPMU DEV Dashboard plugin. Here's a brief guide on how to grant a support access:

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    That is to create default posts for fundraising purpose and add fundraising panel as a widget in its sidebar. But I'm facing an issue with that as well. The widget panel says that it'll display information and call to actions for the Fundraiser but in my case it only works to display information for a specific Fundraiser. So, can't use that as a generic widget to display fundraiser panel in all posts.

    Just to make sure that I understand that correctly: you'd like that to
    - look as shown on the screenshot that you attached
    - and also would like to put Fundraiser panel in sidebar and set it to automatically pick up that particular Fundraiser that currently viewed page belongs to

    Is that right?

    I'm not sure if this would be easily doable without some additional custom coding but let me please first take a closer look at your setup. Let me know please when the support access is granted :slight_smile:

    Best regards,
    Adam

  • mycomedy

    Hi Adam,

    You are pretty fast :slight_smile: I've grant you access, Kindly have a look in the site.

    and about the 2 options:

    Just to make sure that I understand that correctly: you'd like that to
    - look as shown on the screenshot that you attached
    - and also would like to put Fundraiser panel in sidebar and set it to automatically pick up that particular Fundraiser that currently viewed page belongs to

    I actually want the first one, that is: "look as shown on the screenshot that you attached". Skip the 2nd one.

    Thanks for your support.

  • Adam Czajczyk

    Hello mycomedy!

    Thanks for granting access. I reviewed your site and just like I though it's the theme that's bringing quite much complication here. I was however able to find some settings there that seem to affect Fundraiser type posts.

    That said, take a look at "Test-1" fundraiser and let me now if (apart from styling) it is close to the layout you wished to achieve, pleae.

    The fundraiser widget there will pickup "current" fundraiser (the one of the page that's currently displayed) and if the layout would be fine I can help you a bit with adding some "final touches" (styling its look).

    Best regards,
    Adam

  • Adam Czajczyk

    Hello mycomedy!

    I believe than this is fine and we only need to add some CSS. Let me start with a few words of explanation though :slight_smile:

    The Fundraiser plugin is using the default "single post" template for these pages so your initial attempt to go for a customized template was a good shot. It didn't work however because of the theme that you're currently using on your site. I noticed that there are no regular blog posts on your site so I created one (saved as a draft so it's not visible on a page) and this showed that there is a choice whether the template should use sidebar or not and if it should - were it should be located.

    This however shows up only for standard WP posts so it seems that the theme "ignores" custom post types. I found out in theme settings ("Layout") that the default setting for "single post" template was to not use sidebar - so I set it to use "1/3rd width) sidebar on the right and also assigned a "Donation" sidebar to it. Then I added "Fundraiser panel" widget to that sidebar et voila :slight_smile:

    Do you have code access too?

    As you can see, I didn't need a "code access" fortunately. The support access feature though doesn't allow us to reach anywhere beyond the WordPress dashboard. It lets me access the dashboard as if I was an admin user (or a super-admin in case of Multisite) without actually creating an account but nothing more. It's also available only for staff members and only via support forum (so e.g. we cannot use it from Live Chat or from "Members" forums) :slight_smile:

    I'd love to proceed with your "final touches".

    I added following CSS to your site:

    .single-funder .secondary {margin-top:180px;}
    .single-funder .widget_wdf_fundraiser_panel {
      background:#F7F7F7;
      -webkit-border-radius: 5px;
      border-radius: 5px;
    }
    .single-funder .widget_wdf_fundraiser_panel .widget-title,
    .single-funder .widget_wdf_fundraiser_panel .wdf_total_backers,
    .single-funder .widget_wdf_fundraiser_panel .wdf_amount_raised {
      padding:0 25px 0 25px;
    }
    .single-funder .widget_wdf_fundraiser_panel .widget-title {
      padding-top:25px;
    }
    .single-funder .widget_wdf_fundraiser_panel form {
      padding:25px;
      background:#F3F3F3;
    }
    .single-funder .widget_wdf_fundraiser_panel .currency {
      display:none;
    }
    .single-funder .widget_wdf_fundraiser_panel input {
      border:1px solid #D5D5D5;
       -webkit-border-radius: 5px;
      border-radius: 5px;
      padding:7px 20px;
      width:100%;
    }
    .single-funder .widget_wdf_fundraiser_panel .wdf_send_donation {
      margin-top:20px;
      padding:8px;
      font-weight:bold;
      color:#FFF;
      font-size:1.4em;
      text-shadow:none;
    }

    The code is added to the "VideoTouch -> Custom CSS" page, at the end of the existing code. I think this looks a bit better now :slight_smile:

    I hope that helps!
    Best regards,
    Adam

  • mycomedy

    Adam that is so nice of you I can't explain in words. Best support I've ever had regarding any WordPress related plugins or themes.
    I was about to do all CSS tweaks by myself but you did all (y) Bundle of Thanks :slight_smile: Best part was that you found layout option in theme settings. I must have looked there :p missed a big part.

    One more question:
    -> I want to create a page having all fundraiser projects. I read forum topics and found that we can get all those by moving to

    ourdomain.com/fundraisers
    I tried and it worked. It was previously looking like this: http://prntscr.com/azkiu6 I was about to ask about featured image and shortcode appearance. But now have seen fundraisers page and it's completely change.

    So, what should I do? Should I build the page using shortcodes provided by fundraising plugin in order to get a decent look or should I customize this page?

    Thanks Again :slight_smile:

  • Milan

    Hello mycomedy

    I can see that on your site there isn't any option for featured image change. However that is not the case with my sandbox installation. I have option to set featured image for my fundraisers. so there is some issue about that on your end. Have you conducted plugin conflict test as described in our support manual here, ?( Find flowchart at the bottom of the page )
    https://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    If not then I suggest you do so and get back to us with your results.

    Also have you added any custom css which hides "Featured Image" section of Fundraisers. ?

    Looking forward to hearing back!
    Best Regars,
    Milan

  • Milan

    Hello mycomedy

    No, I haven't done anything with featured image visibility. I believe it's a theme conflict with the plugin

    Yeah that's what I believe too, So have you conducted Plugin Conflict test as instructed in my this post ?
    https://premium.wpmudev.org/forums/topic/how-to-modify-presentation-of-default-fundraiser-post-type#post-1077111

    If yes then what is your results ?

    Now I want to display all fundraiser projects on one page. I can do that with shortcodes but that'd not look good without featured images. Any suggestion?

    You want to display all fundraisers with featured image or without featured image ? I am sorry but I am not getting your point. I got that you want to display all fundraisers but if you want those all with featured image then first we need to eliminate issue with feature image visibility. Or without featured image is okay with you then we can hide feature image section with some CSS rules.

    Please advise :slight_smile:
    Kind Regards
    Milan

  • mycomedy

    Hi Millan,

    I want all fundraisers with featured image :slight_smile: I've tweaked the featured image issue. wpbeginner really helped in that. In case anyone else is having this issue, they can refer to this link.

    My theme has a separate template "custom-posts.php" to handle functions of custom post types so putting the code:

    <? add_theme_support('post-thumbnails');
    set_post_thumbnail_size( 80, 80, true );
    ?>

    at the end of that template solved the issue. Now I have featured image option on fundraiser posts as well and the plugin "fundraising" itself provides an interface to show all the fundraising projects. Here is the link of my fundraising page: http://mycomedy.fr/v2/fundraisers/ (currently with dummy data)

    Thank you so much for your support, You guys have been very co-operative :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.