Honesty Rocks! truth rules.

How Do I Center Date,author,edt In Wordpress?

HOME      >>       Websites and Web Designing

anwiii

i am having trouble centering the date, the author, and the edit link in word press. you know the line that is right below the title of the post?

i believe i need to edit the page.php file in this section here....

<?php endif; ?><?php $icons = array(); ?><?php if (!is_page()): ?><?php ob_start(); ?><img src="<?php bloginfo('template_url'); ?>/images/PostDateIcon.png" width="18" height="18" alt="" /><?php the_time(__('F jS, Y', 'kubrick')) ?><?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page()): ?><?php ob_start(); ?><img src="<?php bloginfo('template_url'); ?>/images/PostAuthorIcon.png" width="18" height="18" alt="" /><?php _e('Author', 'kubrick'); ?>: <?php the_author_posts_link() ?><?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (current_user_can('edit_post', $post->ID)): ?><?php ob_start(); ?><img src="<?php bloginfo('template_url'); ?>/images/PostEditIcon.png" width="14" height="14" alt="" /><?php edit_post_link(__('Edit', 'kubrick'), ''); ?><?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?><div ><?php echo implode(' | ', $icons); ?>

i've been trying to mess around with it but nothing seems to be working. should i be concentrating on the css file? any help would be great!

Eza

Leave it and concentrate on the rest of the content.This is not important.


anwiii

oh hush. if it wasn't important, i wouldn't have posted it in the first place. if you have nothing important to say, please don't spam my thread with your irrelevant babble


k_nitin_r

Hi!Most themes are built by graphic designers who intended it to have a particular look, so if you were to tinker with it, the designer would be really mad, along the lines of a french cook seeing you add ketchup into the mix! :-PBut, then again, there are some really terrible so-called designers and it would be a mortal sin to have to use their designs without some modifications, and so here you are - modifying somebody's WordPress template to suit your tastes.The quickest way to center the text is to put a BR tag and an opening CENTER tag just after the "$icons = array" line, and then put a closing CENTER tag followed by a BR tag before the "$icons[] = ob_get_clean();" line.The approach above uses plain old HTML tags but you can also do it through CSS by modifying a file named style.css (or by using in-line CSS attributes and internal CSS style sheets, but if you want to do it the cleaner way you might as well put in the effort to do it in a completely clean manner). Every theme has one of those because a WordPress theme stores all of its metainformation within the stylesheet, unlike other content management systems and blogging engines that maintain a separate XML file. I guess it's just a convenience that WordPress provides.@Eza: Every speaker from Google always repeats the same line over and over again - "Content is KING!!!!" Apparently, it's a catch phrase that is popular among internal circles at Google and they want to project it to the world so every speaker is trained to tell folks that line, I don't really know, but every Google speaker I have heard who speaks about search engine optimization has said that line at least once during their presentations. Google's search bots pick up whatever they can from the content on your page and will appropriately direct traffic to your web page even if you have not structured it right, have a poor layout, and have a really broken HTML markup (or XHTML markup, as the case may be, but HTML is more permissive and does not require unclosed HTML tags to have that slash at the end). On the flip side, if you have got some really fancy HTML and CSS with no validation errors, but you haven't got the content, there's no chance in a million that Google is going to send you any traffic at all.... although that is questionable, seeing how so many domain-parked pages are setup out there with the sole purpose of getting visitors to the page through search engines. There is another point that every webmaster does tell you - your content should target humans and not search engines. Search engines help you get people to your website when they need to find something, but it is the regular readers that you want to keep loyal to your website and those are the folks that you should focus on. They would visit your site for updated content, so make sure you do have plenty of content coming in ever so often, just as we do on the Xisto forums - there is always a new topic coming up, and if there isn't, there are always replies to existing topics to read. If there are neither of those, there are still the MyCENT posting credits that draw the forum users to the website... which may not be the same as providing content, but is a different kind of an incentive.@anwii: What's the site that you are putting together? Can we get a peek at it?


Eza

