• 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

Create Shortcode or Other Usable Data from a CSV file

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 › Create Shortcode or Other Usable Data from a CSV file

This topic is: not resolved
  • This topic has 1 reply, 1 voice, and was last updated 11 years, 9 months ago by brent s.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • September 25, 2013 at 6:44 pm #64214
    brent s
    Member

    I am not a coder/developer. I have created and will update frequently a csv file with numerous product variations and price variations.

    These product & price variations will be used in bits in pieces throughout my site. Some data will be repeated in several different places. As part of using this data, I will use it in plugins like plugins like tablepress and others. These plugins accept shortcodes in their data entry fields. Because there is a lot of variations and the data changes almost daily, it is CRITICAL that I only have to change the data in 1 location. my thought was the csv file.

    I have uploaded the csv file. Now I am stuck, what is the best way to pull a cell value into a post or put it into a plugin data entry point?

    With my limited experience, I thought to make it into short codes, since I can put that in a page, posts, and the plugins will accept. I tried creating non-indexed posts with custom fields containing the values and then tried to create shortcode like this:

    function CompanyShortcode() {
    return '<p> <?php if( get_post_meta($post->ID, Company, true) ): ?> </p>';
    }
    add_shortcode('company', 'Company');

    2 problems:

    Problem 1) when i try to use in a post it displays

    ">

    Problem 2) when using with plugins, I need to pull a custom field from a specific post. How do I identify a specific post?

    September 25, 2013 at 6:45 pm #64215
    brent s
    Member

    The error I get with the code above is

    ID, Company, true) ): ?>

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 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

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