$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>widgets - Conditional Tags Based on Previously Viewed Posts|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

widgets - Conditional Tags Based on Previously Viewed Posts

matteradmin8PV0评论

I was looking at the Conditional Tags Archive and was wondering if it's possible to show a widget depending on different posts / pages a visitor has previously viewed.

For example, if I had a car blog and the blog layout contains a sidebar widget that will display a promotion.

This promotion will vary depending on the types of posts a visitor has viewed.

So if a visitor was looking at posts that have to do with the Mazda brand, I'll be able to write a condition for the widget in the sidebar that reads, if he visited blog post X, Y or Z, then this widget will display a promotion for a Mazda Car Dealership near him.

Same for other car types and promotions.

I'm guessing some would it'd be impossible, but I was thinking if tracking a visitor with cookies, it would seem like a viable idea.

Thoughts or suggestions on where to go from here?

Post a comment

comment list (0)

  1. No comments so far