• 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

Trouble running a Content Views Plugin shortcode

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 › Trouble running a Content Views Plugin shortcode

This topic is: resolved

Tagged: actions, content views, shortcodes

  • This topic has 2 replies, 2 voices, and was last updated 9 years, 3 months ago by tommchale.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • February 28, 2017 at 12:37 pm #202192
    tommchale
    Participant

    Hi - I'm still figuring out the Genesis action model and am trying to execute a shortcode from the Content Views plugin at a certain place on a page.

    I've tried the following code in a simple page template:
    <?php
    /*
    Template Name: Food Overview Page
    */
    ?>
    <?php
    add_action( 'genesis_before_footer', 'food_overview_grid', );
    function food_overview_grid() {
    echo do_shortcode('[pt_view id=750e362phd]');
    }
    genesis();

    I've also tried similar code in functions.php using a condition statement. Neither are showing the plugin results. If I just run the shortcode in page content, everything works fine. Trouble is, I want to place the output just before the footer area so it extends full page width after the main post content and sidebar content.

    I tried moving this to somewhere inside the main loop in case Content Views needed to be there, but it didn't seem to make any difference.

    I must be doing something really dense here, any ideas? The dev site is behind a password, so URL won't work. I'm using the Education Pro child theme.

    February 28, 2017 at 1:09 pm #202196
    Victor Font
    Moderator

    It looks like your code is structured correctly. It could be a timing issue. I would try adding a priority lower than the default of 10. Or, it could be that you might have to wrap the short code output in some structure.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    February 28, 2017 at 2:36 pm #202210
    tommchale
    Participant

    Update for anyone else here running Content Views:

    I may be nuts, but I think the executing a CV from PHP only works with the Pro Version even though it (seems to) imply that it works in the free version as well. Had to upgrade for some other features and suddenly the same code started working 🙂

    Just FYI and thanks for the help!

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Trouble running a Content Views Plugin shortcode’ is closed to new replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 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