How do I show the current page title or label? - css

How to show the current page title or label?
I have tried with below code -
<data:blog.searchLabel/>
Display the label when you are on URL search label only. I need a code that displays HOMEPAGE when you are on homepage URL and shows Label of posts When you are on blogger posts !!
I couldn't do that so I called another div that display the tags but its super bad since it gets doubled when I call it for no reason.
$(function(){
$('.label-head a').clone().appendTo('.repheader');
});
<div class='tm-menu'>
<div class='body-row repheader'><data:blog.searchLabel/></div>
<div class=label-head>
</div>

I solved the problem by myself.
I found two divs so I deleted one of them.
I found blogger tag that display the page title, here is a link which you might find helpful.

Related

Wordpress - Hiding 'Next' article link on latest post and 'Prev' article link on the oldest post

I'm using the previous_post_link & next_post_link to display links to next & prev articles on a post single page. This works fine and the code I'm using is like this:
<div class="previous-article">
<h4>Previous Article</h4>
<?php previous_post_link('%link'); ?>
</div>
<div class="next-article">
<h4>Next Article</h4>
<?php next_post_link('%link'); ?>
</div>
Is there a statement I can use to hide / not display the 'Next' article link on the latest blog post because there is no 'next' so it display a blank entry (meaning that I can also hide the h4 headings I have in place) e.g.
So it looks like this:
And visa versa for the oldest post showing the 'Previous' article. Another solution would be to incorporate the heading into the php previous_post_link / next_post_link code. Maybe add class 'latest', 'oldest' to the body tag and I can hide using css. Is this possible?
Thanks
I should have searched better. For anyone else looking here is the solution to this how to get next/previous post hrefs and titles in wordpress

How do i disable submenu links in wordpress?

As soon as you create a menu item for a page there is a link that it automatically populated with it. How do i stop wordpress from making these links? I'm capable of making them myself and don't always want them to link to thier specific page.
I figured it out using and dropping it in my header.php
<script type="text/javascript">
jQuery(function($) {
$("li.menu-item-627,li.menu-item-14,li.menu-item-20,li.menu-item-28").children("a").attr('href', "javascript:void(0)");
});
</script>
You have to use firebug or chrome "inspect element" to find out what your menu items are and then just replace the numbers in the code accordingly.
also if you don't want them to show up at all add the following code
<script type="text/javascript">jQuery(function($) { $("li.menu-item-627").contents().hide();});</script>
those two together will hide the disabled menu link
you can then add your own links in the "navigation label" of the page menu field!
good luck and let me know if you have any questions, i will do my best to help!

Make Google+ button ignore and div of images on a blog page

I have an blog with related posts image in the top of it. I was waiting for something to fix it since they launch it, but didn't find anything yet so I'm asking for help with it.
The question is. When someone share an post with +1 button, it get the first image of the URL, which usually is one of the featured posts thumbnail.
In Facebook Share I got an plugin that get the 'featured image', but as far I researched, didn't find anyway to make it possible with G+.
So, one of the solutions I considered is making the "Featured post thumbnails" div 'hidden' to G+ button. Is it possible? Or make something similar?
You need to specify the +Snippet values. In the case where a post has no image make sure you keep the image definition but use the blog logo instead.
<body itemscope itemtype="http://schema.org/Product">
<h1 itemprop="name">Shiny Trinket</h1>
<img itemprop="image" src="image-url"></img>
<p itemprop="description">Shiny trinkets are shiny.</p>
</body>
In addition to Abraham's way, you can specify the og: meta data tags in the <head> section of your blog posts. See http://ogp.me for more information about the og: meta tags. The one you need is <og:image />.
IIRC, Wordpress has plugins that allow you to specify og tags.

Mouseover links display in Drupal Views

I would like to know whether there are any Drupal (6.x) modules and/or theming tutorials that can implement the effect of hiding and showing certain (clickable) elements of a view listing only when on mouse hover within the item's div (and not as a tool tip or popup). e.g. in http://rusoom.com/ the Author, Like, Info and Share links of each image (view item) only show on mouse over.
Another example will be the display of Favorite, Retweet and Reply displayed on each tweet on mouse-hover, when logged in to Twitter (http://twitter.com) and viewing any tweet stream.
Any help will be deeply appreciated.
Thanks in advance.
I would use the mouseover function in jQuery and create my custom JavaScript code (in a custom module or in the theme). Here is an example of the code:
file: sites/all/themes/MYTHEME/template.php
<?php
function MYTHEME_preprocess_page(&$variables) {
drupal_add_js(drupal_get_path('theme', 'MYTHEME') .'/mytheme.js', 'file');
}
?>
file: sites/all/themes/MYTHEME/mytheme.js
$('.box').mouseover(function() {
$('.hidden').show();
})
HTML (Views generated code)
<div class="box">Mouse over me to see hidden content</div>
<div class="hidden" style="display:none">This is hidden</div>
This is a quick mockup but it should get you in the right direction. If there isn't a module for this you can consider making one from this code!
Good luck

Tumble theme: styling "single post" view

For my blog index, I use small-ish images (250px wide). If I view a single post, I'd like it to be bigger (e.g. 500px wide).
Is this possible? I can only see one block that applies to all posts.
I guess I'm looking for the WordPress-equivalent of single.php.
Thanks!
There's two tumblr tags that you might find useful:
{block:Posts}{/block:Posts}
and
{block:PermalinkPage} {/block:PermalinkPage}
The first set is the regular way of displaying your posts, where as the second set of tags targets "single" pages only. What I would do, if I was looking to change views between the index page and the single page, I'd wrap one set inside another, like this:
{block:Posts}
//Normal posts as displayed on the home page
{/block:Posts}
{block:PermalinkPage}
{block:Posts}
//Targets posts when displayed in "single" view...
{/block:Posts}
{/block:PermalinkPage}
Hope this helps & works :)

Resources