how to make URL link query string

This is how I got it working: ADDED this to functions.php: function include_template_function( $template_path ) { global $wp; if ($wp->request == ‘state’) { $template_path = locate_template( array ( ‘state.php’ ) ); } return $template_path; } $state_name = $_GET[‘st’]; //this is added to use as a global variable ADDED THIS to header.php because WP thinks it’s … Read more

pass query string on url to filter media

As per the given url http….url…/author/name?MediaTag=tag1, below code may helpful… if(isset($_GET[‘MediaTag’])) //It will check the value of MediaTag (from address bar after ?) { $tag1 = $_GET[‘MediaTag’]; //Assigning value of MediaTag to the variable if($tag1) //Checking if variable have some value or not { query_posts(‘cat=1&author=” . $post->post_author . “&order=DESC&tag=’ . $tag1 .’&posts_per_page=12′ . ‘&paged=’ . … Read more

How to get “string” away – replaced with “nothing” [closed]

The woocommerce_template_single_title() function calls to a template that uses this code: the_title( ‘<h1 class=”product_title entry-title”>’, ‘</h1>’ ); So it is just the product title, there is nothing that could go wrong here. Check if you did not mess up output buffer, try using the_title function from above instead of ob and see if that makes … Read more

Keep query string in url after executing a serch

It’s hard to say how to do it exactly in your case, because we don’t know how your form is generated… But in general you have to add a hidden input to that form. So if you use searchform.php in your theme, then add something like this to it: <input type=”hidden” name=”name” value=”<?php echo esc_attr( … Read more

Replace text string on individual page

I can’t comment so I’ll answer and slightly adjust Bhagyashree’s which is exactly what you’ll need to do based on your question. Except you may want to know how to include the 2 pages rather than duplicating the function. And also passing in an array of strings to replace. function replace_some_text( $content ) { // … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)