Trouble using wordpress functions in a pop-up modal form
You’re probably missing some arguments. <?php wp_dropdown_categories(‘show_count=1&hierarchical=1’); ?> For more arguments, look here Codex
You’re probably missing some arguments. <?php wp_dropdown_categories(‘show_count=1&hierarchical=1’); ?> For more arguments, look here Codex
I don’t see anything that would cause the_content() to display in your code. Chances are, the template file you are editing is NOT the one being used on the page/archive you are checking. Add this to the top of your template files… <!– Template: <?php echo __file__; ?> –> Now, in your web browser view … Read more
I had to take information from both of your posts to be able to come with something. Try replacing <img src=”https://wordpress.stackexchange.com/questions/89211/<?php header_image(); ?>” width=”<?php echo $header_image_width; ?>” height=”<?php echo $header_image_height; ?>” alt=”” /> width <?php if (!(isset($_POST[“styles”]))) { //if post not set (first visit) if ($_COOKIE[“chosenStyle”] == “night”) { echo ‘<img src=”‘.get_template_directory_uri() . ‘/images/headers/SomethingOriginalTheMoonAndStars.png” width=”1000″ … Read more
You might try to replace the foreach( $myCarousel as $carousel ) with: foreach($myCarousel as $carousel){ $myimg = get(‘projectdetails_image’,1,$carousel); if ( !$myimg ) { // use this if you want to show a default image when no image is available in the post $myimg = get_template_directory_uri().’/images/default_banner.jpg’; } if ( $myimg ) { echo “<div class=”item”.( $counter … Read more
The value of index ‘link’ of the array $plane_details is a string, and thus $value[0] gives you the first letter only. Just replace $value[0] by $value and all should be fine. Why are you referencing the value this way, anyway?
EDIT After a brief chat with Original Poster, the following solution works: Install the Magpie RSS library. Create a folder in the root directory of raminusa.com, name it magpierss Upload 4 files (*rss_fetch.inc*, *rss_parser.inc*, *rss_cache.inc*, and *rss_utils.inc*), and the directory extlib to this new folder In the footer script of raminusa.com (which should be in … Read more
You probably want to amend this line: $wp_query->query(‘post_type=product&paged=’.$paged); To include some more limitations, like &department=Featured. I’m unaware of your whole project’s code structure, so I can’t advise exactly what you’d need to put.
In simple terms, window.location.href is javascript, and will run in the browser, but PHP runs on the server. In order to execute update_usermeta() you need to open a page with that block of code on it. The best way to do this from a click is to use AJAX (javascript) to visit the URL on … Read more
Alright, I’ve got a plugin here which sorts it out. amr users wordpress plugin
Here is all you need to make this work, plus your actual form of course: function dopasswordstuff(){ if(isset($_POST[‘homepagepassword’])){ global $wpdb; $post_password = trim($_POST[‘passwordfield’]); $post_id = $wpdb->get_var( $wpdb->prepare(“SELECT ID FROM $wpdb->posts WHERE post_password = %s”, $post_password) ); if (!empty($post_id)) { wp_redirect(get_permalink($post_id)); } exit; } } add_action(‘template_redirect’,’dopasswordstuff’); I simplified your function considerably by leveraging the fact that … Read more