Support » Plugin: Genesis Simple Edits » Child theme slug outputs on front end

  • Resolved Robert Gadon

    (@yogaman5020)


    Hi All,

    I’m running Utility Pro (Genesis child theme) and your plugin. In the ‘footer output’ field on the back end, I entered the following markup to output the name of the child theme:

    [footer_childtheme_link before=”” after=” On”]

    On the front end, WP returns the following:

    ‘The utility-pro’ child theme’

    What I want is: ‘The Utility Pro child theme’.

    Deactivation of all plugins, and reactivation of ‘Genesis Simple Edits’ does not resolve the problem.

    I’m not knowledgeable enough about code to troubleshoot the problem. I suspect that the child theme name is being output as a slug (‘utility-pro’). I would like to return the string ‘Utility Pro’.

    Can you help?

    Screen shots (back and front end) available upon request.

    Robert

    https://wordpress.org/plugins/genesis-simple-edits/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Nick C

    (@modernnerd)

    Hi, yogaman5020!

    The footer_childtheme_link shortcode uses the theme name as it’s been defined in the child theme as CHILD_THEME_NAME. This is normally the theme’s full name with capitals and spaces.

    You could check the theme code to see how CHILD_THEME_NAME has been defined, or just use HTML in the Simple Edits Footer Output field:

    The <a href="https://store.carriedils.com/downloads/utility-pro/">Utility Pro</a> child theme.

    Thread Starter Robert Gadon

    (@yogaman5020)

    Hi Nick,

    I appreciate your response. I tried modifying the markup in the footer output field using HTML. No success.

    As I suspected, the PI shortcode is pulling from a predefined value. You were correct in identifying the output from a constant. That constant resides in the theme’s functions.php file; ‘utility_pro_setup()” defines the CHILD_THEME_NAME as ‘utility-pro’, not ‘UTILITY PRO’.

    I have a couple of resources at my disposal to inquire on how to change the output of that constant. The first is to submit a support request to the theme developer (Carrie Dils), and the second is to inquire at the ‘WP Developer’s Club’ on one of their Slack channels.

    I suspect the solution is to simply add a new definition to the function listed above that outputs a different string. When I find a solution, I’ll post it here.

    Thread Starter Robert Gadon

    (@yogaman5020)

    For anyone reading this, the solution is simple. Nick’s explanation above left out a key piece of information: substitute the HTML in place of the short code. If you embed your HTML inside the short code, you won’t change anything.

    For example, the shortcode [footer_child_theme_link before=”” Utility Pro after=”child theme”] outputs: utility-pro child theme.

    But ‘The <a href="https://store.carriedils.com/downloads/utility-pro/">Utility Pro</a> child theme' returns: The Utility Pro child theme.

    Just leave out the short code when using the HTML.

    Plugin Support Nick C

    (@modernnerd)

    Thanks for the update, and glad you got this working.

    (And, yes, I meant use the HTML in place of the shortcode – apologies for not making that more clear.)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Child theme slug outputs on front end’ is closed to new replies.