After saving a new pod item, I want to redirect the user to the detail page of the newly created record. How can I achieve this? I tried using post_save hooks but it didn’t work. I used the following code: The pod item is created by a shortcode like this: Answer Try this: [pods name=”egitim” form=”1″ fields=”name, salon” label=”Kaydet” thank_you=”/egitim/X_ID_X/”]
Tag: wordpress
Get custom product attributes in Woocommerce
In Woocommerce, I am trying to get product custom attribute values but I fail miserably and I don’t get anything. So I tried: And I’m getting this raw data: I know that there is a value because it is shown in the attribute section, but I just can’t find a way to get it displayed with my custom code. Answer
WordPress localhost ftp
I have wordpress running on my localhost on mac Lion. Everytime I try to install or delete plugins it asks me for hostname, ftp username and ftp password. I configured my localhost to 127.0.0.1, but …
WordPress – post thumbnail in loop
So I’d like to add a thumbnail to my posts but I just can’t get it to work. And in my functions.php I’ve added – add_theme_support(‘post-thumbnails’); It gives me the option to post the thumbnail when I make a post, but it doesn’t show up. Answer What theme or parent theme are you using? I usually do something like this
WooCommerce return product object by id
I am creating a custom theme for woocommerce and I need to be able to create a mini product display. I am having problems finding documentation on the woocommerce api. I have a comma delimited list of product IDs that I need to iterate through and display a custom mini product display for each in sequence. Any help would be
Show user’s total comment count outside The Loop in WordPress
How do I display a user’s total comment count outside The Loop? I use this code to display comment count inside the loop: That works fine inside the loop. In an attempt to make that code work outside the loop, I changed $user_id = $post->post_author; to $user_id = get_the_author_meta( ‘ID’ ); but it did not work. The closest that I
wordpress wp_insert_user function
I am in the process of creating a custom registration form for WordPress. My problem is adding custom user meta. I believe the function wp_insert_user will only allow you to add the default fields within the WordPress user table. Here is my current test code: I have found the add_user_meta function, but this requires an ID to add the metadata.
How to use session_start in WordPress?
I’m creating a bilingual site and have decided to use session_start to determine the language of the page using the following: session_start(); if(!isset($_SESSION[‘language’])){ $_SESSION[‘…
Order details not displaying (WooCommerce)
I’m having a strange issue with a site I’m designing. I’m using the WooCommerce system up and running and am using the Wootique theme. I’ve edited a bit but nothing too major, mostly just colours. What’s happening is, when I go to buy something and checkout, I am able to enter my details but nothing appears under the YOUR ORDER
WordPress prepared statement with IN() condition
I have three values in a string like this: When I feed it into a prepared statement like this: echo $query; shows: It is not writing the string as three separate values — it is just one string with the double quotes escaped. How can I properly implement a prepared statement in WordPress with multiple values? Answer Try this code: