• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Adding code to functions or? – WooCommerce and Essentail Grid plugins

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Adding code to functions or? – WooCommerce and Essentail Grid plugins

This topic is: not resolved

Tagged: do_shortcode

  • This topic has 7 replies, 2 voices, and was last updated 7 years, 1 month ago by micki.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • March 31, 2016 at 3:14 pm #182605
    micki
    Participant

    Hi, It was suggested that I ask theme authors about this. I am getting nowhere with support from Essential Grid plugin guys, Hoping someone may have an answer here.

    In order to use the Essential grid "template" on the woo categories pages, I need to add the below code to a child theme file where it starts... while ( have_posts() ) : the_post();

    There is nothing like this in the Parallax child. I cannot seem to find it in the Genesis files. They show where to add it as an example for the Twenty Fifteen theme.

    I have added it to the functions file but nothing has changed at front end, as in, it is not working. I tried adding it to one of the woo files and uploaded to the correct folder in child theme but that does not work either.

    Code:

    <?php
    // Start the loop.
    $my_post_array = array();
    while ( have_posts() ) : the_post();

    /*
    * populate array with all queried post IDs
    */
    $my_post_array[] = $post->ID;

    // End the loop.
    endwhile;

    echo do_shortcode( '[ess_grid alias="even_grid_adams" posts='.implode(',', $my_post_array).']' );

    Does anyone have a clue as to how I can get this to work?
    Thanks in advance!

    April 1, 2016 at 1:50 am #182630
    Brad Dalton
    Participant

    Try these examples http://wpsites.net/web-design/executing-shortcodes-in-hook-locations-using-functions/


    Tutorials for StudioPress Themes & WooCommerce.

    April 1, 2016 at 5:14 pm #182694
    micki
    Participant

    thanks so much for the link. I have spent the last hours trying to figure out where to put what, and nothing is working. I installed simple hooks plugin, visual hooks plugin to see correct hooks. I have read and read, and cannot figure this out!

    It seems like I would not want to replace the existing loop structure, that will be used on other non woo pages...

    I am a bit channglend when it comes to understanding all of this :).

    Any other help you can provide is greatly appreciated.

    Thank you!

    April 1, 2016 at 11:42 pm #182705
    Brad Dalton
    Participant

    All you need to do is swap out the shortcode with your own and change the hook.

    No need to use a plugin as the code goes in your functions file.


    Tutorials for StudioPress Themes & WooCommerce.

    April 6, 2016 at 1:59 pm #183069
    micki
    Participant

    Still stumped by this. I tried many things and still cannot get it to work. The instructions that you stated above, what shortcode am I suppose to change out? I tried with the woocommerce_before_shop_loop and genesis_loop, didn't work. I know I am doing something wrong! Anyone out there want a small job???

    Thank you!

    April 6, 2016 at 7:46 pm #183084
    Brad Dalton
    Participant

    Link to your site please. Is this a free plugin or premium? How can i download a copy of the plugin for testing?


    Tutorials for StudioPress Themes & WooCommerce.

    April 6, 2016 at 8:47 pm #183088
    micki
    Participant
    This reply has been marked as private.
    April 10, 2016 at 1:47 pm #183304
    micki
    Participant

    Hi Again,

    Now wondering if you can not see posts set to private?

    Short answer: Paid plugin. need an activation code and I don't believe it can be used for more then one site. if you would like credentials for the site, let me know.

    Thanks!

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble