Skip to content

Instantly share code, notes, and snippets.

View ahmedkaludi's full-sized avatar
🎯
Focusing

Ahmed Kaludi ahmedkaludi

🎯
Focusing
View GitHub Profile
@ahmedkaludi
ahmedkaludi / index.php
Created February 1, 2017 15:22 — forked from khaledMohammed000/index.php
Final code for Home page modification
<?php
/*
Plugin Name: AMP Home Page Modify
Version: 0.0.1
Author: Mohammed Khaled
Author URI: https://ampforwp.com/
Donate link: https://www.paypal.me/Kaludi/5
License: GPL2
*/
// Exit if accessed directly.
// Display Tag code
function ahmedkaludi_structured_data_keyword() {
if ( is_single() | is_page() ) {
$tags = '"keywords" : [' . strip_tags(get_the_tag_list('"','", "','"')) . ']';
} else { }
echo $tags;
}
function ahmedkaludi_structured_data_output() {
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Product",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "3.5",
"reviewCount": "11"
},
"description": "0.7 cubic feet countertop microwave. Has six preset cooking categories and convenience features like Add-A-Minute and Child Lock.",
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Product",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "3.5",
"reviewCount": "11"
},
"description": "0.7 cubic feet countertop microwave. Has six preset cooking categories and convenience features like Add-A-Minute and Child Lock.",
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Product",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "3.5",
"reviewCount": "11"
},
"description": "0.7 cubic feet countertop microwave. Has six preset cooking categories and convenience features like Add-A-Minute and Child Lock.",
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Product",
"description": "0.7 cubic feet countertop microwave. Has six preset cooking categories and convenience features like Add-A-Minute and Child Lock.",
"name": "Kenmore White 17\" Microwave",
"offers": {
"@type": "Offer",
"availability": "http://schema.org/InStock",
"price": "55.00",
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Product",
"description": "0.7 cubic feet countertop microwave. Has six preset cooking categories and convenience features like Add-A-Minute and Child Lock.",
"name": "Kenmore White 17\" Microwave",
"offers": {
"@type": "Offer",
"price": "55.00",
"priceCurrency": "USD"
@ahmedkaludi
ahmedkaludi / Structured Data in WordPress
Created June 19, 2016 16:01
Structured Data in WordPress
// Display Tag code
function ahmedkaludi_structured_data_keyword() {
if ( is_single() ) {
$tags = '"keywords" : [' . strip_tags(get_the_tag_list('"','", "','"')) . ']';
} else { }
echo $tags;
}
function ahmedkaludi_structured_data_output() {
@ahmedkaludi
ahmedkaludi / Structured data in Divi theme.php
Created June 19, 2016 14:22
Structured data in Divi theme
<?php
add_action( 'wp_enqueue_scripts', 'ahmedkaludi_enqueue_styles' );
function ahmedkaludi_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
// Display Tag code
function ahmedkaludi_structured_data_keyword() {
if ( is_single() ) {