• How can I add page attribute option in my post also as like page option so that I can select the page where to publish content before publishing the post?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Reading your question it’s a little unclear what you’re looking for or to do. Could you please clarify your request, maybe images or additional links will help.

    Thread Starter theuniversetale

    (@theuniversetale)

    I want to add Page attribute section in the post section also. Currently page attribute option only available in page section only to choose parent page

    In WordPress there are 2 types: Hierarchical Post Types and Non-Hierarchical Post Types. Pages are by default hierarchical and Posts are by default non-hierarchical. There may be plugins to change how this works, I could only find 1 which doesn’t look well received but may work in your case: Add Hierarchy (parent) to post.

    If you can’t find a plugin to do this for you, you would need to get your hands dirty with some custom PHP. If you’re not comfortable doing that kind of thing then maybe creating a new Post Type would be easier.

    The Custom Post Type UI plugin gives you a user interface to create new post types similar to Posts or Pages in which you can tell it to be hierarchical and define your own permalink structure. There are quite a few good tutorials and plugins to help with this, the following tutorial is just one of many I thought may be helpful:

    https://torquemag.io/2015/12/wordpress-custom-post-types-tutorial/

    Hopefully you find the above helpful. If you’re looking for a pure PHP route you can reply back and myself or someone else may be able to jump in and show an example on how to achieve this. Though, it’s not recommended if you’re not familiar since it can bring down your whole site if not done correctly.

    Thread Starter theuniversetale

    (@theuniversetale)

    I have tried these 2 plugins earlier but it didn’t give me the solution which I am looking for. Add Hierarchy (parent) to post- this plugin shows only post as parent, but i am looking for page as parent and 2nd plugin is seems difficult to do so as i need to post content on 3-4 different page attribute. So in my case coding is the better option only but i don’t know PHP coding. I have searched for it and found some answer also but they are only showing template and order attribute, but i need mainly parent attribute. So plz give me some code which can do so.

    If you want a Page ( which is a different “Post Type” ) as the parent of a Post then you are going to run into issues. The permalink structure will not reflect hierarchy since the two types are unrelated. None of the WordPress functions will be able to pull them into a list of navigation because they are 2 different “types”. If that is what you’re looking for ( Page being parent of a Post ) then that’s a much more difficult challenge.

    If you want posts to display on a specific page that’s a much easier challenge.

    Why do you want a Page to be parent of a Post? You can add a specific Post under a Page in Appearance -> Menus if that’s your goal. You can show posts on a page with a shortcode if that’s your goal. What’s the end goal you’re trying to achieve?

    Thread Starter theuniversetale

    (@theuniversetale)

    My goal is to target my website in different countries using a single WordPress installation. I want to create 3-4 page for different country and then target that page using webmaster to the chosen country and then post content on that page according to that country

    eg:

    https:www.universetale.com/in/post-title
    https:www.universetale.com/us/post-title

    and then target page
    https:www.universetale.com/in/ to India and
    https:www.universetale.com/us/ to us

    Thread Starter theuniversetale

    (@theuniversetale)

    @howdy_mcgee Can you plz help me?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add Page Attribute Option in Post as page’ is closed to new replies.