• 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 Custom Sidebar with Custom Fields?

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 › General Discussion › Create Custom Sidebar with Custom Fields?

This topic is: resolved

Tagged: Custom fields, Custom Post Type, portfolio

  • This topic has 10 replies, 2 voices, and was last updated 9 years, 10 months ago by Brad Dalton.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • July 27, 2013 at 3:05 am #52747
    ganee
    Member

    I need some direction on what is the best way to do accomplish this task.

    I have a portfolio page which is pulling content from Post type.

    On the sidebar on this single post page, I would like to create a custom sidebar that will display project information.

    Question:
    1. Do I use custom fields to populate the new fields such as Project Name, Project Duration, Client Name?
    2. How do I identify this Post is part of portfolio and display the custom side bar?
    3. How do I go about to create the sidebar in this case? Can Simple SideBar plugin help?


    WP Developer @ Press9

    July 27, 2013 at 6:30 pm #52887
    Brad Dalton
    Participant

    Genesis Simple Sidebars plugin provides the easiest solution.


    Tutorials for StudioPress Themes & WooCommerce.

    July 27, 2013 at 9:38 pm #52910
    ganee
    Member

    By using Genensis Simple Sidebars will create the sidebar, however the content in the sidebar will have to be unique for each project being displayed. I am stuck at that part. My assumption is using Custom Fields and somehow pulling the content from the content meta.

    I am looking at this example - http://dreamwhisperdesigns.com/genesis-tutorials/load-sidebar-specific-pages/. Do let me know if there is an easier way to do this?


    WP Developer @ Press9

    July 27, 2013 at 9:43 pm #52912
    Brad Dalton
    Participant

    Yeah do that if you want however you may not need to because its a walk in the park creating multiple custom sidebars which you can populate using any widgets. Really depends on your needs.

    How many projects?

    Custom fields are a step above custom widgets however you will need the code written for each one.


    Tutorials for StudioPress Themes & WooCommerce.

    July 27, 2013 at 10:13 pm #52915
    ganee
    Member

    The projects will increase over time and I will keep adding as it comes. By using Genesis Simple Sidebar, I will have the project sidebar option within the post.

    If I reading right, your suggestion is to create multiple sidebar and tied with with the relevant Post. Ideally I would like to have only one sidebar and have it dynamically pull the values associated with the Post.

    I will have a look at Custom Widgets if its doable here.


    WP Developer @ Press9

    July 27, 2013 at 10:53 pm #52917
    Brad Dalton
    Participant

    In that case, custom fields and meta boxes are the way to go and you can use different plugins to help you create them like Advanced Custom Fields (ACF), Pippins custom content types and Types & Views.


    Tutorials for StudioPress Themes & WooCommerce.

    July 27, 2013 at 11:10 pm #52919
    ganee
    Member

    Thanks! I will have a look.


    WP Developer @ Press9

    July 29, 2013 at 10:45 am #53080
    ganee
    Member

    Thanks Brad. I accomplished the task using Genesis Simple SideBar, Advanced Custom Fields and PHP Code plugin.

    I created the sidebar using GSS and the custom fields with ACF. On the sidebar widget, I used PHP Code plugin to pull the values from the custom fields using ACF codes.


    WP Developer @ Press9

    July 29, 2013 at 6:47 pm #53146
    Brad Dalton
    Participant

    What PHP code did you use to create the custom field and which PHP code plugin did you use? Please share.


    Tutorials for StudioPress Themes & WooCommerce.

    July 30, 2013 at 3:27 am #53180
    ganee
    Member

    Oh, I didn't create any PHP code to create the custom fields. Perhaps I can detail down below.

    1. I used Genesis Simple Sidebar plugin to create a side bar called Works.
    2. I then used as per your suggestion Advance Custom Fields and created several fields.

    3. I then installed PHP Code Widget (http://wordpress.org/plugins/php-code-widget/).
    4. Using the code example given in (http://www.advancedcustomfields.com/resources/getting-started/code-examples/), I inserted those code into the Works sidebar widget using PHP Code Widget. See the image below.

    5. The end result would be like this -> http://www.gds.my/smart-arts/

    It might not be the best solution, but it works. Any suggestion on improvement is much welcomed.


    WP Developer @ Press9

    July 30, 2013 at 3:53 am #53189
    Brad Dalton
    Participant

    Works well. Thanks for sharing Ganee.


    Tutorials for StudioPress Themes & WooCommerce.

  • Author
    Posts
Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘General Discussion’ 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