amar404
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Adding Posts to a static siteTake a look at your query parameter WP_Query. You supplied ID for category. If you want to use ID, use
cat=1
. If you want to use category_name, use category slug likecategory_name=news
For example :
<div class="area1"> <?php $args = array( 'post_type' => 'post', 'category_name' => 'review' ); $query1 = new WP_Query( $args ); while($query1->have_posts()) : $query1->the_post(); the_title(); endwhile; wp_reset_postdata(); ?> </div> <div class="area2"> <?php $args = array( 'post_type' => 'post', 'category_name' => 'news' ); $query2 = new WP_Query( $args ); while($query2->have_posts()) : $query2->the_post(); the_title(); endwhile; wp_reset_postdata(); ?> </div> <div class="area3"> <?php $args = array( 'post_type' => 'post', 'category_name' => 'review' ); $query3 = new WP_Query( $args ); while($query3->have_posts()) : $query3->the_post(); the_title(); endwhile; wp_reset_postdata(); ?> </div>
Forum: Fixing WordPress
In reply to: Adding Posts to a static siteOk, I understand now. The way you can achieve this by creating 3 categories. And then using WP_Query to loops for each categories.
Forum: Themes and Templates
In reply to: Custom page template for single image and fixed sections of textThat’s require a lot of work, start from define post thumbnail image, see this Post_Thumbnails.
I assumed you already have custom post type for event. Basically you need to do custom wordpress query for custom post types. See this for details WP_Query. After that you can use returned data like normal post. I’m sorry but I can’t explain more detail.
Forum: Themes and Templates
In reply to: Change the Color of the Title and menuHi, before proceed, please do all modification in child theme. Please see this for more details Child_Themes.
Ok, all modification can be done in file called style.css. It’s in your theme folder. Add this rule at the bottom of the file.
For text under logo
#site-name a { color: #000099; }
For menu boxes
#nav a { background: [your bg color]; color: [your menu color]; }
For current menu style
.current_menu_item > a, .current_page_item > a { background: [color];
Forum: Themes and Templates
In reply to: [Serene] Showing Post image on HomepageYes, it’s possible. However you need to add some code in your content.php to display post thumbnails. Here is the reference –
Forum: Themes and Templates
In reply to: [Twenty Fourteen] Theme displayed in the center of the screenFirst, you should do this in your child theme. But you said don’t have access to server so I assume you can only do it in your wp dashboard.
You can edit in admin dashboard. Appearance->Editor. Find file style.css and add at the bottom
.site { margin: 0 auto; }
But please remember once you updated your theme in the future, yo will lose all the changes.
Forum: Fixing WordPress
In reply to: How to create a drop-down menu with unlinked topIn your menu, create link menu. Put # sign fro the URL and type your menu name. For example product. Then add menu with page below your previouly created menu.
Forum: Fixing WordPress
In reply to: Adding Posts to a static siteForum: Fixing WordPress
In reply to: Admin has walked awayYou can restore back your wordpress installation if you have backup database .sql and folders inside wp-content for media uploads and themes. It require changing some database settings for the new URL. Please let me know if you need any help regarding this matter.
Thanks.