Change site's title to match Google search [closed] - php

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I was developing a site for a parts distributor, when I ran into an SEO problem.
Basically, the business distributes many different brands, so I want to make it that, when a certain brand is searched, the title of the google result changes to that particular brand.
Example:
If Brand-X is searched on google, the result should appear as...
My Business - Brand-X distributor
I want it to lead to the same page though. Is there any valid way to do this, or will I have to settle with setting keywords for each of the brands, and a site description including them?

I want it to lead to the same page though.
That isn't possible. Google will show the title of the page at the time it was indexed.

Google indexes your pages first, and when someone searches google, they look in their index. The results they display are from their cached version, and not a live fetch from your site. Hope that clears things up.

Naah No Such way to play with Titles for search Engines!

Simply set the title in the HTML
<title>My Business - Brand-X distributor</title>
Google will display the title of the page for each webpage in the results.
Google will eventually reindex the page and show the new title.

...actually it is possible but it will require some work. I just finished something similar. Google accesses your page content very much the same as any other visitor so you need to actually create an illusion that each product have it's own page (even thought all is aiming to your product-id123.php for example). So you need to start with a page which will contain the list of every product you have and then generate dynamically a unique link for each of them.
This can be done by a simple PHP loop accessing an array of all the products and creating a link + title for each of them.
You will end-up with a very long page and it is better (if you have thousands of products) to separate this into separate pages based on the product category for example.
Then when you have all the product list pages done you can use the following script in the header of the main landing page.
<?php
if($_SERVER['REQUEST_URI'] == '/product-id123.php') {
$title = '<title>Product ID 123</title>';
} elseif ($_SERVER['REQUEST_URI'] == '/product-id456.php') {
$title = '<title>Product ID 456</title>'; // etc...
?>

Related

Typo3 changing existing frontend via extension [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last month.
Improve this question
I got a website (Typo3 9.5) already configured with existing typoscript and a bunch of pages.
Now I want to create an extension which simply adds one line of code to every page when a checkbox in the backend for this specific page is set.
Like a "Show Editor [x]" checkbox which then adds a simple fixed to this exact page.
I know there must be an easy way to get this to work but I have no idea how to do it.
Right now I'm thinking about manipulating the PAGE object in Typoscript and just add a on 10000000 with all the needed variables inside. But there must be a better way.
Your Requirements are actually multiple tasks which can be seperated:
Backend UI
Fetching the Editor of the Page
display that data in the frontend
Backend UI
adding a checkbox to the TYPO3 Backend requires you to add TCA Overrides to define an addtional field for the pages table. and and ext_tables.sql to adapt the database schema (you need to store this value in the database)
Fetching the Editor of the Page
what is the editor of the page? is it the "author" field of the page record? the user who initally created the page? the person who created the most content elements on the page? this of course has to be solved by you.
in the similes way its just text field and you can use it right away in the typoscript for more complex scenarious you might create a viewHelper, dataProcessor or userFunc to resolve the Author.
display that data in the frontend
you now should have somehow fetched the user. and you need to "insert" it at the correct place in you page template. if its just a simple value it should be straight forward adapting add it to your typoscirpt PAGE object. or FLUIDTEMPLATE

Custom page show blog posts on tag

Since I am not so great programming in PHP I wanted to ask my question here, hopefully you guys can help me out.
I'm building a WordPress website, this website has a custom page template like custom-single.php.
On that custom template I want to show posts filtered on a tag. And the tag is coming from a Angular value like so {{ctrl.name.tagname}} and yes ofcourse I've made a tag as well in WordPress.
The code must show max 5 posts (fully with title and ofcourse the content), after the posts it must show max 5 items which are older then 5 posts before, but then only with title using a bullet-list.
https://tr.wordpress.org/plugins/display-posts-shortcode/
When you install and activate this plugin called Display Posts Shortcode, you will add the feature that enables you to create text lists.
If we want to list our articles about a label, we can use a shortcode like [display-posts tag = ”tag_name”].
Number of posts to be displayed on one page (eg 20): posts_per_page = ”20 ″
I hope it will be the answer
If your aim is not to learn php but only to solve your problem in your wordpress related project; you can support your question with visuals.
If you say I don't want to deal with the problem, you can get support from any freelance software developer at an affordable price. Sometimes you will be happier soon with this method.

How do I give certain users access to specific Wordpress pages?

I've been searching for a good answer to this question for years and I wanted to ask it here. I've even raised the question on Wordpress forums to no avail.
Is there a way to give certain users access to specific pages on Wordpress? For example, I may want a school teacher to edit only their personal page and the classroom's pages, but let the principal edit anything.
I've searched for a plugin which can get close, but the only ones I found are terrible. They're complicated, unreliable, aren't secure (according to WordPress), and cause other problems on the site.
Most CMS programs come with a feature to limit (or grant) access to certain pages or groups of pages based on the user. Can Wordpress do this?
Thanks!
Brendan

Wordpress - Harvard Gazette - How did they do X? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I just came a cross matt's post on the new Harvard Gazette wordpress based magazine.
This theme is doing some very cool things I would like to know how to do too. So if any one knows of tutorials/plugins on how to do them, please share.
Here are some of the things:
1) Amazing calendar.
2) A very strong multimedia section.
3) A revolving "top news" (which I believe I have seen a plugin that does that)
4) posts from a specific category (I am guessing this is done through games in the loop + good CSS)
Any comment (especially for the first two points), will be greatly welcomed.
Best,
Tal
1) It says at the bottom of the calendar "events calendar powered by Trumba"
2) Just a Flash video player and a post list. You can put all the video posts in their own category and exclude that category from your main post list (see #4).
3) Look up "jQuery carousel". There are a number of versions available that you can easily plug in to WP.
4) Use query posts to alter what posts appear in the main loop, and get posts to create multiple loops in one theme file.
The calendar uses a javascript driven widget - you can get plenty of them if you search for jquery datepicker and it also has some preloaders setup as you can see those spining circles when page loads. The multimedia uses embeded flash video player which is pretty much the standard these days.
I don't understand really what you mean by revolving news so can't help you there, but most of the things that make something move on the page are done with javascript. Posts from specific category? Don't see what so special about that - it's just an sql statement that selects needed posts out of the database.

