Displaying post from specific category in WordPress - post

I would like to display 5 post from a specific category on homepage. First one have to be with a Large thumbnail and excerpt and others 4 post with small image and post title.
Like this : http://i.stack.imgur.com/utQ9s.png

For that you will need to select specific template and edit it.
Free templates are not allowed to be editted by code but on the dashboard you can customize the visiblity of the site.
Are you having the same Template? If not then first select the specific template and you'll get this feature by default.

Related

Is is possible to share elements or parts of a page on social media sites?

I'm hoping this is a pretty simple question to answer. I have a page with 6 recipes on it. I'm being asked to include share buttons for each recipe and they want the shares on FB or Twitter to be formatted to use a specific image and text for each recipe. This is something we would normally handle via Open Graph metatags and the like, but that only works at the page-level.
You must use a separate URL/page for each Like/Share. But you can redirect to the main page, or just use a GET parameter. For example, each Like/Share Button can use the following URL: http://www.yourdomain.com/yourrecipepage.php?recipeid=x
The "x" being dynamic, of course. Now you can check the recipeid parameter and use different OG tags. the rest of the page will be the same. I hope you understand what i mean :)

Add twitter share button to each blog post on tumblr

I'm working on a tumblr blog and I would like to add the twitter share button at the end of each blog post. I know how to get the button for the code and I've been able to get it on a post successfully. However I want it to be on all my post so I don't want to have to add the code at the end of each blog posts's html.
I thought I could avoid this by putting the code in my blogs html. I added in between the block:Post and /block:Post. This works for the most part, the only thing is that when I'm on my blog the link shows up on the post preview and shows how many shares my blog has had and while I'm on an individual post it shows how many shares the post has.
How can I add it such that it only shows the number of shares the post has and will be added to each post automatically.
I think this should do the job:
http://ialreadydontlikeyou.tumblr.com/post/1167220523/implementing-the-tweet-button-on-posts-in-tumblr#.U7_VW41_v_E
It needs special workaround, as you need to place many tweet buttons on the same page.

Link Item Collection in n2cms

I used EpiServer CMS. I'm just wondering if n2cms has any attribute to collect links. (like LinkItemCollection in EpiServer). If not, Please give me an idea to implement.
Reference: http://sdk.episerver.com/library/cms6/Developers%20Guide/Core%20Features/Properties/How%20To/Use%20Link%20Collection%20property.htm
Thanks.
You could do this with the ContentList part and creating a bunch of redirect pages. This is best if you want to re-use the collection of links again and again.
Create a dummy placeholder page somewhere, and make it invisible.
Under that placeholder page, create a Redirect page for each link.
Where you want the collection of links to appear, drag & drop a ContentList and point the root at the dummy placeholder page. You can then write a custom HTML template to display the link however you like.
One other idea would be to use N2CMS Selection part, which gives you a checkbox list of all the pages in your site. You simply check the ones you want to list, and Selection will format a list of all the pages you checked.
With both of these methods, if you link to other pages in your site, N2 will offer to update links for you if you rename any of the target pages (as long as they're in the same N2 site).
All of this is documented in the N2CMS documentation here: https://n2cmsdocs.atlassian.net/wiki/display/N2CMS/Linking+to+Content?src=search
Look under the heading Dynamically Linking to Content Items

Joomla - Wrong url path from google results

I have a strange problem in one Joomla website.
If i access from homepage and then navigate into the site it works correct, but if i go in some internal page from google results it shows uncorrect page layout, because the url is not correct.
This is the correct url
Correct page from homepage
and this the uncorrect url that Google finds Uncorrect page from Google
in this second page is showed rating module (that i never used) instead of an article, as you can see in links.
Someone can help me?
EDIT: I'm using Joomla 2.5 version. Every menu item is category blog type, and must show all articles of one category. Each category have 2 articles. In the uncorrect link seems that it access to single article, adding the rating that i have hidden in each article
Which version are you using?
if you can turn on SEF option in the global settings in joomla admin. Then you need to make sure all your articles are in menus. then if you link them on different pages it should keep the url the same.
The way you have it at the moment with all the x=123&... get params pages will show for what ever ids you change the menu to.
The reason you are seeing an uncorrect layout is the two different Itemid parameters (the right url has 127 while the wrong one has 104). The rest of the difference in the urls will be ignored by Joomla.
Solution: Find your menu item with id 104 (look at the menu ids on the right of the menu items view), then check which modules appear on the page from there. There may be modules in non-visible positions.
One of these modules is publishing the links with the wrong ids. If it's a Joomla core (like a search module) you can usually force the Itemid either in the module or in the component's configuration. Else you need to fixsome third party code.
Only once you have solved the multiple-itemid should you turn on SEF, otherwise you'd get the same problem only more difficult to trace.
sh404 could help you with this, I'd give it a try on a test site to see if it gets you out of trouble faster.

Scrape a page on my own site for images to display thumbnails (Rails)

I have a rails app with posts and post comments. At the top of the post page, I want to display thumbnails (automated) of all of the image contained within the post and post comments. As users add post comments with images, the thumbnails at the top will be updated to reflect the new images. Two options come to mind, but none of them seem perfect:
1) Scrape the page using ScrAPI or similar
2) Create methods in post and post_comment models that scan content for images, which would require some kind of image regex and database queries
It seems like there should be a better way, with some Javascript magic or something. Any ideas?
URL regexes are a solved problem, so I'd venture for option 2 that checks the posted content for URLs. Then you can go one step further and do a HEAD request against the image to check to see its content-type.
If the content type is a known image, download it and store it somewhere (db/s3, etc) for rendering later.
I'd put these on a background queue like Delayed Job, though, as those external requests would affect the user's experience.
You want to have the updated images after every post, so option 1 sounds better. And this would still work for browsers that don't support javascript.

Resources