最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

php - Add a specific part of current category page url to shortcode

programmeradmin0浏览0评论

I have the following URL: website/category/xyz, where xyz can be hundreds of different words. I use a table plugin for displaying my content all throughout the website, and I want it to filter me categories on each category pages as well. The table works with shortcodes, as follows: [tableshortcode id="120" filter='xyz'].

I would like to place the category id of the current url, into the filter part of the shortcode. Right now I'm only able pull the shortcode with the following code:

<?php echo do_shortcode("[tableshortcode id="120" filter='xyz']"); ?>

Any answers, solutions would be much appreciated.

发布评论

评论列表(0)

  1. 暂无评论