Need to build a news article based site - any open source solution I can tweak? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have a freelance project where I have to build a news articles based website. Let me go over it a bit. The site is such that you have a super admin and you have writers - writers join the website by sending in an application along with a sample of their writing skills - if approved the admin approves them and an account is created for the writer. Aside form writers anyone can join the website - upon joining members get a free blog and can post comments on articles and other users blogs.
The writers as stated earlier can post actual articles which are categorised. The categories however are quite.. well.. deep ended you have Main sections - then you have categories within the main section - then you have sub categories and then.. further sub categories...and then articles. Don't ask me why because well thats the clients requirement and he won't budge from it.
Aside that the website would have a page where you see all blog posts by all users. All users would have a profile page. Also down the line the client would like to add in a forums section where all members can host discussions. He would also like to add in an online store where he could sell certain articles via paypal or so..
I can build this thing myself from scracth using Php mysql and a bunch of classes I've developed over time but I'm interested in looking to use a third party open source option for this which pretty much handles all the work. Keeping all the requirements stated in mind - what could be used to build something of this nature. I've seen the following news websites: www.gulfnews.com and www.thenational.ae - I assume they're both built on some similar open source platform...
What would be a good extensible CMS or open source package that could meet all the requirements stated above...wordpress, drupal? I'm open to suggestions - it has to be Php MySQL based as thats my tool of choice..
EDIT============
Basically I have no experience with Drupal at all so I'm completely new to using it. Would the end result be an independant website or would it be intertwined with drupal such that I'd have to have drupal set up on the clients end for it to be able to work? Sorry if my question sounds lame :(
I'd recommend drupal: http://drupal.org/
You can create a writer role for your writers. The taxonomy module will take care of your categorization needs. The blog module will provide individual blogs for all or selected users and provide a page to display all blog entries, as well as pages that only display specific blogs. You can use CCK if you need more to your articles than is provided by the built-in page or story content types, and views if you need to tweak the output. All users have a profile by default, and you can easily add to it with the profile module.
You can do all of this without any coding whatsoever.
Later on, you can easily add a forum, paypal integration, almost ANYTHING ELSE using only contributed modules.
Checkout http://www.drupalsites.net/ to see lots of sites built with drupal.
Drupal should fit your needs nearly out of the box.
You can argue Wordpress is not a CMS, but Wordpress MU offers everything you need, except the forum and store, but there are good plugins for that.
Wordpress MU has extensive support for user roles and nested categories.
Th MU part means that you can have one install for multiple blogs, and a central part.
http://Wordpress.com is ran using Wordpress MU.

Categories