Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter DS

    (@da-mind)

    // execute the scripts on page and single posts
    // Should I add || is_category() or || is_archive() on your script like that?

    function wpwoxcustomscript_display_hook_header() {
    global $post;
    if(is_single() || is_page() || is_category()) {
    echo html_entity_decode(get_post_meta($post->ID, ‘_wpwoxcustomscriptcontentinhead’, true));
    }

    echo get_option(‘wpwoxcustomscript_all_head’);
    return;
    }

    function wpwoxcustomscript_display_hook_footer() {
    global $post;
    if(is_single() || is_page() || is_category()) {
    echo html_entity_decode(get_post_meta($post->ID, ‘_wpwoxcustomscriptcontentinfooter’, true));
    }

    echo get_option(‘wpwoxcustomscript_all_body’);
    return;
    }

    function wpwoxcustomscript_display_hook($content=”) {
    global $post;
    $contents=$content;
    if(is_single() || is_page() || is_category()) {
    $contents= html_entity_decode(get_post_meta($post->ID, ‘_wpwoxcustomscriptcontenttop’, true)) . $content . html_entity_decode(get_post_meta($post->ID, ‘_wpwoxcustomscriptcontentbottom’, true));
    }

    return $contents;
    }

    Thread Starter DS

    (@da-mind)

    i tryed to change the Code but still not showing the custom area of code in categories that’s my website if someone can help i will be glad

    Nettoyage

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to add custom script To categories?’ is closed to new replies.