Undefined variable: row?

First, it’s not $wpdb->wp_posts, it’s just $wpdb->posts. Second, you’re using prepare() incorrectly. You use prepare when you have some variable data that you need to safely insert into the query string, not otherwise. Using prepare on a known string does nothing and throws a warning. For example: $data=”example string” $query = $wpdb->prepare(“SELECT post_title FROM {$wpdb->posts} … Read more

How to correctly load a different version of main menu based on the user language in WordPress? Is it a good solution?

I had the same problem. I used Polylang plugin and 3 languages. So i created 3 menus like this: https://www.diigo.com/item/image/4o9rz/opx5. after that i checked the language and displayed the correct menu,like this: <?php if (get_locale() == ‘en_US’) { wp_nav_menu(array( ‘menu’ => ‘Primary Menu En’, ‘depth’ => 2, ‘container’ => false, ‘menu_class’ => ‘nav navbar-nav’, ‘walker’ … Read more

Simple seo-friendly custom $_GET url rewrite with htaccess

First, add a WordPress page named game to direct requests to. Next, add the game query var so WordPress knows what it is: add_filter( ‘query_vars’, ‘wpa_query_vars’ ); function wpa_query_vars( $query_vars ){ $query_vars[] = ‘game’; return $query_vars; } Then, add a rewrite rule to handle the incoming requests and direct them to your page: add_action( ‘init’, … Read more

Where can I find linked fonts in my theme?

Your Theme about used Google webfonts i think. Better try find this link from your .css and theme php files “http://fonts.googleapis.com/css?”. if you got anything, just similar to it, just visit google.com/fonts , for better font selections. may be your font is not linked properly.

php loading different structure than source code

You’re using template tags within an echo statement that themselves echo a value. You need to use the versions that return their value. the_permalink() should be get_permalink, the_post_thumbnail should be get_the_post_thumbnail, the_title should be the_title( ”, ”, false ), the_content should be get_the_content().

Correct code to use php in text widget

I think this is enough, inside the widget-function of your Widget-class. ob_start(); eval( ‘?>’ . $html ); $html = ob_get_contents(); ob_end_clean(); Alternative use a maintenant plugin for this job, like PHP Code Widget