Create Custom Sidebar with Custom Fields?

Community Forums Forums General Discussion Create Custom Sidebar with Custom Fields?

This topic is: resolved

This topic contains 10 replies, has 2 voices, and was last updated by  braddalton 1 year, 3 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #52747

    ganee
    Participant
    Post count: 13

    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

    • This topic was modified 1 year, 3 months ago by  ganee. Reason: Change image URL
    • This topic was modified 1 year, 3 months ago by  ganee. Reason: Change image URL
    #52887

    braddalton
    Participant
    Post count: 10356

    Genesis Simple Sidebars plugin provides the easiest solution.


    #52910

    ganee
    Participant
    Post count: 13

    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

    #52912

    braddalton
    Participant
    Post count: 10356

    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.


    #52915

    ganee
    Participant
    Post count: 13

    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

    #52917

    braddalton
    Participant
    Post count: 10356

    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.


    #52919

    ganee
    Participant
    Post count: 13

    Thanks! I will have a look.


    WP Developer @ Press9

    #53080

    ganee
    Participant
    Post count: 13

    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

    #53146

    braddalton
    Participant
    Post count: 10356

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


    #53180

    ganee
    Participant
    Post count: 13

    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

    #53189

    braddalton
    Participant
    Post count: 10356

    Works well. Thanks for sharing Ganee.


Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.