Internet consists for a big part of links. And there are no reports known whatsoever that it is forbidden to post a link to a website on another website. Let aside alone on a forum. So to have some objection against the posting of a link is in some way strange. Other possibilities are to not make a website at all, to not post about the website on a forum, to avoid to post the name of the website in the profile of the owner of the website to start with and some other possibilities, like hiding the website behind a password. Another possibility is to not publish the website on the internet if it might harm the project if the link is published. The project might be not very strong when 1 single link might influence the result of the project. The name of the website was mentioned in another topic. This name was spread with dots. And the comment was added that this was done to provide the google search engine from finding the website. It just happened that Google found the link by itself. Maybe because the name of the website was put in the profile of the owner of the website. Maybe because Google finds websites that are on the internet. A warning and a request to everybody not to post the name of the website would have made readers of the topic aware that posting the link to the website could influence the process of the project. Since such a warning and such a request are not posted along with the name of the website there seems to be no reason to get upset of seeing the link to the website.


anwiii

eza, you have absolutely NO BUSINESS posting one of my domains in public. and for your information, that isn't the domain name you fool. if you notice, there is no date,author,edit link on that site to center.i am reporting every single post you make that is spam and/or irrelevant from now on.any mod- please verify that this person isn't an older member who was warned several times in the past and has had their posting privileges suspended in the past. for anyone reading this, i apologize.@ k_nitin_r - i tried using regular center tags already among other things. the center tags don't work. i tried googling an answer as well. i didn't search too deep, but all i found was how to remove those things. i wish my problem was as simple as that :)


Eza

eza, you have absolutely NO BUSINESS posting one of my domains in public.(some part edited out)

If somebody likes it if a link gets removed the solution is to ask politely to remove the link. That is how simple life is. And that link was in the profile of the topic starter. It will be funny if the website is not the site of the subject of this topic.

mahesh2k

Float:center;

this code can be used for the tags which are in CSS of kubrick. I don't know if these tags are having any CSS attention in .css file. If not you have to make author meta like this by making the float property at the center. Note it is also possible to float at right and then making it look like center by setting a margin for it. That will also work in case of author meta tags. But i'm not sure about this theme as i never did any editing with this theme. Let me know if it works.

Iniyila

i think you need to change the content of css too, but if you want to change css float i suggest to not to use float:center because i have used it and there is no effect at all.

i serached google and i found that float:center seems to not work proparley for css (or some of them) and i used width and margin-left , margin-right to center the text like this :

float:leftwidth:50%margin-left:automargin-right:auto

and the result is just nice & the text is perfectly centered.

mahesh2k

Changing value to float:right will also get the same result in this case. And yes as iniliya posted code for float left will work as well. You need to just adjust the value of margin to left and right. Kubrick being single column theme it's better to set it either right or left depending on how you want it to display with content.


web_designer

since there is no reply from you anwiii till now, i assume all those solutions didn't work. if i am right then please send me the theme and i will try to help. you can trust me about your theme right??? :) and my friend, you know you could only ask me to help and i will do it for you. now i feel bad :( you know i am looking for helping you in anything, but you stubborn never ask :angry: .


Eza

