خرید بک لینک

Vote count: 2

My first post here on this website and I am seeking some guidance for my first custom wordpress theme. I am extremely new to jQuery/AJAX and it hurts my brain at this moment as this entire process has been one leaing curve after the next. So please forgive my inability to see between the lines and understand what is or could be already there. There are some results on this subject when I search however I am unable to translate these examples into working results for my situation...

I wish to sort my displayed posts by category on the "News" section...There is a submenu in the <div id="#container">... my intent is to have the sub menu links change the content specifically in my <div id="contentbox-news">...

i.e. "latest news" , "recent build projects", "press release aouncments" etc...

Here is some code from "page-news.php"

<div id="news_submenu_container">
            <ul id="news_submenu">
              <li><a href="all">ALL</a></li>
              <li><a href="news">NEWS</a></li>
              <li><a href="builds">BUILDS</a></li>
              <li><a href="pr">PR</a></li>
            </ul>
</div>

Here is the JavaScript;

 $(document).ready(function() {
        $('#contentbox-news').load('post-type-all.php');

        $('ul#news_submenu li a').click(function() {
            var page = $(this).attr('href');
                $('#contentbox-news').load('post-type-' + page + '.php');
                retu false;
        });
});

This script works and is executed via link reference in my "header-news.php" without errors.

Then the outline of the file(s) I wish to target and load inside <div id="contentbox-news">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<?php
    query_posts('cat=6');
    while (have_posts()) : the_post();
    the_content();
    endwhile;
?>

The problem I am having is when the link in the submenu is clicked, nothing happens, and also when the page is loaded for the first time the "post-type-all.php" file does not display the wordpress post loop as intended...

This is for a non-for-profit car enthusiasts club/organization site, I am completing this project as a volunteer in hopes they will promote themselves and raise more funds for charity. If anyone can help me out I would greatly appreciate it... Thank you

http://www.carsandcoffeehfx.com

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 15 فروردين 1395 ساعت: 5:49

صفحه بندی