删除特定页面的Jetpack的Open Graph元标记

时间:2019-08-22 12:17:10

标签: wordpress jetpack

我要逐页/逐个删除ID,以删除Jetpack的Open Graph元标记。

我试图将此代码添加到主题function.php

add_filter('jetpack_enable_open_graph','__return_false');

它适用,但适用于整个帖子/页面。那么,如何使它仅适用于特定的帖子/页面ID?

1 个答案:

答案 0 :(得分:0)

您可以尝试以下方法:

    var multer = require('multer');

    var storage = multer.diskStorage({
    	//multers disk storage settings
    	destination: function (req, file, cb) {
    		cb(null, 'public/uploads/')
    	},
    	filename: function (req, file, cb) {
    		//var datetimestamp = Date.now();
    		cb(null, file.originalname)
    	}
    });
    var upload = multer({
    	storage: storage
    })

    router.post('/adduser', upload.single('image'), function (req, res) {
    	console.log(req.body.name);
    	var data = {
    		name: req.body.name,
    		password: req.body.password,
    		image: 'uploads/' + req.file.originalname
    	}
    	users.insert(data, function (err, data) {
    		console.log(data);
    		res.redirect('/home');
    	});
    });