Remove certain labels from homepage in blogger - xhtml

How can I hide posts with specific labels on homepage in blogger? I've tried using this https://stackoverflow.com/questions/28060776/how-to-hide-blogger-posts-with-specific-label . But it partially works if you use the single label code (it still shows the data of the posts that are hidden), and it doesnt work at all if I use the multiple labels code. Any solutions?
<!-- hide specific labels -->
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.name != "about-me"'>
<b:include data='post' name='post'/>
</b:if>
</b:loop>
<b:else/>
<b:include data='post' name='post'/>
</b:if>
<!-- end hide specific labels -->

label is used to put post in same location
if you made a label love and all you made
post in blogger with love label will open with
when you click on label name . so many new
blogger want to remove that so if you want
to remove label from blogger.

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

Woocommece - how to change the layout of shortcode template

I am using this shortcode to show all products of a specific product category on custom a template.
[products limit="12" columns="3"]
Now, as I am developing a new theme so the output of this shortcode is breaking the design.
I want to know where or which file I should take or edit to change the layout I want?
Check this image:
Here you can see the rectangle box div's is coming from the content-product.php page but I want to add/change few div before that div's
Like where the <div class="row"> and <div class="woocommerce columns-3 "> is coming? I want to change it.

How do I show the current page title or label?

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.

how to - replace link text with image (using wp_nav_menu)

first time I'm trying to do this so please bear with me :)
I'm building a WordPress theme, and while using wp_nav_menu I'm trying to replace a generated link text with a custom image I made.
So, in essence, what I need done:
1) this text needs to be replaced
2) <img src="<?php bloginfo('template_url'); ?>/images/with-this-image.png" />
I've tried some different tests with jQuery, but I can't find the right combination to make it work.
Any help would be greatly appreciated, thanks!
replace the text that is generated "this text needs to be replaced" with
<img src="/images/with-this-image.png" />
if you want to do it with jquery drop an ID on the a tag and reference that ID.
Create a new menu so you don't overwrite your current one (makes it easier to switch back if you decide to change it.
In the new menu you've created, instead of adding pages or posts the traditional way (using the check-boxes and adding to menu), you can use this method:
Open a blank page (it won't be saved, it's just easier to get the html code for the next step). With the blank page open, click HTML to enter HTML view. Now upload the image you want to use for the navigation link. Copy the html code (make sure you don't copy the P Tags. The coppied result would look something like this:
<img src="http://yoursite.com/wp-content/uploads/2011/08/Home48x48.png" alt="Home" title="Home" width="48" />
Now to add it to the new menu created:
Go to the new menu you created and paste your image source from the last step into the custom menu label (if the menu items are already added it will say navigation label) where the field that has URL is where you'll add the actual link to your page.

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