I have 10 or more input hidden in 10 or more pages with different values in Wordpress text editor and I want to get the value using $_POST in a custom page template. How to do this? I tried to called the input hidden name in my custom page template but the value is not getting. Text editor <form method="POST"> <input type="hidden" name="segment" value="test"/> </form> Custom page template $segment = isset($_POST['segment']) ? $_POST['segment'] : '';
I know I am missing something simple. I am trying to use html to log to footer to learn wp. In theme functions.php: function myLog() { echo 'test'; } In theme footer within the .siteInfo div: <?php add_action( 'wpmu_new_blog', 'myLog' );?> when a new user creates a new site myLog should output html 'test'? Please help, save me many more hours of reading and trials.
I am wondering if there is a way to add div to specific elements in the WordPress page content? For example, I would want to wrap a div around content starting at a H2 element and ending after an img element. The div should have custom classes assigned to them. Is there anyway to do this? I don't want to have to hard-code the div so that other people can easily edit the page content. Thanks!
I have added alt tags, title and description on all the images on my website but none are showing when I check them in the inspect element tool in chrome or firefox. Here's a screenshot: And here's the screenshot of inspect element of the same image:
I'm recently added this code to my Wordpress website to add .html for my product category. It worked okay with the category (http://mywebsite.com/parent-category/product-category.html) but when I clicked the pagination, the link turned into (http://mywebsite.com/parent-category/product-category.html/page/2) This is a code that i added to function.php on my site function wpse_178112_category_permastruct_html( $taxonomy, $object_type, $args ) { if ( $taxonomy === 'product_cat' ) add_permastruct( $taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%.html", $args['rewrite'] ); } add_action( 'registered_taxonomy', 'wpse_178112_category_permastruct_html', 10, 3 ); Please help, I'm just a Wordpress newbie . Thank …
I'm using an imported css instead of one from WP. I also didn't upload the site myself. I want to change the look of the colours of the nav compartment to different colours. I can't do this with css, but with HTML, since I went to change each button to a different colour from the other. Please, how can I do this in the WP environment? Thanks immensely.
Alright so the website is completely perfect when I am logged into the WP-ADMIN page but if I log out of there, the website is completely messed up. All the formatting is broken and everything looks weird. You can see it for yourself here: https://www.CounterBoosting.com This is how it looks when logged in: https://s18.postimg.io/k4pviuh0n/after.png One thing to note is that /wp-admin suddenly leads to Page not found 404 and that I can only login using /wp-login.php Does anyone know what …
[box id='1' text="some texte"] the shortcode, at one point is outputting text the html result is : </p> some text </p> There is an extra closing paragraph in the start and and opening at the end... WHY ? where those come from ?.... any idea ?.. it screw my w3 validation ! ** note i have found that... but look all "patched" to me...any clean solution... wp is dirty ? reference
I have the required code for what I want <?php if ( is_singular() ) { <?php if (get_post_meta(get_the_ID(), 'square_image', true)) { ?> <img src="<?php echo get_post_meta($post->ID, 'square_image', true); ?>"/> <?php } else { ?> <?php the_post_thumbnail( 'thumbnail' );?> <?php } ?> } else { } ?> but I simply don't know how to make the PHP work along with HTML, and inside another PHP code. Please help me make this code work thank you
So I have this popup modal: HTML: <h2>Modal Example</h2> <!-- Trigger/Open The Modal --> <button id="myBtn">Open Modal</button> <!-- The Modal --> <div id="myModal" class="modal"> <!-- Modal content --> <div class="modal-content"> <span class="close">&times;</span> <p>Some text in the Modal..</p> </div> </div> Script: <script> // Get the modal var modal = document.getElementById("myModal"); // Get the button that opens the modal var btn = document.getElementById("myBtn"); // Get the <span> element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks the …
I'm having a problem in fixing the footer always to the bottom of the page, also when there is not enough content in the page to fill it. I found a lot of similar questions online and all of them suggested as solution to add code similar to the following: footer { position: fixed; bottom: 0; left: 0; right: 0; } Here you can see the initial situation (footer in the middle of the page for empty content page): And …
I am wondering how do you do when you have to create a shortcode with multiple hover or complex options ( gradient, boxshadow etc, thing that can't be inline ). How do you generate the css. I don't want to generate a <style></style> block because for a simple shortcode used 10 times in the page would generate 10 blocks. All the shortcode are set from the page, by the user, so are created when the_content() is called. I want to …
As a developer, I'd really like to have the ability to see every tag written out on the editor in source mode. Is there a way? Some filter, action, or so?
I need to set a time delay redirect for a specific page. Reason is because we have a URL redirect on the specific page and it is not registering for a Google Analytic page visit conversion. So we need to have a short time delay on the page before the redirect starts. I found the below code to use, but I prefer not to add the code to the specific page, but instead in the functions.php if this is the …
I was investigating the cause of hyperlinks breaking on a friend's website. She copies over her content from email and pastes it in the Wordpress editor. In a few articles, the content between the a tags has wbr in it and that seems to break the hyperlinks. You can find it on http://chandni.org/information-about-awards-scholarships-and-more/ In case it's fixed by the time you see the thread, the copied content <a href="http://www.msrlm.org/mrlif/faqenglish.html" target="_blank">http://www.msrlm.org/mrlif/<wbr />faqenglish.html</a> what is shown by wordpress <a href="http://www.msrlm.org/mrlif/faqenglish.html" target="_blank" rel="external …
There is an icon to open the search form on my site, and when it is clicked, the search form opens in full screen. I want the search form to be selected automatically, how can I do that? Here: https://wisekitten.com/ I'm not using jQuery in my project.
I'm trying to populate the Child Page dropdown with that of the selected Parent Page - If a specific Parent page is chosen it should fill the second dropdown with all Child pages listed under that parent. Once the submit button is clicked, it would then direct users to the selected child page. In the first dropdown, I've pulled the necessary Parent pages based on their page ids. I'm stuck from here. What do I do to achieve getting the …
How would I create a cascading dropdown select search where the first dropdown would host selected Parent Pages and the second to display the Child Pages of the selected Parent. When submit button is clicked it would just redirect to the selected child page. Could anyone please help me on how to get this done, I've done the research and haven't gotten anywhere apart from only displaying all specific Parent pages that's needed in 1 dropdown using the code below: …