• Resolved dimal

    (@dimalifragis)


    I’m using Gutenberg to build the page. With two blocks, the search and the grid.

    Everything works just fine.

    I want to show ads within Betterdocs pages. I use Ad Inserted plugin (the best out there).

    I show ads in the Home page of Betterdocs, ok. I show ads in each doc page, ok.

    But i fail to show ads on each of the Categories pages. Since there is no such a page to edit or insert anything manually, i try to insert them via Ad Inserter taxonomies option. While i see and select the taxonomies for each category, nothing happens.

    So the question is, how do i Inject Anything (text, ads, jscript) in the Categories pages of Betterdoc?

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Abid Hasan

    (@abidhasan112)

    Hi @dimalifragis ,

    If you’re using Elementor page builder, you can customize Category, Single Doc page template by using Elementor Theme Builder: https://betterdocs.co/docs/docs-category-archive-elementor/

    And currently, this is the only way to customize Category and Single Doc template.
    And then you can inject any JS and script into your template by using HTML widget with script tag.

    Since Elementor Theme Builder is the PRO feature of Elementor, so let’s not talk briefly about this feature in this forum. If you have any questions regarding this, you can contact with us from here: https://wpdeveloper.com/support/new-ticket/

    Cheers!

    Thread Starter dimal

    (@dimalifragis)

    Ok, one more question for my issue (since i don’t have Elementor pro). Ad Inserter has an advanced option to inject ads using ANY hook. I use that already for an other plugin (a forum plugin).

    Does Betterdocs has some hook (or hooks) that i can try?

    Thanks

    Thread Starter dimal

    (@dimalifragis)

    .. or as the last resort, where i could put code (manually) like this:

    <?php if (function_exists ('adinserter')) echo adinserter (1); ?>

    so i can have ads in the Single CATEGORY page?

    Thank you

    Plugin Support Abid Hasan

    (@abidhasan112)

    Hi @dimalifragis ,

    Unfortunately, we don’t have an action hook in our BetterDocs. However, I can give you another idea.

    Add a js file(with your script ie custom-ads-script.js) on your child theme inside js folder and enqueue it from functions.php file.

    function add_script_on_betterdocs_pages(){
        if( is_singular( 'docs' ) || is_archive( 'docs' ) ){
            wp_enqueue_script( 'ads-script', get_template_directory_uri() .'/js/custom-ads-script.js', array('jquery'));
        }
    }
    add_action( 'wp_enqueue_scripts', 'add_script_on_betterdocs_pages' );

    I hope, you have the development skills to execute the above process.

    Thank you!

    Thread Starter dimal

    (@dimalifragis)

    Thank you.

    I was able to add this snipet via a plugin and seems to work fine. Still i’m not able to actually use it, i mean the script (while loaded as i see in the html source), it doesn’t display the ads anywhere. Probably i’m missing something.

    Thank you, i will try this more and try to find how to use it.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Category Page’ is closed to new replies.