php - Automatically insert content into News section -


I'm developing a WordPress theme on the front page, the headline of a section news in that section, (I will create a separate file called news.php, which will be included in the markup), but I also want the content to be automatically updated after posting it. For example, if the user writes a new post, then I want to update the news section to do something like this:

A new post was written, find it here ( Where 'Here' is pointing to the URL of the hyperlink post.)

Edit Let me try to give some more information so that it is clear. The news section will be a noodle list. Like this:

  & lt; Ul & gt; & Lt; Li & gt; News item 1 & lt; / Li & gt; & Lt; Li & gt; News Item 2 & lt; / Li & gt; & Lt; / Ul & gt;  

I want the user to be able to add content to the news section, aka create a new news item, but using the WordPress Visual Editor, such a user does not need to understand

In addition, whenever a new post is published, I want to show it:

"Published new post, find

Is it possible?

Thanks, Amit

if I understand correctly, so you have to type something like this:

  & lt ;? php query_posts (array ('posts_per_page' = & gt; 1)); post ();? Gt; a new post was written, find it & lt; a href = "& lt ;? Php echo ______ ();;  
  & lt ;? php query_posts (array (& # 39; & gt; & gt; & gt; here & lt; / a & gt;  Posts_per_page '= & gt; 6));? Gt; & lt; ul & gt; & lt ;? php $ count = 0; if (is_paus ()): while (is_pause ()): the_post ();? 

  • Comments

    Popular posts from this blog

    c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

    Calling GetGUIThreadInfo from Outlook VBA -

    Obfuscating Python code? -