elsnertechnologies
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Second loop showing posts from main queryIf you want to show the featured posts of your theme, with a custom field mytheme_featured_post
the below query you can try.<?php $featured_query = new WP_query( array( 'meta_key' =>'mytheme_featured_post', 'meta_value' =>'1', 'posts_per_page' => 5 ) ); while ($featured_query->have_posts()) : $featured_query->the_post(); the_title(); //Stuff... endwhile; wp_reset_postdata(); ?>
- This reply was modified 7 years, 8 months ago by Steven Stern (sterndata). Reason: put code in backticks
Forum: Developing with WordPress
In reply to: Show $post_id via javascript functionou have to replace ” echo ” to ” print “.
function getJSPostID() { try { var test='<?php print $post_id; ?>’; return test; } catch (e) { return ‘unavailable’; } } var ID = getJSPostID(); <— Returns a string “<?php print $post_id; ?>”
- This reply was modified 7 years, 8 months ago by Steven Stern (sterndata). Reason: put code in backticks
Forum: Fixing WordPress
In reply to: Fixing Column SpacingPlease follow below HTML structure for 2 images in one row. for the third image you have to wrap row class.
<div class="row"> <div class="col-md-6"> <a href="">Link text</a> <a href=""><img src="your image" /></a> </div> <div class="col-md-6"> <a href="">Link text</a> <a href=""><img src="your image" /></a> </div> </div> <div class="row"> <div class="col-md-6"> <a href="">Link text</a> <a href=""><img src="your image" /></a> </div> <div class="col-md-6"> <a href="">Link text</a> <a href=""><img src="your image" /></a> </div> </div>
And for the massive space remove wordpress autowrap function. write this code in your function.php file
remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' );
- This reply was modified 7 years, 8 months ago by Steven Stern (sterndata). Reason: put code in backticks
Forum: Networking WordPress
In reply to: Subsite dashboards not displayingReplace .htaccess file with new WP lines given in Network Setup from wordpress admin.
Forum: Fixing WordPress
In reply to: Footer Widget/Text colour changeplease put this code in style.css in your chlid theme
#footer .foot-content .widget .content-text , #footer .foot-content .widget .title , #footer .foot-content .widget ul li a {
color:#ffffff;
}Forum: Fixing WordPress
In reply to: Taxonomy Permanent linkWith the default settings, if you have a category on your website called WordPress, the URL of the WordPress category archives would be https://www.yourwebsite.com/category/wordpress/. Likewise, if you have a tag called Themes, the tag archive URL for that tag would be https://www.yourwebsite.com/tag/themes/.
You can change the settings from admin dashboard
” settings=>permalinks ”
add post name category base tab and in tag tab just add ” tag “.Forum: Fixing WordPress
In reply to: Remove WP version from Wp-admin pagesYou can try this code put it in your
function.php
filefunction change_footer_version() {return ' ';} add_filter( 'update_footer', 'change_footer_version', 9999);
Forum: Fixing WordPress
In reply to: Post New Article to Facebook AutomaticallyYou can auto-post your article to Facebook, Twitter, Google+, LinkedIn, Instagram, XING, Reddit, Pinterest, Flickr, Medium, Tumblr, Torial, Diigo and Delicious By using this plugin.
Forum: Fixing WordPress
In reply to: How to edit part of page with missing .pngIf image is under the top background than you can check it on customize your theme if any option given for that. Dashboard->Appearance->customize.
Forum: Fixing WordPress
In reply to: fail to customize my home page.When ever you are creating new template page don’t use WordPress default filename.
so please rename page.php to any other name, not form default file name.