swayam.tejwani
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: jQuery, Ajax and PHP RequestCheck the action parameter which i have passed in ajax call, that should be there in houra too, as you have called action hook “wp_ajax_addUser”, so in this case addUser is your action parameter in ajax call, check in my code both of them are same.
Forum: Fixing WordPress
In reply to: jQuery, Ajax and PHP Requestthe script must be enqueued through wp_enqueue_script function and if you have already enqueued that then dont need to include in head section again.
Forum: Fixing WordPress
In reply to: A porn site seems to have inserted a link in to my wordpressHave you tried by relicating this issue by deactivating all plugins and switch to default wp theme, Check if its removed then its probably thorugh any plugin or your theme itself, funny situation..lolz ??
Forum: Fixing WordPress
In reply to: jQuery, Ajax and PHP RequestCheck my below implementation of working ajax example and compare with yours.
HTML part<a href="#" id="testajax_click">Shoot Ajax</a>
Jquery part
<script type="text/javascript"> jQuery(document).ready(function(){ jQuery('a#testajax_click').click(function(){ jQuery.ajax({ url:"<?php echo admin_url('admin-ajax.php') ?>", type:'POST', data:{ action:'custom_action', testvar:"test value" }, success:function(response){ alert(response); } }); }); }); </script>
PHP code
function custom_action_callbk(){ if(isset($_POST)){ echo $_POST['testvar']; } die; } add_action('wp_ajax_custom_action','custom_action_callbk'); add_action('wp_ajax_nopriv_custom_action','custom_action_callbk');
PHP code should go to functions.php
Forum: Fixing WordPress
In reply to: Crete a custom button in the admin post pageyou can create custom meta boxes and then put button html in that box.
Forum: Fixing WordPress
In reply to: jQuery, Ajax and PHP RequestHave you tried this ajax in wp
, the code which you shown is not the right way in wp, like the url must be wp-admin/admin-ajax.php and there should be variable named “action” , check it once, i think you will figure out ??Forum: Fixing WordPress
In reply to: Getting blank pageHave you tried replicating this issue by deactivating all plugins with default wp theme ? Do you have any caching plugin installed ?
Forum: Themes and Templates
In reply to: [Yuuta] Header – taglineHave you changed the theme here https://www.thenovelhomemaker.com/ ? It seems when i commented you was not using Yuuta theme, it was Olevia theme ?
Forum: Themes and Templates
In reply to: [Mk] ONLY PHOTO ON HOMEPAGEHello! you can try this css code
body.home #mk-page-wrapper .row{ display: none; }
this code needs to be placed in style.css, you can create child theme or add this plugin to add custom css, let me know if it works for you.
If you go to wordpress admin under appearance->widgets there are 2 sidebars created,
1) Banner :- which is responsible for banner image on home page, so by default if no widget is there, then theme places a default header image, you can override this by putting text widget there and place in content area.2) Call to action :- This sidebar is resopnsible for text below header image, you can place widget like what i said above to override default.
Let me know if it works
Forum: Themes and Templates
In reply to: [Yuuta] Header – taglineHello! you can try this css code
p.c-brand__tagline{ bottom: 15px; display: block; height: 51px; position: relative !important; width: 240px; }
this code needs to be placed in style.css, you can create child theme or add this plugin to add custom css, let me know if it works for you.
Forum: Themes and Templates
In reply to: Show Custom Post Types entries in Category DropDownHi vlvgfx,
It seems like you have given wrong file on pastebin, because as we inspect element from firbug when we click on category in top navigation, the 6 posts which are coming below that have div class=”featured-posts clear show” and in drop down nav file there is nothing like that. Is this a premium theme ? have you asked this from theme author ?
Forum: Themes and Templates
In reply to: Showing Custom Post Type in Featured Slideron line 19, try to replace this code
$hero_posts_args = array( 'posts_per_page' => 4, 'ignore_sticky_posts' => true );
with
$hero_posts_args = array( 'posts_per_page' => 4, 'ignore_sticky_posts' => true, 'post_type' => "case-study" );
and see if it solves your problem.
Forum: Themes and Templates
In reply to: Removing Featured Picture From Single Post Using Custom CSSyour website link plz ?
Forum: Fixing WordPress
In reply to: First post with different style and wrap every two postsi have tried this code creating a template and it seems to be correct as per your demands, lets give it a try
<?php /* * Template Name: Test Template */ get_header(); ?> <div id="primary" class="site-content"> <div id="content" role="main"> <?php $args = array( 'post_type' => 'post', 'posts_per_page' => -1, 'post_status' => 'publish' ); $query = new WP_Query($args); if($query->have_posts()): $i=0; $count = $query->found_posts; while($query->have_posts()):$query->the_post(); if($i == 0){ echo '<h3>'.get_the_title().'</h3>'; if($i != ($count-1)){ echo '<div class="inner-container">'; } $i++; continue; } echo '<h3>'.get_the_title().'</h3>'; if($i%2 == 0){ if($i != ($count-1)){ echo '</div>'; echo '<div class="inner-container">'; } } $i++; endwhile; endif; ?> </div> </div> <?php get_footer(); ?>