Dropdown Value from DB Entry

You’re not actually outputting the selected attribute into the <option> tag. Look at your printf() format: ‘<option value=”%u”>%s</option>’ %u is there for the month’s number value, and %s is there for month’s name, but you’re not including the last argument from the result of selected(). Your printf() needs to look like this: printf( ‘<option value=”%u” … Read more

Issue when site move from ssl domain to new domain without ssl

Disable the SSL plugin. Then check the htaccess file, removing any rewrites for SSL. You may also need to use a search/replace plugin (I like “Better Search and Replace”) to change all instances of https://www.yourdomain.com to http://www.yourdomain.com . Be aware that there will be implications of not having SSL; most current browsers will show a … Read more

Facebook video on a post appears in a strange language [closed]

It’s a localization problem, Facebook is loading a who-know-where javascript sdk to embed the video. Switch to code view inside your wordpress editor and search for the js include url, similar to https://connect.facebook.net/en_US/sdk.js#xfbml=1&amp;version=v2.5 this, and change whatever string appears instead of en_US with en_US. Where the string is located depends on how you are doing … Read more

WordPress “add to menu” button not working

Try looking at the following areas to try and debug; First and foremost, flush the cache for the url, either by hard reload cmd/ctrl + refresh > Hard reload. Or via any caching plugin you may be using. Use the inspector to look at the console, when changing items in the backend and loading the … Read more

TTFB is too slow in back-end [closed]

A simple solution (although not followed by good practices) would be to use a CACHE plugin. This will use an image of your HTML and you will not have to execute your process every time. If you want to improve the performance of the PHP file, you should find the root of the problem, that … Read more

Admin Post List table Query filtering “WHERE” for custom post type

Awesome. This works! Thanks @Milo /*Change results based on the current user’s role and status */ function posts_for_current_role($query) { global $pagenow; if( ‘edit.php’ != $pagenow || !$query->is_admin ) return $query; if( current_user_can(‘editor’)): //Add query where clause to status equals “working”. $query->set( ‘post_status’, array( ‘working’, ‘draft’ ) ); endif; if( current_user_can(‘administrator’)): $query->set( ‘post_status’, array( ‘published’) ); … Read more

Mixed language in admin backend

Ok I resolved the problem. It turns out I have mistakenly copied the .po files (fr_FR) of my theme into the /language folder and not /language/themes, so WordPress was picking the .po of my theme and not the one from wordpress. I moved the po file to the themes folder and hit refresh on my … Read more

Post page still linked to old site

I think this can be the cause from some permalink settings. In the Settings-> Permalinks, you can click the “Save” button, and the permalinks will refresh. I’m not sure that will work, but that’s where I will first look.

How to align buttons properly [closed]

first things first lets improve your code: function action_after_question_content() { if (!is_single()) { echo “<a class=”button-default” href=””.esc_url( get_the_permalink() ).”#comments”>See Answers</a>”; echo “<a class=”meta-answer” href=””.esc_url( get_the_permalink() ).”#respond”>Give Answer</a>”; } } Note: We can improve further by getting the numbers of comments, and based on that build the buttons: Ex: If we have a plural numbers of … Read more