Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
416 views
in Plugins by
In qa-theme-base.php, there is a variable called $q_item that is used frequently. I am trying to get the postid of each question on the questions page for use in custom layer.

For my purposes I am theming the following function: function q_item_title($q_item)

How would I access the post id in my layer in that particular function? I've tried $q_item['postid']. Doesn't work.

$q_item['url'] works in the layer, so I imagine there must be a way to access the post id with the $q_item array? Anyone know
Q2A version: 1.5

1 Answer

+1 vote
by
Sorry, I was making a typo here, so I'll answer my own question, if anyone else ever needs this information. To access the post id with $q_item array, you can use

$q_item['raw']['postid']

Welcome to the Q&A site for Question2Answer.

If you have a question about Q2A, please ask here, in English.

To report a bug, please create a new issue on Github or ask a question here with the bug tag.

If you just want to try Q2A, please use the demo site.

Categories

...