since there is no reply from you anwiii till now, i assume all those solutions didn't work. if i am right then please send me the theme and i will try to help. you can trust me about your theme right??? :)
and my friend, you know you could only ask me to help and i will do it for you. now i feel bad :( you know i am looking for helping you in anything, but you stubborn never ask :angry: .

The result can be admired on the website of the topic starter. Unfortunately there seems to be some objection to post the link. Otherwise the link could have been posted for conveniance of everybody who is interested.

There is some truth in the statement that there is no use of posting the link of the website of somebody else as long the website is still under construction. But seen in another perspective the links are part of the attraction and the soul of the internet. Links are what transforms the internet from different websites to a coherent unity of information.

Xisto offers the possibility to post a link in a message. When it would be illegal to post a link of a website this option would probably not have been in the website lay out.

And somebody asks for the website. This is shown in the second quote in this post. The posting of the link was supposed to be a kind answer to that question.

And like argued before, the name of the website was shown by Google before the link was posted in this topic. The results of Google were copied and pasted in this topic to prove this statement. The post with a copy of the results of Google has been removed so there is no possibility to direct to the post with a copy of the results of Google to show that Google found the website before the link was posted.

( A part of the quoted post is deleted in this quote.)
@anwii: What's the site that you are putting together? Can we get a peek at it?



anwiii

i have no problem posting my link. it's freebiesfreesamples.com which i had just started to add content to it a few days ago. i just want to get it to the top 10 so i can flip the domain for a couple thousand dollars for a couple days work or possibly use it as a partner site to my onlinecheapo.com site where eventually, i will be deleting everything and starting fresh where it is more product and service oriented to cheap stuff. i have done abosultely NO seo on either site. although i had to do a little with freebiesfreesamples.com when i added content, my main focus is on my niche site right now, http://forums.xisto.com/no_longer_exists/
now i hope your satisfied, eza. i can spam like you. i can post about irrelevant things in threads too. the above, had NOTHING to do with the topic. neither did your post!did you offer ANY suggestions or help with the actual problem that was posted in the topic? NO! are you using my threads again to create spame and irrelevant babble? YES. my goal is to see you bannen soon. i am making this public so everyone knows my intentions. you offer absolutely nothing valuable here and i am SHOCKED that nobody has given you a warning or suspended your account for your continuous spam and irrelevant content.i didn't see web designers post til now. i have been really busy on some things recently. even sending her the theme wont help. since all i need is the code. most wp themes are made the same with the date,author, edit link......so it is easy enough to look at any theme. the code will be very similar. if someone is able to do it in another theme and tell me how it was done, i can easily correct my own page to center that part on my page.web designer- you are too kind. i know you have been busy with other things and i just don't want you to get a headache like i did with this problem :)plus, this site isn't going to be focused on a lot right now so there is no hurry to the fix.


web_designer

ok anwiii, please add this line

 

text-align:center;

 

under this tags in css file

 

.art-PostHeaderIcons, .art-PostHeaderIcons a, .art-PostHeaderIcons a:link, .art-PostHeaderIcons a:visited, .art-PostHeaderIcons a:hover

i just tried it and it worked. see your website now, i hope that what you want.

 

Posted Image

 

and be sure even if i am busy or away this time, but i am always ready to help. and those are your words not mine. remember?? you told me the same once ;):)


anwiii

bingo! thanks a lot wd! i love learning new things :):):) so it's fixed now!although i wasn't planning on working on this site for a while, i am glad you remembered and posted your knowledge. i will also be able to know how to do this for future sites when needed. thanks again!btw- since you were the only one who was able to offer any help with this, you get a wisdom flag :D


web_designer

bingo! thanks a lot wd! i love learning new things :):):) so it's fixed now!
although i wasn't planning on working on this site for a while, i am glad you remembered and posted your knowledge. i will also be able to know how to do this for future sites when needed. thanks again!

btw- since you were the only one who was able to offer any help with this, you get a wisdom flag :D


hey great :) i am really happy that this works for you. and looked just like you want, you know i am ready to help you any time and of course any one else if i can. this is the main purpose of this forums after all, right?? :P have fun, learning new things and exchange knowledge.

any way, thanks for the wisdom flags, :P i love them, especially when i feel like i deserve them ;) and see!!! you are not the only magician here ;) i have some magic too :)

and to make things easier for you and others, all i did is, i searched in your page code for the div tag that affect or control the look of that line, and edit it in css file. all that can be done by using the friendly browser for every developer "firefox", there is an extension in firefox called "firebug" you can use it to show the code of each site and edit it but of course temporary. i mean those changes won't be save on your site actually but it will help other developers to see the code of your site and edit it in their side. and of course we can do the same, if someone send us the whole theme then we can edit it using any editor. good luck anwiii with your site my friend. i am happy that i could help :).