[Support request] Can custom hooks be used for a shortcode with a php function?

Home Forums Support [Support request] Can custom hooks be used for a shortcode with a php function?

Home Forums Support Can custom hooks be used for a shortcode with a php function?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1120498
    Eric

    Hi,

    I currently have a custom shortcode I did myself that queries a custom table in MySQL to retrieve custom data. I have obviously modified the theme to achieve that.

    I am trying to see how to implement this small functionality with GeneratePress. Do I have to create a child theme?

    See the link included. The Investment Data is a shortcode with embedded shortcode that queries the database for each fields. I use the Shortcoder plugin from within WordPress and that works well and it allows for embedded shortcodes but I had to write the php code in the theme files due to the database queries I made. I was hoping the custom hooks could come in handy as a way to do a custom shortcode with php.

    Loving the theme so far and would love an easy way to do this.

    Thanks

    PS if not possible, can this be a feature? It seems that it would easily fit inside your current model with the premium plugin 🙂

    #1120726
    David
    Staff
    Customer Support

    Hi there,

    if i understand correctly then a Child Theme is the way to go, just add your shortcode function to the child theme funtions.php. We cover Child Themes here which also includes a link to a blank child theme:

    https://docs.generatepress.com/article/using-child-theme/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.