Hello,
thank you for this great plugin :
Here are some of my parameters :
markupTitle h2
tagSeparator ,
showFields title,image,content
READ_MORE "Lire l'annonce"
NOT_EXIST "L'annonce demandée n'existe pas ou a été retirée."
componentBottomPost bottompost
I display the posts in a page called "annonces" and was able to obtain an interesting look and feel.
Only one thing is would it be possible to have target="_blank" on these page for posts ?
Question : Is there a way to do this ??
--------
Let me share some code using Newmanager and Newsmanager addon + dynpages than can be useful and help someone :
#Display of
<?php global $args; ?>
<?php nm_set_custom_maxposts($args[0]); ?>
<?php nm_set_custom_image(190, 190); ?>
<?php nm_set_custom_excerpt(200); ?>
<?php nm_custom_display_recent('
<h2><a target="_blank" href="{{ post_link }}">{{ post_title }}</a></h2>
<div style="display: grid;grid-template-columns: 200px 1fr">
<div><a target="_blank" href="{{ post_link }}"><img style="float: left;margin: 0 15px 0 0;" href="{{ post_title }}" src="{{ post_image_url }}" alt="{{ post_title }}"></a></div><div><span><bold>Annonce :</bold> {{ post_excerpt }}... <a target="_blank" href="{{ post_link }}">Lire l\'annonce</a></span></div></div>',$args[1]); ?>
I can put this function in a component named display.
Displays $args[1] posts from category $args[0] in a grid.
You can put in a component and make a call in a page.
My way of using News Manager is as is :
I use only _tags so I can control how they display (invisible tags).
For each tag (example _barcelona) I create, I will also create a static normal page with slug barcelona.
I am using this page like a category or tag page in Wordpress.
This is good because on the static page I can put a lot of content for seo and write a really good article.
Then anywhere I want in the article, i make calls to a component like
Let's say i am displaying real estate listings in my barcelona page :
I will just add somewhere {% display _barcelona 10 %}
This is a great way for me to mix static and dynamic content to help the posts rank.
Also, I want to have the posts link back to the "barcelona" static page :
here are my settings for doing so from the post page.
showFields title,image,content
componentBottomPost bottompost
I do not display tags on the post page but call a component i named bottompost.
Here is this component :
<?php
global $nmdata;
if (count($nmdata['tags'])>0) {
echo "<p>Apartment ";
for ($tempvariable=0; $tempvariable<count($nmdata['tags']); $tempvariable++) {
$temptag = $nmdata['tags'][$tempvariable];
$temptag = str_replace("_", "", $temptag);
$temptag = str_replace("-", "", $temptag);
$tempdisplay = ucwords($temptag);
$tempurl = get_site_url(false).$temptag;
//echo "tempdisplay : ".$tempdisplay."<br>";
//echo "tempurl : ".$tempurl."<br>";
echo "<a href=\"$tempurl\" target=\"_blank\">$tempdisplay</a> ";
}
echo "</p>";
}
?>
simply, it will get the tags of the post and find _barcelona, transform it in barcelona and make a link to mywebsite.com/barcelona with anchor "Barcelona".
I do like this for all my tags. So one tag = one static page. The good thing is that like this I can work meta title, h1 and general seo of this page the way I want.
ALso for posts, if you do it for seo, don't forget to use nm_title to have a good different seo title for each post and a different canonnical url too !
I find it very interesting to use in my content.
For instance, if I write an article "5 reasons why you should consider buying a property in Barcelona".
I can make my article :
introduction
<h2>reason 1</h2>
reason1_text
insertion of a post with my last property
end of reason1_text
<h2>reason 2</h2>
...
If i make another component with changes of how it is displayed, it will look great in the content and very natural. Also if I use the nm_set_custom_offset($offset) i will make sure to not display the same listing and i can through this page display my 5 last listings wit the right offset.
-----
this is how i am using right now.
Let's imagine I have a tag _luxury and my apartments are in Madrid, Barcelona and Bilbao.
I will create a page with slug "luxury" etc.
Is there a possibility now to have a search like : luxury and madrid for instance ? @Carlos
If I can do that then everything is perfect .
Thanks,
Pablito
thank you for this great plugin :
Here are some of my parameters :
markupTitle h2
tagSeparator ,
showFields title,image,content
READ_MORE "Lire l'annonce"
NOT_EXIST "L'annonce demandée n'existe pas ou a été retirée."
componentBottomPost bottompost
I display the posts in a page called "annonces" and was able to obtain an interesting look and feel.
Only one thing is would it be possible to have target="_blank" on these page for posts ?
Question : Is there a way to do this ??
--------
Let me share some code using Newmanager and Newsmanager addon + dynpages than can be useful and help someone :
#Display of
<?php global $args; ?>
<?php nm_set_custom_maxposts($args[0]); ?>
<?php nm_set_custom_image(190, 190); ?>
<?php nm_set_custom_excerpt(200); ?>
<?php nm_custom_display_recent('
<h2><a target="_blank" href="{{ post_link }}">{{ post_title }}</a></h2>
<div style="display: grid;grid-template-columns: 200px 1fr">
<div><a target="_blank" href="{{ post_link }}"><img style="float: left;margin: 0 15px 0 0;" href="{{ post_title }}" src="{{ post_image_url }}" alt="{{ post_title }}"></a></div><div><span><bold>Annonce :</bold> {{ post_excerpt }}... <a target="_blank" href="{{ post_link }}">Lire l\'annonce</a></span></div></div>',$args[1]); ?>
I can put this function in a component named display.
Displays $args[1] posts from category $args[0] in a grid.
You can put in a component and make a call in a page.
My way of using News Manager is as is :
I use only _tags so I can control how they display (invisible tags).
For each tag (example _barcelona) I create, I will also create a static normal page with slug barcelona.
I am using this page like a category or tag page in Wordpress.
This is good because on the static page I can put a lot of content for seo and write a really good article.
Then anywhere I want in the article, i make calls to a component like
Let's say i am displaying real estate listings in my barcelona page :
I will just add somewhere {% display _barcelona 10 %}
This is a great way for me to mix static and dynamic content to help the posts rank.
Also, I want to have the posts link back to the "barcelona" static page :
here are my settings for doing so from the post page.
showFields title,image,content
componentBottomPost bottompost
I do not display tags on the post page but call a component i named bottompost.
Here is this component :
<?php
global $nmdata;
if (count($nmdata['tags'])>0) {
echo "<p>Apartment ";
for ($tempvariable=0; $tempvariable<count($nmdata['tags']); $tempvariable++) {
$temptag = $nmdata['tags'][$tempvariable];
$temptag = str_replace("_", "", $temptag);
$temptag = str_replace("-", "", $temptag);
$tempdisplay = ucwords($temptag);
$tempurl = get_site_url(false).$temptag;
//echo "tempdisplay : ".$tempdisplay."<br>";
//echo "tempurl : ".$tempurl."<br>";
echo "<a href=\"$tempurl\" target=\"_blank\">$tempdisplay</a> ";
}
echo "</p>";
}
?>
simply, it will get the tags of the post and find _barcelona, transform it in barcelona and make a link to mywebsite.com/barcelona with anchor "Barcelona".
I do like this for all my tags. So one tag = one static page. The good thing is that like this I can work meta title, h1 and general seo of this page the way I want.
ALso for posts, if you do it for seo, don't forget to use nm_title to have a good different seo title for each post and a different canonnical url too !
I find it very interesting to use in my content.
For instance, if I write an article "5 reasons why you should consider buying a property in Barcelona".
I can make my article :
introduction
<h2>reason 1</h2>
reason1_text
insertion of a post with my last property
end of reason1_text
<h2>reason 2</h2>
...
If i make another component with changes of how it is displayed, it will look great in the content and very natural. Also if I use the nm_set_custom_offset($offset) i will make sure to not display the same listing and i can through this page display my 5 last listings wit the right offset.
-----
this is how i am using right now.
Let's imagine I have a tag _luxury and my apartments are in Madrid, Barcelona and Bilbao.
I will create a page with slug "luxury" etc.
Is there a possibility now to have a search like : luxury and madrid for instance ? @Carlos
If I can do that then everything is perfect .
Thanks,
Pablito