• hello

    i try with this code to remove all fonts , css , javascript from all site and let same posts from category id

    this code hope help to reomve all css and javascript and font from pages and category

    
    
    

    function blazzdev_show_rating_widget() {
    if ( in_category(array(‘1477’, ‘1438’, ‘1510’, ‘1439’, ‘1442’, ‘1435’, ’20’, ‘1433’, ’19’, ‘1420’, ’21’, ‘1437’, ‘1434’, ‘1443’, ‘1421’, ‘1436’, ‘1455’, ‘1446’, ‘1454’, ‘1456’, ‘1503’, ‘1500’, ‘1481’, ‘1508’, ‘1506’, ‘1505’, ‘1473’, ‘1483’, ‘1504’, ‘1464’, ‘1496’, ‘1497’, ‘1467’, ‘1463’, ‘1476’, ‘1507’, ‘1462’, ‘1470’, ‘1480’, ‘1498’, ‘1479’, ‘1493’, ‘1486’, ‘1487’, ‘1488’, ‘1494’, ‘1491’, ‘1489’, ‘1492’, ‘1490’, ‘1466’, ‘1472’, ‘1475’, ‘1482’, ‘1460’, ‘1461’, ‘1444’, ‘1445’, ‘1469’, ‘1485’, ‘1471’, ‘1499’, ‘1474’, ‘1457’, ‘1484’, ‘1465’, ‘1509’)) ) { // category slug
    return false;
    }
    return true;
    }

    i use same category to show only rating in single file

    
    

    <?php if ( in_category(array(‘1477’, ‘1438’, ‘1510’, ‘1439’, ‘1442’, ‘1435’, ’20’, ‘1433’, ’19’, ‘1420’, ’21’, ‘1437’, ‘1434’, ‘1443’, ‘1421’, ‘1436’, ‘1455’, ‘1446’, ‘1454’, ‘1456’, ‘1503’, ‘1500’, ‘1481’, ‘1508’, ‘1506’, ‘1505’, ‘1473’, ‘1483’, ‘1504’, ‘1464’, ‘1496’, ‘1497’, ‘1467’, ‘1463’, ‘1476’, ‘1507’, ‘1462’, ‘1470’, ‘1480’, ‘1498’, ‘1479’, ‘1493’, ‘1486’, ‘1487’, ‘1488’, ‘1494’, ‘1491’, ‘1489’, ‘1492’, ‘1490’, ‘1466’, ‘1472’, ‘1475’, ‘1482’, ‘1460’, ‘1461’, ‘1444’, ‘1445’, ‘1469’, ‘1485’, ‘1471’, ‘1499’, ‘1474’, ‘1457’, ‘1484’, ‘1465’, ‘1509’)) ): ?>
    <?php echo do_shortcode(‘[ratemypost]’); ?>
    <?php endif; ?>

    i need only stop this from all and let it on category 1433, 19

    this load rate what talk about

    
    wp-content/plugins/rate-my-post/public/css/rate-my-post-rtl.css
    wp-content/plugins/rate-my-post/public/js/rate-my-post.js
    <script type='text/javascript' id='rate-my-post-js-extra'>
    /* <![CDATA[ */
    var rmp_frontend = {"admin_ajax":"https:\/\/iqr2.com\/wp-admin\/admin-ajax.php","postID":"52421","noVotes":"\u0644\u0627 \u062a\u0648\u062c\u062f \u062a\u0642\u064a\u064a\u0645\u0627\u062a \u062d\u062a\u0649 \u0627\u0644\u0622\u0646! \u0643\u0646 \u0623\u0648\u0644 \u0645\u0646 \u064a\u0642\u064a\u0645 \u0647\u0630\u0627 \u0627\u0644\u0645\u0642\u0627\u0644.","cookie":"\u0644\u0642\u062f \u0642\u0645\u062a \u0628\u0627\u0644\u062a\u0642\u064a\u064a\u0645 \u0645\u0633\u0628\u0642\u0627! \u0644\u0646 \u064a\u062a\u0645 \u0627\u062d\u062a\u0633\u0627\u0628 \u0647\u0630\u0627 \u0627\u0644\u062a\u0642\u064a\u064a\u0645!","afterVote":"\u0634\u0643\u0631\u0627 \u0644\u062a\u0642\u064a\u064a\u0645 \u0647\u0630\u0627 \u0627\u0644\u0645\u0642\u0627\u0644!","notShowRating":"1","social":"1","feedback":"1","cookieDisable":"1","emptyFeedback":"Please insert your feedback in the box above!","hoverTexts":"1","preventAccidental":"1","grecaptcha":"1","siteKey":"","votingPriv":"1","loggedIn":"1","positiveThreshold":"2","ajaxLoad":"1","nonce":"eef4d68231"};
    /* ]]> */
    </script>
    wp-content/plugins/rate-my-post/public/css/fonts/ratemypost.ttf

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Blaz K.

    (@blazk)

    Hi there,

    You need to look into wp_deregister_script and wp_deregister_style functions. You deregister all scripts and styles of RMP and then register them only on pages where you need them.

    Regards,
    Blaz

    Thread Starter elfnon, inc.

    (@c0der)

    can you help me for that and thank you if you do it at all plugin if use short code it not load any plugin on any page only with short code

    Thread Starter elfnon, inc.

    (@c0der)

    thank you for idea

    i made this code with one problem i dont want load scripts in category only posts in catrgory

    add_action('wp_enqueue_scripts','my_custom_scripts');
    function my_custom_scripts() {
        if (in_category(array(1,1477, 1438, 1510, 1439, 1442, 1435, 20, 1433, 19, 1420, 21, 1437, 1434, 1443, 1421, 1436, 1455, 1446, 1454, 1456, 1503, 1500, 1481, 1508, 1506, 1505, 1473, 1483, 1504, 1464, 1496, 1497, 1467, 1463, 1476, 1507, 1462, 1470, 1480, 1498, 1479, 1493, 1486, 1487, 1488, 1494, 1491, 1489, 1492, 1490, 1466, 1472, 1475, 1482, 1460, 1461, 1444, 1445, 1469, 1485, 1471, 1499, 1474, 1457, 1484, 1465, 1509))){
        wp_enqueue_script( 'rate-my-post' );
        wp_enqueue_style( 'rate-my-post' );
      }else{
        wp_dequeue_script( 'rate-my-post' );
        wp_dequeue_style( 'rate-my-post' );
      }
    }

    i hope you help me to make it only posts not category and posts

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘remove full code from all category and left same’ is closed to new replies.