How do I stop the theme from calling default images?

I am using Custompress in conjunction with Canvas, and I am using the File Upload option on Custompress. The problem is when I don't have a file that needs to be uploaded, on the front end a default.png image is being displayed and I need that to not happen. How do I stop the default image from being called and displayed?

  • Rupok
    • Support Ninja

    Hi Gary

    Hope you had a wonderful day.

    Can you please provide an URL where we can see the issue live? Morever, I could tell you better about the issue if I could see the current configuration inside and make some tests. Would you mind allowing Support Access so we can have a closer look at this?

    To enable support access you can follow this guide here:

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

    Have a nice day. Cheers!

    Rupok

  • Kasia Swiderska
    • Support nomad

    Hello Gary,

    Thank you for access – I was able to replicate this on my site. I also tried to find in plugin code where this change is made, but I’m not able to find it (default image is taken from WordPress core files, not from CustomPress).

    I’m pinging plugin developer for this opinion on this issue.

    kind regards,

    Kasia

  • Kasia Swiderska
    • Support nomad

    Hello Gary,

    I spoke with developer and he provided a hot fix for this.

    Please unzip file I attached and upload it to the wp-content/plugins/custompress/core – please backup first the original file, and then override it with new one.

    This should prevent from showing default image. Let me know how this works for you.

    kind regards,

    Kasia

  • Gary
    • Design Lord, Child of Thor

    @bastetmilo,

    That did exactly what I needed it to do! However in doing so it did not solve the problem like I thought it would.

    I know you've had the opportunity to look at what I'm trying to accomplish. Basically what I want to happen is if a custom field has content, it appears on the front end. And if it does not have content, it does not appear in the front end. Ya know?

    I attached two screen shots here to illustrate my meaning. Basically since theres no content in the backend on #3-6, I'd like for them to not show up at all on the front end. Is this achievable?

    Thank you so very much in advance!

  • Kasia Swiderska
    • Support nomad

    Hello Gary,

    Yes you can have that – but it will take a little bit of code change in your custom template.

    Numbers you see even when steps are empty are there because they are hard coded in the template. So it needs to be changed so they will show only when the field for step title is filled with content.

    I will show you on example how to do that because access to your site expired and I cant check again whole code.

    First you need to get the title of the step to variable:

    $step1 = get_post_meta( get_the_ID(), '_ct_upload_56840fd8f1482', true );

    where the _ct_upload_56840fd8f1482 is name of your field (you use the same name in shortcode for this field).

    Next step is to check if the field has content – and only when exist you show whole step:

    if ($step1) { ?>
    <li>
    // your shortcodes from custompress to show step
    </li>
    <?php
    }

    with this small change numbers will show only if title for steps are there – it has to be replicated for each step you have.

    If you need more help please enable access again.

    kind regards,

    Kasia

  • Gary
    • Design Lord, Child of Thor

    @bastetmilo,

    Thats fantastic! The project pages are finally doing exactly what I needed them to do from the beginning. Your help has been wonderful, thank you so much.

    I have one remaining question (and I’ve granted access to the site again), and it has to do with the Custompress custom fields. I need to make them to have the TinyMCE editor in place of simple text boxes. I have utilized a work around that I found on MPMUDEV for adding that to the Custompress text area fields.

    However since you and I have been working together, the work around no longer works. Can you make suggestions for this last problem? Its all thats left before my development is complete!

  • Rupok
    • Support Ninja

    Hi Gary

    Hope you had a wonderful day.

    I have utilized a work around that I found on MPMUDEV for adding that to the Custompress text area fields

    Can you please share the link from where you found that workaround? Or can you share the workaround you followed? That will help us to know exactly where to look at for the issue and it will definitely facilitate the process of resolving the issue.

    I’m looking forward to hear back from you and resolve this issue as soon as possible.

    Have a nice day. Cheers!

    Rupok

  • Gary
    • Design Lord, Child of Thor

    @bastetmilo,

    Not to throw too many problems on this feed at once, but I also seem to be having a problem with my CustomPress-made Difficulty Rating. I have used Font Awesome icons to get my star ratings, and the text associated with each rating (One Star, Two Star, etc) was just automatically not appearing on the front end. Now it seems to be. Is there a way to keep the rating titles in the drop down without losing them on the back end drop down but not appear on the front end?

    Attached images for example. Needs to remain visible in the first picture, but not in the second.

  • Kasia Swiderska
    • Support nomad

    Hello Gary,

    I suspect that there is some kind of error in script, but because there is another error coming from missing file in the custompress then it is hard to check why this is not working.

    Could you try go to this folder /wp-content/plugins/custompress/datepicker/js/i18n/ and look for file jquery.ui.datepicker-en-GB.js copy to your computer, rename to jquery.ui.datepicker-WP.js and upload to the same folder?

    This should remove error in console and help us check why code for TinyMCE doesn’t work.

    kind regards,

    Kasia

  • Kasia Swiderska
    • Support nomad

    Hello Gary,

    Are you sure this code was working for you before? I’m trying to apply it for my site, but even with clean Custompress it doesn’t work on my site.

    Also I noticed that you are using code as it it – you didn’t change the custom ID for the fields, so it will not work in way you have it right now.

    Or maybe you changed it and then updated to clean version?

    kind regards,

    Kasia

  • Gary
    • Design Lord, Child of Thor

    @bastetmilo,

    I was actually unable to figure out how to change the custom ID’s, which is why I never changed them.

    But I am positive that I had TinyMCE editors on each of my text area boxes. I know I didn’t update anything in there to get it back to a clean version.

  • Gary
    • Design Lord, Child of Thor

    @bastetmilo,

    I actually have not heard from a developer regarding my question. I was hoping you might be able to see what happened?

    ALSO, my client is making an additional request. I have set up custompress fields to show a step by step process up to 6 steps. However its been inquired as to whether or not its possible to make an “Add More” button to automatically generate additional steps? Is that possible?

  • Kasia Swiderska
    • Support nomad

    Hello Gary,

    I’ll ping SLS again to get any update on TinyMCE issue.

    As for the second request – no – at this moment this is not possible with CustomPress to make repeater fields (from what I see this was never option for this plugin). It would require great deal of additional coding to implement that function.

    kind regards,

    Kasia

  • Panos
    • SLS

    Hello Gary ,

    Hope you are doing well today!

    Regarding your request to add tinyMCE in the custom field, since it has been some time, so sorry for the delay here, I am not aware of your current situation. Could you please let me know if you still need this feature? If so I would be glad to help out :slight_smile:

    Kind regards,

    Panos

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.