Clean Custom URL for Serach + Custom Taxonomy

With Slam’s kind tip to use query-monitor plugin, I could figure out what the problem was. Apparently the url /search/foo/filter/bar also fits the “general search” rewrite-rule. Makes sense, thinking about it– (.+) technically matches /foo/filter/bar aswell. So I could improve (.+) by excluding /s? But I found an easier solution! In hope “first match wins” … Read more

Need to convert image url to a Base_64 data url with wordpress function..

In your post you wrote : “which will show an image like below”, I assume that your shortcode return an img tag and you have to find your URL here, tell me if I’m wrong. Using DOMDocument http://php.net/manual/fr/class.domdocument.php to parse your img tag is a good idea. $img = do_shortcode(‘[user_meta_avatar_pic]’); // Here your get your … Read more

How to create custom search result page with custom URL parameters for custom post type?

Add this code in functions.php function custom_rewrite_rule() { //Initializing Rewrite Tags add_rewrite_tag(‘%begin-date%’, ‘([^&]+)’); add_rewrite_tag(‘%end-date%’, ‘([^&]+)’); add_rewrite_tag(‘%offset%’, ‘([^&]+)’); //Find page rewrite rules add_rewrite_rule(‘^find/([^/]*)/([^/]*)/([^/]*)/?’,’index.php?page_id=<SEARCH_PAGE_ID>&begin-date=$matches[1]&end-date=$matches[2]&offset=$matches[3]’,’top’); add_rewrite_rule(‘^find/([^/]*)/([^/]*)/?’,’index.php?page_id=<SEARCH_PAGE_ID>&begin-date=$matches[1]&end-date=$matches[2]’,’top’); flush_rewrite_rules(); } add_action(‘init’, ‘custom_rewrite_rule’, 10, 0); On your custom search page template $begin_date = get_query_var(‘begin-date’); $end_date = get_query_var(‘end-date’); $offset = get_query_var(‘offset’) ? get_query_var(‘offset’) : 1; Create a page having slug find and … Read more

I’m unable to call img path using single quotes in an array?

You’re trying to use PHP tags while inside a string: ‘<img src=”https://wordpress.stackexchange.com/questions/302344/<?php bloginfo(“template_directory’); ?>/images/social/facebook-share.png” />’ You need to instead use concatenation: ‘<img src=”‘ . esc_url( get_bloginfo(‘template_directory’) ) . ‘/images/social/facebook-share.png” />’ Or my personal favorite, sprintf(): sprintf( ‘<img src=”https://wordpress.stackexchange.com/questions/302344/%1$s/images/social/facebook-share.png” />’, esc_url( get_bloginfo(‘template_directory’) ) );

What php gets called for home_url/somepage URL?

Here’s an answer I posted elsewhere here: WordPress is not HTML. It’s PHP-based templates that build the HTML pages. You need more than just a quick answer. You need to learn about the entire process WordPress uses to build pages. Perhaps one place is to start here to figure out how WP works: https://codex.wordpress.org/New_To_WordPress_-_Where_to_Start . … Read more

How to add urls in html widget in a gravity form? [closed]

I think the issues is with the Quotes your using in your html…. if what you have pasted is what you are actually using href=”http://strippersjob.eu/es/aviso-legal/” These href=”http://strippersjob.eu/es/aviso-legal/” quotes seem to be Typographic quotes and not acceptable html quotes. The Typographic quotes are not really opening or clossing the href attribute so you are getting weird … Read more