• Resolved golazphil

    (@golazphil)


    Hi,

    Thank you for this great plugin you made here ! I know that the issue of showing BTF in a header or a page has already been mentioned at least twice here. But my WordPress knowledge is limited and I think I am missing out on something.
    @jonathandejong wrote this to another user :

    “you can just add the do_action call to your home page with a second parameter of your cpt slug.

    do_action( ‘show_beautiful_filters’, ‘cptsluggoeshere’ );”

    Unfortunately this is mostly Greek to me, and I could use some step-by-step help and guidance.

    BTW : Since BTF is the main feature and serves the main purpose of the website I am working on, I am not interested in having it on a sidebar as a widget, but would really like it to be the very first thing the visitor notices, either on the home page or in the header with a theme allowing such things.

    Thank you for your help, and keep up the good work !

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jonathandejong

    (@jonathandejong)

    Hi Golazphil (Phil?)

    Alright let’s say you want it in the header of your theme:

    1. Open up header.php in your themes folder. This can either be done by accessing your websites files via FTP or through the editor in wp-admin (I can’t remember what the menu is called but I think it’s Behaviour > editor or something like that.)
    2. Paste this in header.php at the location where you want BTF to appear:
    do_action( 'show_beautiful_filters', 'cptsluggoeshere' );
    and replace “cptsluggoeshere” with the slugname of your custom post type (the post type you want BTF to filter). For example if your custom post type is called Cars then the slug is likely “cars”.
    3. Save the changes.
    4. If you haven’t already; visit BTF settings and activate it for your custom post type and make any other settings you want.

    That should be it!
    As for where in header.php you should put the code it’s impossible for me to say. All themes look different. But you should atleast put it somewhere after the <body> tag.

    Best of luck!

    Thread Starter golazphil

    (@golazphil)

    That’s perfect ! Thank you very much !

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘BTF in page/header’ is closed to new replies.