Best way to modify theme

If I understand it correctly, making a child theme and putting your custom single.php and archive.php in there should achieve this effect. The child theme files will be called ahead of the parent theme files. Good discussion here: https://wordpress.org/support/topic/how-do-you-handle-custom-template-files-with-child-themes Happy coding!

Display content based on an event

If you have to add our message before/after content then you’re stuck with ‘the_content’ filter. It would be better if you put your message in a shortcode or hook so the theme customizations were more integrated. But essentially after you run your logic to get the status you just need to wait till the message … Read more

Trouble figuring out how to get my button to submit comment

Try this. You were missing the tags and the “type” attribute for the tag. The php tag at the bottom echo’s the result that was input in the textarea. Read this http://www.w3schools.com/html/html_forms.asp it should help you get started. <div class=”font-wrap”> <div class=”wrapper”> <form action=”” method=”post”> <textarea name=”comment” id=”comment” class=”talk-bubblecomment” tabindex=”4″ placeholder=”Enter comment…”></textarea> <p class=”sign-in”> Post … Read more

How can i get tag without />?

Capture all the wp_head content add_action( ‘wp_head’, function(){ ob_start(); }, 0); Replace endings and output results add_action( ‘wp_head’, function(){ $head = ob_get_clean(); echo str_replace(‘/>’, ‘>’, $head); }, 99999);

Where is the POST response body generated in PHP? [closed]

The answer is, anything that is echod after the POST request, is sent back to the requester via the RESPONSE body. Thus any echo statements issued after processing whatever was sent via the $_POST is generated and sent back. In this template’s case, it would be better to re-direct the user immediately to a new … Read more

How to create a loop inside WP_Query?

Just construct what you need outside of the main query. // terms to search $meta_query_keys = array(‘Panera Group 2 Encino’, ‘West Hollywood’); // start the meta query off $meta_query = array(‘relation’ => ‘OR’); // add terms to query foreach($meta_query_keys as $key) { $meta_query[] = array( ‘key’ => ‘user_group_name’, ‘value’ => $key, ‘compare’ => ‘LIKE’, ); … Read more