How to make wordpress theme option page in columns?

If you’re building a custom menu page for your theme options, then you can first use add_menu_page() to register the menu page. Then to use custom styles and scripts on that page, you need to enqueue them on admin_enqueue_scripts action. Something along these lines, function my_enqueue_admin_assets() { $screen = get_current_screen(); // only enqueue assets on … Read more

Split post or page content in two or more columns

If you’re using the Block Editor, use Core’s column blocks. If you’re using the Classic Editor, make shortcodes for Bootstrap’s rows and columns. When you enter content, you can then just enter [row] [column large=”6″]First column content[/column] [column large=”6″]Second column content[/column] [/row] (You may find prebuilt shortcodes out in the wild since this is a … Read more

Bootstrap grid while loop

Your while loop means, “Every time I have one post, output the following code.” Since you have 5 divs inside the while loop, you are getting 5 copies for each post. So, change your while { } code to this, which will output just 1 div for every post: while($blogposts->have_posts()) { $blogposts->the_post(); ?> <div class=”col-md-6″> … Read more

Why items could not be enclosed within items in WordPress?

You need a shortcode to deal with the removal of the <i> from the editor. You’ll have to add this to your functions.php of your theme/child theme. function dd_fontawesome_shortcode ($atts) { $args = shortcode_atts( array( ‘icon’ => ”, ‘size’ => ’14’, ‘color’ => ‘#000’, ‘type’ => ‘fa’ ), $atts ) ; $output=”<i class=””.$args[‘type’].’ ‘. $args[‘icon’] … Read more

Loop two different category WP_Query

Your final outlook is a bit tricky to achieve using traditional way. Lets assume both category has at least 6 post. Now first grab the posts using get_posts() not WP_Query $side_news = get_posts(array( ‘post_type’ => ‘post’, ‘category_name’ => ‘category-slug-1’, ‘posts_per_page’ => 6 )); $side_news2 = get_posts(array( ‘post_type’ => ‘post’, ‘category_name’ => ‘category-slug-2’, ‘posts_per_page’ => 6 … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)