WordPress.org

Ready to get started?Download WordPress

Forums

[closed] How to get specfic page content on sidebar (1 post)

  1. charslan
    Member
    Posted 1 year ago #

    Hello Friends,

    I am creating a wordPress theme and encountered a problem and need a solution from you guys.

    My theme has a sidebar and on that sidebar I want to display a page c say (About Us page). Now I want to display the about us page content on the area of the sidebar. The about us page content should be dynamic which is controlled by the WP dashboard and we can change aboutus page content any time via dashboard.

    I need dynamic solution for that.
    1) Should I create a separate template for that aboutus page?(what if I have many such pages in sidebar)

    2) if I use get_page_by_title or get_page( $page_id ) but this is static because I have to first create about us page for that then give that ID or title to functions to hard code it.

    I don't want to hard code I want dynamic solution.

    Anyone here please give me the best solution.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.