return array map with category name and link from cpt?
hi, maybe somebody can help me there because i can’t find solution…

i have my custom post type “websites” with registered taxonomy category “portfolio\_categories”.

but i have no idea how to add properly “category name” and “permalink to cat” in this array when i loop get\_posts() function.

public …
ok i got it,

'categories' => get\_the\_term\_list($post->id, 'portfolio\_categories'),

maybe that will be useful for somebody in the future.
In your example, the category data is stored in an attribute, rather than within the node itself.


You therefore need to use the XPath: `/product[1]/categories/category/@path` where the @ shows you want to target an attribute. Instead of the field category\_ids, create a link table consisting of the post id and category id. For a long time HtmlAgilityPack [didn't had the ability to directly query an attribute value](http://htmlagilitypack.codeplex.com/Thread/View.aspx?ThreadId=1720). You had to loop over the list of meta nodes. Here's one way - 



```
var doc = new HtmlDocument();
doc.LoadHtml(htmlString);

var list = doc.DocumentNode.SelectNodes("//meta"); 
foreach (var node in list)
{
    string content = node.GetAttributeValue("content", "");
}

```

But looks like in there is an [experimental xpath release](http://htmlagilitypack.codeplex.com/releases/view/46681) that will let you do that. 



```
doc.Document.SelectNodes("//meta/@content") 

```

will return a list of HtmlAttribute objects. if you need a link\_to, not sure you can use facts\_hash.

maybe something like this may works:

:column\_view:

:architecture:

:title: architecture

:after: last\_report

:content: link\_to(#{host.architecture}, "https://katello.fqdn/hosts?search=architecture+%3d+#{host.architecture}")

just che… if you want each cart item to to have each selected employee,

pass item to select\_emplyee(i) method not index for ex. (click)=“select\_emplyee(item)”.

then in implementation add one more extended property to your cartlist json called employeename.

select\_emplyee(item) {



this.employee\_alert… try this mate. replacing images and links with your own.



```
<center><script language="JavaScript">
<!--
// Create arrays to contain all the values 
// for links and image locations
link = new Array
image = new Array

link[1]="[http://www.wildexpo.com.au/Aust%20Rep%20Show/](/posts/bad_link/469772?url=http%3A%2F%2Fwww.wildexpo.com.au%2FAust%2520Rep%2520Show%2F)"
image[1]="[http://www.reptilesaustralia.com.au/forums/Ads/wildexpo.gif](/posts/bad_link/469772?url=http%3A%2F%2Fwww.reptilesaustralia.com.au%2Fforums%2FAds%2Fwildexpo.gif)"

link[2]="[http://www.freewebs.com/langylot/](/posts/bad_link/469772?url=http%3A%2F%2Fwww.freewebs.com%2Flangylot%2F)"
image[2]="<http://i14.photobucket.com/albums/a345/Instar/reptilemad.jpg>"

link[3]="[http://www.theherphouse.com/](/posts/bad_link/469772?url=http%3A%2F%2Fwww.theherphouse.com%2F)"
image[3]="[http://www.theherphouse.com/mkportal/templates/default/images/logo.jpg](/posts/bad_link/469772?url=http%3A%2F%2Fwww.theherphouse.com%2Fmkportal%2Ftemplates%2Fdefault%2Fimages%2Flogo.jpg)"

link[4]="[http://www.aftcra.org.au/](/posts/bad_link/469772?url=http%3A%2F%2Fwww.aftcra.org.au%2F)"
image[4]="<http://i14.photobucket.com/albums/a345/Instar/adimage2.jpg>"

link[5]="<http://reptilesaustralia.com.au/index.html>"
image[5]="<http://i14.photobucket.com/albums/a345/Instar/reptilesaustralia.jpg>"

link[6]="<http://www.zoomed.com/>"
image[6]="[http://www.reptilesaustralia.com.au/forums/Ads/zoomed.jpg](/posts/bad_link/469772?url=http%3A%2F%2Fwww.reptilesaustralia.com.au%2Fforums%2FAds%2Fzoomed.jpg)"

link[7]="<http://www.reptilepark.com.au/>"
image[7]="<http://i14.photobucket.com/albums/a345/Instar/arpbanner468x60.jpg>"

link[8]="<http://www.wildlifewarriors.org.au/>"
image[8]="<http://i14.photobucket.com/albums/a345/Instar/www_banner.jpg>"

link[9]="[http://saveourreptiles.proboards50.com/index.cgi](/posts/bad_link/469772?url=http%3A%2F%2Fsaveourreptiles.proboards50.com%2Findex.cgi)"
image[9]="<http://i50.photobucket.com/albums/f335/lnvexotics/Untitled-1undoner11.jpg>"

// Create a random number between 1 and last number
random_num = (Math.round((Math.random()*8)+1))
// Write a link and images with random array
document.write('<a href="' + link[random_num] + '" target="_blank">'); 
document.write('<img src="' + image[random_num] + '" border="0"></a>'); 
-->
</script>
</center>
``` try this and try to modify accordingly -



```
<?
//content is the array of titles which comes from the content.php page or the entire code can be put in the content.php
$content = array('title1 - This is the Homepage','title2 -Find new friends','title3 - Get your visa cleared now','title4 - bark about your wife here','title5 - Dont have kids yet','some other page');

$arr = explode('/',$_SERVER['PHP_SELF']);

$current_page = $arr[count($arr)-1];
//list your pages here
$pages  = array("1=>index.php","2=>friends.php","3=>nicks.php","4=>rent.php","5=>test.php");
for($i = 0; $i<count($pages);$i++)
{
	if($pages[$i] == trim($current_page))
		$pages_index = $i;
	else $pages_index = 6;
}
//This will echo the title
echo $content[pages_index];
?>
```

ask,if you stuck up somewhere. [@chicagolooper](/t5/user/viewprofilepage/user-id/9000963) 

 

Yeah a few weeks back all the seller tools links for personal account went missing so had to dig up links as a workaround but they came back several days later. PayPal updating something. Use this link for the time being:

[Create PayPal Payment Buttons - PayPal](https://www.paypal.com/buttons/)

 

Click **View Saved Buttons** link near top right side of page.



  
*Kudos & Solved are greatly appreciated.* 🙂



[View solution in original post](/t5/Products-Services/Manage-Buttons-does-not-exist-on-summary-page/m-p/1797782#M318) hi chris, 
if you use relations api, you may set properties field in your query. in this field you should set the names of the properties which values must be retrieved from the server. the argument should be a string in the following format: "propertyname1, propertyname2, , , propertynamen" , wher… hi [@ecarmona](/u/ecarmona),

thanks for your question, this is definitely something that can be improved in the documentation.

in this context name is not referring to a specific field in the saved object, it's referring to the value of the name property of the reference itself. the reason for this is that the i…