main menu page redirects to user ID

One solution would be to create a page with a page template that gets all info based on the user ID. Then you can add that page to the menu. Something like this: <?php /* * Template Name: User Info */ get_header(); //Your code for getting the users id $user_id = ‘123’; //Output userinfo using … Read more

How to run ajax in WordPress Post?

I believe one of the comments should fix your issue given how you mentioned that the code works outside of WordPress, which does in fact appear to be a problem with your references to $ instead of jQuery. Also, i have written a post on this exact topic with step by step instruction, you can … Read more

Result from wp_send_json adds line feed

Well that was tricky. This was the offending code that was generated a line feed to the response. add_action(‘wp_ajax_nopriv_display_event_info’, ‘DisplayEventInfoBox’); ?> <?php function displayStepHeader($isValid, $pos) I changed it to add_action(‘wp_ajax_nopriv_display_event_info’, ‘DisplayEventInfoBox’); function displayStepHeader($isValid, $pos) and all is well. I have no idea why that was an issue but how I tracked it down may be … Read more

Would it be possible to route WordPress Through an MVC Application

Well, it looks like my latest idea proved correct. Simply including the index file for wordpress was enough to get permalinks working for blog posts. $app->slim->notFound(function() use($app) { //to make pretty url’s work with turdpress, we must see if that request was intended for our blog route. if(strpos($app->slim->request->getPath(),’/blog/’) !== false){ include __DIR__ . ‘/../../blog/index.php’; }else{ … Read more

Adding theme strings to .PO file

Nevermind, I figured out the solution: the trouble was that POEdit hadn’t picked that there were both singular and plural forms, so I had to manually edit the .PE file to this: msgid “Job Posted” msgid_plural “Jobs Posted” msgstr[0] “” msgstr[1] “”

WordPress Rewrite Issue

The rewrite rules are wrong. For example, you want to rewrite from community/tag/easter to ‘index.php?pagename=community&stencil-tag=easter’, so the regex should contain community/tag/ and not only tag/. Also, \d match only digits but the tag value is a string. Same apply to the rewrite for stencil-tag. You could use . to match any character, both numeric and … Read more