WordPress not displaying information on post sent from custom admin form

Your input needs to be saved somewhere, so it can be retrieved when a user visits the website. To achieve this you could for example use the update_option() and get_option() functions from the WordPress Options API to store the values. To store the value: function changeStyleFunction() { update_option( ‘newsSlide1’, test_input($_POST[“newsSlide1”]) ); } To retrieve the … Read more

Group/list/sort custom post type posts by date in tabs from acf datepicker field

It’s probably best to loop through your posts two times. Once to group them by year and once to print the posts. Something like this: (not tested) $formatted_posts = array(); while ( $subsQuery->have_posts() ) : $subsQuery->the_post(); $year = get_field(‘year’); // add them to formatted_posts array and group by year $formatted_posts[$year][] = $post; endwhile; foreach($formatted_posts as … Read more

How to create a radio button to alt between settings in wp_options table

fist of all set radio two radio button and give a name related like “cf_current_list” and have you set save button if yes then set code in functions.php file like if(isset($_REQUEST[‘buuton_nm’])){ if ( get_option( cf_current_list ) !== false ) { // The option already exists, so we just update it. update_option( cf_current_list, $_REQUEST[‘radio_btn_nm’] ); } … Read more

Popular Post Not Show

Try this without $i = 0; <?php $popular_days_ago = ‘$popular_days days ago’; $recent = new WP_Query(array( ‘posts_per_page’ => $number, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘DESC’, ‘meta_key’ => ‘post_views_count’, ‘date_query’ => array( array( ‘after’ => $popular_days_ago )) )); while($recent->have_posts()) : $recent->the_post(); ?>

Open image gallery on link click

As I understand it, you want to show a div element containing the gallery when Show Gallery is pressed – otherwise to hidden. This can be accomplised with a couple of jQuery lines: $( “.show” ).click(function() { $( “.gallery” ).addClass( “display” ); }); With the appropriate CSS. See jsfiddle Be sure to remember to include … Read more

Highlight Single Page Ancestor

So, I never did figure out how to do this without the plugin I mentioned. What fixed the issue was installing: wordpress.org/plugins/custom-post-type-parents. This plugin has a Settings page which allows you to choose the page that is the parent for your custom post type, then it adds the classes necessary to the wp_list_pages menu.