$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'); ?>php - wordpress frontend editor to add extra css to website|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)

php - wordpress frontend editor to add extra css to website

matteradmin8PV0评论

i need to create a plugin that allows me to select any button or any part of the website and add extra css to it ,i have manages to consumer rest api within wp ,add menus and submit forms but i have no idea how to accomplish this task ,i would appreciate any suggestion thanks

i need to create a plugin that allows me to select any button or any part of the website and add extra css to it ,i have manages to consumer rest api within wp ,add menus and submit forms but i have no idea how to accomplish this task ,i would appreciate any suggestion thanks

Share Improve this question asked Jan 27, 2019 at 15:43 Jawhar JarrarJawhar Jarrar 11 bronze badge 4
  • Why can't you just add CSS using the Additional CSS section of the customiser? – Jacob Peattie Commented Jan 28, 2019 at 2:51
  • i don't want to add css classes,insted i need to add exta css to specific html button/ a tags and so on – Jawhar Jarrar Commented Jan 28, 2019 at 12:41
  • Why can’t you do that with regular CSS? – Jacob Peattie Commented Jan 28, 2019 at 13:14
  • sorry my bad i didn't explain the issue well , i don't need to add classes to css files but i need to add specfic css classes to tags regardless of their exsitance in a css file , so the task is to change the the html generated by wp and to trigger that i need to click on an item (button,rating....) and a css class to it – Jawhar Jarrar Commented Jan 28, 2019 at 13:24
Add a comment  | 

1 Answer 1

Reset to default 1

I think it's worth studying how other plugins work, for example: Visual Composer.

The logic that came into my head, is to pick the element selector clicked with jQuery, and work on it. Read this that may help you: https://stackoverflow/questions/5706837/get-unique-selector-of-element-in-jquery

Following this logic, if each page element has the same class, it will be easier to work with

Post a comment

comment list (0)

  1. No comments so far