swayam.tejwani
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to remove the word "category" in wordpress categoryYou can do this by creating child theme and then copy category.php file of parent theme into child theme, then open this in editor and on line 10 there is code
<h1 class="page-title"><?php printf( __( 'Category: %s', 'newswire' ), '<span class="colortxt">' . single_cat_title( '', false ) . '</span>' ); ?></h1>
you need to remove this and place this
<h1 class="page-title"><?php echo single_cat_title( '', false ); ?></h1>
Forum: Fixing WordPress
In reply to: Major error i dont know how to fixtermmeta doesn’t seems to be default wp table, at what stage you are getting this error ? what you are trying to achieve ?
Forum: Fixing WordPress
In reply to: media uploadyou can try by deactivating all plugins and switch to default wp theme, and if the problem resolves then try to debug by activating plugins 1 by 1 to check which plugin is causing issue, if its not plugin may be theme.
Forum: Fixing WordPress
In reply to: Create a custom post type, but I use separate Desktop & Mobile themeHi miketopher,
you can put the code of custom post type in a plugin file, by doing this that CPT will be accessible through all themes and you dont have to worry about mobile theme or desktop theme ??
Regards,
SwayamForum: Networking WordPress
In reply to: Multisite count postsHi tcempk,
Check these below functions i have created for getting all posts from subsites and getting post count from category in all subsites.
function get_total_posts_in_subsites(){ $allblogs = wp_get_sites(); if(count($allblogs) > 0){ $postscount = 0; foreach($allblogs as $blog){ $blogid = $blog['blog_id']; switch_to_blog( $blogid ); if( !is_main_site( $blogid ) ){ $thisblog_posts = wp_count_posts(); $postscount = $postscount + $thisblog_posts->publish; } restore_current_blog(); } return $postscount; //echo "Number of published posts on all subsites ".$postscount; } } function count_subsite_posts_from_category( $catname ){ $allblogs = wp_get_sites(); if(count($allblogs) > 0){ $postincat = 0; foreach($allblogs as $blog){ $blogid = $blog['blog_id']; switch_to_blog( $blogid ); if( ! is_main_site( $blogid ) ){ $args = array( 'post_type' => 'post', 'post_status' => 'publish', 'category_name' => $catname ); $query = new WP_Query($args); if($query->have_posts()):while($query->have_posts()):$query->the_post(); $postincat++; endwhile;endif; } restore_current_blog(); } return $postincat; } }
you can put these functions in your functions.php file of theme and in any template file you can use these functions by simply calling like
echo get_total_posts_in_subsites();
this will return count of no. of posts in all subsites except main site and the other one
echo count_subsite_posts_from_category('cat A');
IN this function count_subsite_posts_from_category, you need to pass category name as parameter just like i did ‘cat A’ and this will return “cat A” posts in all subsites, let me know if this helps.
Regards,
SwayamForum: Fixing WordPress
In reply to: ajaxurl not found after WordPress 4.4 upgradeIt doesnt seems problem with wp version, you can try disabling all plugins and check by activating one by one if it resolves this issue.
Forum: Fixing WordPress
In reply to: edit content with inspect elementsyes, you need to re-upload file on server after making changes.
Forum: Fixing WordPress
In reply to: edit content with inspect elementsHi, for styling related changes you need to write CSS in style.css of your theme and for changing html elements, need to check appropriate template file being called, as inspect element is just for hit and trial purpose, it wont save anything, when you reload page, everything will be gone.
Forum: Plugins
In reply to: [Category Color] Category Color for custom taxonomy?Hi gb4,
let me know custom taxonomy name & custom post type name and i will help you in that.
Thanks,
SwayamForum: Themes and Templates
In reply to: [Aaron] Removing Share buttons from search resultsHi christianboyce,
Plz share your website url ? it seems to me that wants to remove right sidebar on search results page ?
Thanks,
SwayamForum: Fixing WordPress
In reply to: Set Post Taxonomy terms before publishingHey Fran?ois,
Yes, you are right, the best way is to create hidden field with terms name or id in that and post the form, you will get terms in form post php variable, answer is in youy question itself ??
Regards,
SwayamForum: Themes and Templates
In reply to: How to add custom logo on my site headerput your child theme header.php code here, you are having customized theme and not original one here https://aonearticle.com/
Forum: Themes and Templates
In reply to: [Melos] Getting the three columns to line upHi,
Are you talking about the header image, this one https://yourmobilemechanic.com.au/wp-content/uploads/2015/12/JM-blog-header-title.jpg ? or the images in boxes below the header ?
Regards,
SwayamIn your parent theme, there is one folder called “template-parts” and there is a file “recent-post.php”, copy that file and then in your child theme folder, create folder “template-parts” and put file there, then open that file in text editor and comment or remove line 14 & 15 it will be done ??
Forum: Themes and Templates
In reply to: How to add custom logo on my site headerwhich theme you are using ?