Add Custom Taxonomy into Script

I think you should use json_encode in the page that you would like to run. Here is some ideas how you to solves. add_action(‘admin_init’, ‘my_taxonomy_list’); function my_taxonomy_list() { if (specific_page) { //check not to run in other pages $taxonomies = get_taxonomies(); foreach ( $taxonomies as $taxonomy ) { $tax_list[] = $taxonomy->slug; } ?> <script> var … Read more

Shortcode just with a php code

It sound like you can accomplish this with 2 PHP functions. 1) Save the searched taxonomy to the user’s session. When they re-run the search function, update the taxonomy that was searched. This way if its saved to their session, you can use it elsewhere on the site just for that user. 2) Create a … Read more

Trying to add get_the_title hook to this line

Joe, have you tried ….placeholder=”I am interested in: ‘.get_the_title().’ “…. also you don’t need all those php’s. The code can be cleaner, easier to read. One can do either: <?php echo ‘<form action=”‘ . esc_url( $_SERVER[‘REQUEST_URI’] ) . ‘” method=”post”>’; echo ‘<h5>’; echo ‘Ask a question <br/>’; ?> etc or <form action=”<?php echo esc_url( $_SERVER[‘REQUEST_URI’] … Read more

Allow Submit Contact Form Default Text In Text Box

This is what I changed to and worked perfectly. echo ‘<textarea style=”margin-left: 15px; width: 246px;” rows=”3″ cols=”28″ name=”cf-message”>’ . ( isset( $_POST[“cf-message”] ) ? esc_attr( $_POST[“cf-message”] ) : ‘I am interested in: ‘.get_the_title() ) . ‘</textarea>’;