php - Show the posts under the same category -


I am quite new to WordPress and blogging. I am working on a blog portal that has many blogs, but they use all general categories that are listed on the main page of the website. The problem is that whatever category I select on the main page shows me the page with exactly the same post. Here is my code:

   & Lt ;? Php $ site_url = get_bloginfo ('wpurl'); ? & Gt; & Lt; A target = "_ blank" href = "  

Can you suggest some PHP functions or give me a tip, what should I do, should I find a solution to this problem? I hope you understand that I'm just getting started and I would like to know more about programming Thank you in advance!

Update: I also have a functions.php file, which can be part of the code that is relevant:

  function tag_posts () {global $ wpdb; $ Tag = $ _GET ['avain']; $ Taxarr = array (); $ Postarr = array (); $ Blogs = $ wpdb- & gt; Get_results ("Blog select blog_ id FROM {$ wpdb-> blogs} WHERE blog_id! = {$ Wpdb-> blogid} and site_id = '{$ wpdb- & gt; siteid}' and spam = '0 'And deleted =' 0 'and stored =' 0 '", ARRA_A); Array_unshift ($ blog, 1); Forex Currency (Blog $ Blog as $) {$ wpdb- & gt; Set_ blog_id ($ blog ['blog_id']); $ Tax_id = $ wpdb- & gt; Get_var ("SELECT term_taxonomy_id FROM $ wpdb- & gt; word_tactic WHERE in word_id (SELECT term_id FROM $ wpdb-> in terms where name = '$ tag')); $ post_id = $ wpdb-> get_results (" SELECT Object_ID FD $ wpdb-> Term-Relationships WHERE term_taxonomy_id = $ tax_id "); Forex Currency ($ post_id $ as ID) {$ postarr = $ id-> Object_ID;} $ post = $ wpdb- ID ($ postarr) "); Global $ post; Foreign currency ($ post $ as post): setup_postdata ($ post) in get_results (" SELECT * FROM {$ wpdb- & gt; prefix} 'posts) ; & Lt; div class = "post" & gt; & lt; header class = "Post-header"> 
"the_time" ('fjs, y'). '& Lt; / span & gt; & Lt; / div & gt; ';' & lt; a href = "'. $ Post- & gt; Guid '' & gt; '$ Post- & gt; Post_title. ' & Lt; / A & gt; & Lt; / Header & gt; '; '& Lt; Div class = "post-content" & gt; The_content () '& Lt; / Div & gt; & Lt; / Div & gt; '; Endforeach; }}

Please follow the steps. It can help you.

  1. Dashboard & gt; Create a new menu in Appearance & gt; Menu .
  2. Add categories to the menu.
  3. Use the wp_nav_menu () function to display the menu.
  4. The Category link in the displayed menu will send you to the related category page.

    Please note that the category link sends you to the respective category page and only if there is a category.php page in your Theme folder.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -