angelch
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Pagination with numbersHello,
I think this code is working.<section class="container feed"> <div class="row"> <?php $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : '1'; $args = array( 'post_type' => 'post', 'posts_per_page' => '3', 'paged' => $paged ); query_posts( $args ); $posts= get_posts( $args ); if ($posts) { ?> <header> <h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1> </header> <?php foreach ( $posts as $post ) { get_template_part( 'template-parts/content', get_post_format() ); } the_posts_pagination( array( 'mid_size'=>3, 'prev_text' => _( '? Previous'), 'next_text' => _( 'Next ?'), ) ); } else{ echo '<p>No post found..</p>'; } ?> </div> </section>
Forum: Developing with WordPress
In reply to: Get posts with its taxonomiesHello,
The below code is working fine.
<?php $args = array( 'post_type' => 'myposttype', 'tax_query' => array( array( 'taxonomy' => 'custom taxonoy name', 'field' => 'slug', 'terms' => 'custom taxonoy value', 'include_children' => false ) ) ); $posts= get_posts( $args ); if ($posts) { foreach ( $posts as $post ) { setup_postdata($post); /*print_r($countrypost); echo $countrypost->post_title;*/ ?> <div class="post_li"> <h3><?php echo $countrypost->post_title; ?></h3> </div> } } ?>
- This reply was modified 6 years, 4 months ago by Steven Stern (sterndata).
Forum: Developing with WordPress
In reply to: WordPress get_post_meta not work in loopHello,
Try the code.I think its working fine.
<div class="container"> <div class="row"> <?php $myposts = get_posts( array( 'posts_per_page' => -1, 'post_type' => 'post' ) ); if ( $myposts ) { foreach ( $myposts as $post ) : setup_postdata( $post ); ?> <div class="col-lg-4"> <?php $meta_value = get_post_meta( $post->ID, 'meta-select', true ); echo '<p>'.$meta_value.'</p>'; ?> </div> <?php endforeach; wp_reset_postdata(); } ?> </div> </div>
- This reply was modified 6 years, 4 months ago by Steven Stern (sterndata).
Forum: Fixing WordPress
In reply to: How to change the hyper links colors in the posts?hello,
which color code you can hover the link.
- This reply was modified 6 years, 4 months ago by Steven Stern (sterndata).
Forum: Developing with WordPress
In reply to: How to show category and its posts in table outputHello,
Try the below code$categories = get_categories( array( 'orderby' => 'name', 'parent' => 0 ) ); ?> <table> <?php foreach ( $categories as $category ) {//echo '<tr>'.$category->name.'</tr>'; ?> <tr> <td colspan=12><?php echo $category->name;?> </td> </tr> <tr> <?php $myposts = get_posts( array( 'posts_per_page' => -1, 'category' => $category->term_id ) ); if ( $myposts ) { foreach ( $myposts as $post ) : setup_postdata( $post ); ?> <td><?php the_title(); ?></td> <?php endforeach; wp_reset_postdata(); } ?> </tr> <?php } ?> </table> <strong>The output is,</strong> <table> <tbody><tr> <td colspan="12">new cat </td> </tr> <tr> <td>ghjgjgj</td> <td>angel</td> <td>post 2 new</td> <td>post 1</td> </tr> <tr> <td colspan="12">Uncategorized </td> </tr> <tr> <td>test</td> <td>Hello world!</td> </tr> </tbody></table>
- This reply was modified 6 years, 4 months ago by angelch.
- This reply was modified 6 years, 4 months ago by Steven Stern (sterndata).
Forum: Fixing WordPress
In reply to: Pagination Display TextHello,
Try the below code. I think its working.
<?php $args = array( 'post_type' => 'post', 's' => $searchinput, 'posts_per_page' => '3', 'paged' => $paged ); query_posts( $args ); $posts= get_posts( $args ); if ($posts) { foreach ( $posts as $post ) { setup_postdata($post); ?> <div class="chinaseredivs"> <a> <?php if(get_the_post_thumbnail( $post->ID, 'thumbnail' )){ echo get_the_post_thumbnail( $post->ID, 'thumbnail' ); } else{ echo '<img src="https://via.placeholder.com/350x150" />'; } ?> <h3 class="chinasearchrepost"><?php the_title(); ?></h3> <?php $content=get_the_content(); ?> <p class="chinasearchrepost"><?php echo wp_trim_words($content, 40,'...'); ?></p> </a> </div> <?php } the_posts_pagination( array( 'mid_size'=>3, 'prev_text' => _( 'Back'), 'next_text' => _( 'Next'), ) ); } ?>
- This reply was modified 6 years, 4 months ago by angelch.
- This reply was modified 6 years, 4 months ago by Steven Stern (sterndata).
Forum: Fixing WordPress
In reply to: How to change the hyper links colors in the posts?Hi Avimorde,
Try code below,div#content-wrap a { color: #13aff0; }
- This reply was modified 6 years, 4 months ago by Steven Stern (sterndata).
Forum: Fixing WordPress
In reply to: Anyone know a good plugin where i can make a tree chart/graph?Hello,
I thik this is the best plugin for chart,graph
Plugin Nmae: WordPress Charts and Graphs Lite
utl : https://www.ads-software.com/plugins/visualizer/
- This reply was modified 6 years, 4 months ago by angelch.
- This reply was modified 6 years, 4 months ago by Steven Stern (sterndata).
Forum: Fixing WordPress
In reply to: Plesk not open my index pagehi
i alredy done this it ‘s not working
Thanks
Forum: Fixing WordPress
In reply to: iFrame widthhi
You have to fix your parent div with in your specific width.col-md-8 have small space so the iframe occupy only that space understand!
- This reply was modified 6 years, 5 months ago by angelch.
- This reply was modified 6 years, 4 months ago by Steven Stern (sterndata).
Forum: Fixing WordPress
In reply to: Can’t add background image with containerhi
gkcpa
.site { /* background-color: #c2d1f0; */ background-image: url(https://garykrupacpa.com/wordpress/wp-content/uploads/2018/09/the-colors-of-cathedral-rock-by-brian-klimowski-twilight-scene.jpg); background-repeat: no-repeat; background-size: cover; }
is that ok for you
i think some bug in the html
body wont accept any css
[ Signature moderated ]- This reply was modified 6 years, 4 months ago by Steven Stern (sterndata).
Forum: Fixing WordPress
In reply to: whole page centering aligninghi
allgametech
do you know html and css ?
if you know it will help you what cause that problem.
enter the browser press f12you will see the website coding
ctrl+f paste this class name (page-titlebar-inner)
change the padding to margin
check the Elementer you can fin tha options
also add the container in every row the alignment will be goodThanks
Forum: Fixing WordPress
In reply to: Used Better Search Replace Pluginhi
ltoddYou can check the database if any link will not change http to https
search all tables in that value.if you want better search and replace no word press plugins there
do it on localhost
https://github.com/interconnectit/Search-Replace-DB
download it replace the db then importThanks
- This reply was modified 6 years, 4 months ago by Steven Stern (sterndata).
Forum: Fixing WordPress
In reply to: WordPress.com “My Sites” Problemhi
Do you have back end access .you have cpanel details.
then check the files and scan any malware’s in the files.
or deactivate all plugins then run..
or
sent the site linkThanks
Forum: Developing with WordPress
In reply to: creating custom fieldsHi,
Add the following code to the function.phpadd_action( 'edit_user_profile', 'edituser' ); function edituser( $user ) { echo '<h3 class="heading">Custom Fields</h3>'; ?> <table class="form-table"> <tr> <th><label for="contact">Contact</label></th> <td><input type="text" class="input-text form-control" name="contact" id="contact" /> </td> </tr> </table> <?php } add_action( 'show_user_profile', 'wk_custom_user_profile_fields' ); add_action( 'edit_user_profile_update', 'save_user' ); function save_user( $user_id ) { $custom_data = $_POST['contact']; update_user_meta( $user_id, 'contact', $custom_data ); }
any doubt check the link
https://webkul.com/blog/wordpress-custom-fields-user-profile-page/
I hope this code is work[signature removed]
- This reply was modified 6 years, 5 months ago by angelch.
- This reply was modified 6 years, 5 months ago by stephencottontail. Reason: removed signature
- This reply was modified 6 years, 5 months ago by bcworkz. Reason: code fixed