New Landing How can we help? Cardinal Add SPB Section

Viewing 2 posts - 1 through 2 (of 2 total)
  • Posted in: Cardinal
  • #175359
    Ian
    Member
    Post count: 121

    I have created a custom post type “Vendors” I have things working reasonably well. I would like to include a particular SPB section automatically on all Vendor pages.

    Is there a way to insert this automatically when a new vendor page is created? Or would this need to be done with a hook? If a hook is required what would I need to add this inside page-content?


    [spb_section spb_section_id="376" width="1/1" el_position="first last"]

    #175621
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    The only way that I see it has possible is for you create a specific template for the single post of that specific CPT.

    something like single-vendor.php like already exist for directory, portfolio, ect.

    Depending if you want that section in the beginning or in the end you should adjust the code.

    Also I just remember now that maybe it’s possible with hooks without creating the single template.

    Check this article. You will have to change the code to check if it’s your custom post type.
    http://www.wprecipes.com/wordpress-tip-insert-custom-content-after-each-post

    Hope it helps.

    -Rui

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

You must be logged in to reply to this topic.