Relative Content

Tag Archive for javascriptphpwordpressbutton

How to create a preview button to redirect to the page

I have created a preview button, I use JS to create this button. But I have issue when I click on the button, it says that :
admin.php?page=wooster-partner:1331
GET http://wordpressoceane.local/wp-admin/get_preview_link.php?post_id=11130 404 (Not Found)
admin.php?page=wooster-partner:1331
GET http://wordpressoceane.local/wp-admin/get_preview_link.php?post_id=11131 404 (Not Found)

WordPress : How to create a preview button to redirect to the page

I have created a preview button, I use JS to create this button. But I have issue when I click on the button, it says that :
admin.php?page=wooster-partner:1331
GET http://wordpressoceane.local/wp-admin/get_preview_link.php?post_id=11130 404 (Not Found)
admin.php?page=wooster-partner:1331
GET http://wordpressoceane.local/wp-admin/get_preview_link.php?post_id=11131 404 (Not Found)

How to retrive get-options to change CSS style in JS

I am trying to add a button to switch between two different css files. I have another php file where I can choose the option setting with a form. That is why I just wanted to get the option and update it. The problem is when I submit these form now.
When I click on wordpress setting it is good, I have the 2 css files in the network and works. But when I submit Wooster style, it generated compagnon-wooster.css: so it is good but then I click on the switch button, it calls wp.css , ok but the style displayed is not good, it is a mixed of both css because the title is still purple (compagnon-wooster.css ) and the button blue ( wp.css ) but in the network , it is well written wp style.