Genesis Theme custom template

Would appreciate help in creating my custom template so that CustomPress works with Genesis theme. This is what I created, however, I really do not know php

<?php
/**
* Single CPT Template: plant-template.php
*
*/ 

remove_action('genesis_loop', 'genesis_do_loop');

add_action('genesis_loop', 'gt_custom_loop');
function gt_custom_loop() {

 <?php echo do_shortcode('[tax id="plant_type" before="your text before " separator=", " after=" your text after"]');  ?>

}

genesis();
  • Stacey
    • WPMU DEV Initiate

    Their response is that this is an issue that WPMUDEV should resolve since it is the plugin that is not working with the Genesis themes.

    The reason for the custom template is because the Custompress shortcodes do not work in the Genesis themes.

  • Brian Purkiss
    • Smushie Pies

    Of course they would pawn it off.

    What's happening with the shortcodes? Is it throwing an error?

    I've never seen a theme not work with the CustomPress shortcodes. Or CustomPress for that matter.

    That leads me to think that there's something wrong with the Genesis loop.

  • Stacey
    • WPMU DEV Initiate

    They are not pawning it off. The theme does not use the standard WordPress Loop.

    My issue is with the CustomPress plugin.

    Custom Taxonomies and Custom Fields Do not show up when I use the Embed Code
    [tax id="plant_type" before="your text before: " separator=", " after=" your text after"]

    From what I read in the documentation I need to make a custom template and why I am posting my question.

    I would like assistance with building a custom template so that I can use CustomPress with the Genesis theme.

  • drift2
    • Design Lord, Child of Thor

    I am running into the same issue. I am creating a new Genesis Template page: landing_page.php.

    I should be able to code it in a way to use the PHP blocks like this: <?php echo do_shortcode('[custom_fields_block]'); ?>

    My issue is that I am not seeing where I can set the default template to Landing_page.php.

  • drift2
    • Design Lord, Child of Thor

    @Stacy I got it.
    It took me a LONG time digging...

    You have to register the short code in your functions.php file. So...

    add_action('genesis_before_loop', 'contact_form_7');
    
    function contact_form_7()
    {
        echo do_shortcode( genesis_get_custom_field( '_ct_text_5112912101b2f' ) );
    }

    Where _ct_text_5112912101b2f is the custom field type ID.

    Hope this helps!

  • phillcoxon
    • The Crimson Coder

    @drift2 - thanks for providing a great solution

    @Stacey - sorry to hear that you're feeling disappointed. Remember that the staff have been quite overloaded the last few days.

    The fix @drift2 supplied uses Genesis functions and so requires knowledge of the Genesis framework which the WPMUdev staff aren't necessarily going to have given it's not one of their products.

    I'm sure they would have done their best to help and it's great that @drift2 got in there with a solution to help you first.

    Sent some points your way @drift2

  • Stacey
    • WPMU DEV Initiate

    @phillcoxon thanks for your note.

    I found the nastiness of the tone of support quite unprofessional and very disappointing for a product that I have purchased.

    If this is an example of their best to help, I am even more disappointed with support from wpmudev.

  • phillcoxon
    • The Crimson Coder

    You pointed out yourself that Genesis that has created a new loop structure that is different from standard wordpress.

    The WPMUdev plugins work great with standard themes, but can struggle fitting into a theme that is effectively non-standard and has its own special requirements. So in that sense it really should be Genesis / StudioPress advising how to get normally designed plugins to fit into their framework not the other way around.

    That is what Brian meant. It wasn't meant to be disrespectful to you.

    Keep in mind that I'm also a lifetime member of StudioPress and use Genesis myself. I have a big custom project to do over the next week with Genesis and Dynamik.

  • Stacey
    • WPMU DEV Initiate

    StudioPress is exceptional is their support, however whenever I have had an issue with a premium plugin I always receive support from the premium plugin.

    Maybe I've been spoiled by support I have received from premium plugins I've purchased, up to now.

    Good to hear that you use Genesis yourself. I haven't purchased the Dynamik theme yet, however I do use their Genesis Extender plugin.

  • phillcoxon
    • The Crimson Coder

    Oh don't worry - you'll get awesome support for WPMUdev plugins here :slight_smile: The only issue seems to be that the staff have been a bit overloaded the last few days that you happened to pick a plugin that doesn't work in Genesis' somewhat non-standard system.

    This will be the first time I use Dynamik - I'm pretty excited about it - it looks awesome.

  • Brian Purkiss
    • Smushie Pies

    Thanks for chiming in guys.

    Phil is correct, we've been super swamped here and what you've been asking about is a rather involved bit of support, so on top of being swamped, such a response would take yet even longer than normal.

    Thanks for the help drif2.

    Stacy, I hope that solution helps you out.

    If there is anything else we can assist you with, please don't hesitate to ask! We're happy to help.

  • drift2
    • Design Lord, Child of Thor

    @Stacey I know it can be frustrated when you need help and it is slower in coming than you would like, but stick with these guys at WPDEV, they really are a great bunch of people who will go out of their way to help you. :slight_smile:

  • Arianna
    • WPMU DEV Initiate

    In case anyone is looking for a simpler solution, you can use the Genesis Simple Hooks plugin.

    Once you activate that plugin, you go to genesis --> simple hooks

    Scroll down until you find the Entry Hooks section. Play around with where you want your custom fields to show up. You have to check the boxes for "execute shortcodes" and "execute php" and then copy the Custom Press custom fields shortcode into the box there.

    I'm still working on formatting how it appears, but at least it shows up.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.