I hope someone can help me out on this one.
I want to print a url base on Home - Category - subcategory -post
Basicaly is a 4 deep silo architecture using pages for category and subcategory.
I succeed to get the first 2 working but cant find how to add the third variable working in that code.
Any help is welcome :)
There is what I get so far
$alink= get_category_link ($alink_cat_id );
$blink = get_the_permalink ($blink _id);
$clink = get_the_permalink ($clink_cat_id );
$request = $alink
$destination = $blink
//This is the var I need to get into the result
//$seconddestination = $clink
//Get entire array
$redirects = get_option('redirects');
//Alter the options array appropriately
$redirects[$request] = $destination;
//Update entire array
update_option('redirects', $redirects);
///Show the Full URL///
echo '<br><h3>Show Full URL Silo Page</h3>';
$redirects = get_option('redirects');
if (!empty($redirects)) {
foreach ($redirects as $a => $b) {
echo $a.' >>> '.$b.'<br>';
}
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire