I'd like to build a newsletter with MailChimp that look like HackerNewsletter.
My content is in AirTable, so I can code one (or many) RSS feed.
I wondering how I can display an RSS block in mailchimp filtered on a given rss category ? So I would be able to set N block (one for each category)
My Category 1
(If RSSITEM is in "My Category 1" THEN)
*|RSSITEMS:|*
*|RSSITEM:TITLE|* *|RSSITEM:CATEGORIES|*
*|END:RSSITEMS|*
Or is there a trick to call multiple RSS feed in multiple block for one newsletter ?
Thanks
Create N block element filtered on an explicit category.
Replace RSSBLOCK with FEEDBLOCK to allow custom filter like $category
<h4 class="null">#<span style="color:#ff3300"><strong>LIFEHACKER</strong></span></h4>
<hr size="1" style="border-color: #eee;" />*|FEEDBLOCK:https://bot.sarah.encausse.net/rss|*
<ul>
*|FEEDITEMS:[$category=LifeHack]|*
<li>*|FEEDITEM:TITLE|*</li>
*|END:FEEDITEMS|*
</ul>
*|END:FEEDBLOCK|*
The closest explanation can be found in MergeTag: https://mailchimp.com/en/help/add-a-blog-post-to-any-campaign/
Related
I'm using WooCommerce 2.3.8 and WordPress 4.2.1. Is there a way to remove the product title from an individual product? I used to be able to just put a blank space and the product title would be blank, but now it doesn't let me, it just keeps putting the original product title back in when I update the product. This is only for one category of products. I would like to have a category page of products that have no titles, just the featured images in a grid.
Thank you!
1. Dirty Solution
Use CSS:
All of your list items for a product on a category have css classes named after the categories' name e.g. product_cat-mycatgegory.
You can find the product's title within an <h3> element.
Therefore the following CSS Code would prevent displaying the product's title on the category page.
.product_cat-mycatgegory h3{
display:none;
}
Note that the product title is be still readable via the browser's inspector.
2. Cleaner Solution
You could edit the content-product.php template. Check if a current category is chosen and decide whether to show the title or not. Please check woocommerce's documentation about template structure and overriding.
Pseudocode
<?php
$cat_obj = $wp_query->get_queried_object();
$category_ID = $cat_obj->term_id;
if(!($category_ID == category_ID_without_titles)) :?>
<h3><?php the_title(); ?></h3>
<?php endif;?>
I'm fairly new to the Custom Taxonomies in Wordpress, but I wanted to see if I can use this feature to achieve a list of items that link of to pages within my site.
Here is the final HTML I am looking to output:
<ul>
<li>Custom Taxonomy 1</li>
<li>Custom Taxonomy 2</li>
<li>Custom Taxonomy 3</li>
<li>Custom Taxonomy 4</li>
</ul>
As you can see above I have various taxonomy items (i.e. 1 & 4) both linking to the same URL.
So I am looking to see if it is possible to:
Setup Custom Taxonomies with two data inputs (name & custom URL) that I could reference in my theme
Alternatively, I would just create another HTML section where I could define the content (& links) in each post. (Almost as if it was a secondary 'content' area).
I would prefer not to use a plugin if possible, as I am attempting to maintain autonomy of the background code. Is this possible?
EDIT:
Sorry if this wasn't clear. I'm not 100% if Custom Taxonomies is the correct way to go.
Basically, I have a list of 'features' that I want to tag on each of my 'portfolio' posts. I want to display these features in a simple (linked) unordered list.
The important thing however is I don't want the list to be linked to a category/archive (like normal tags work). I want to be able to define the URL to an existing 'service' page for each feature, so the user can read more.
Therefore I need to be able to define both the name of the feature and the url of the page the link should point to.
As the list of 'features' & the pages they point to will always remain the same, I thought Custom Taxonomies may be the solution.
You can make a template for each taxonomy term , in your case for each feature.
So ie if you have a term with the name 'premium' you can make a taxonomy-features-premium.php template file and place whatever you want.
So on your page where the portfolio post is being display you can show all the features with their permalinks and if you have make the template files for every term when you click on a term will show the template file for the term that you selected.
or inside the template files you can just redirect them to the page you want.
Update :
In your single-portfolio.php (the template file responsible for showing the portfolio custom post) you can put somewhere in your code (depending your needs and the style of your page) :
echo '<ul>';
echo get_the_term_list( $post->ID, 'features', '<li>', ',</li><li>', '</li>' );
echo '</ul>';
Doc : http://codex.wordpress.org/Function_Reference/get_the_term_list or you can use : http://codex.wordpress.org/Function_Reference/get_the_terms if you want to take more control of your terms.
This would return something like :
<ul>
<li>Premium Feature</li>
<li>Basic Feature</li>
</ul>
So now you have all the terms belonging to the specific post. So if you create a taxonomy-features-premium.php template file, when the user clicks the Premium Feature link wordpress will show whatever is in that template. Notice that if you don't have a taxonomy-features-premium.php template wordpress will search for a taxonomy-features.php (that template is usufull if you want all your terms to be shown the same way). More about template hierarchy here : http://codex.wordpress.org/Template_Hierarchy#Custom_Taxonomies_display
Now inside the template or you can copy paste the code that you have in your page + add some modifications corresponding to the term or you can just redirect to the page you want : wp_redirect(get_permalink( $your_page_id )); exit;
I'm trying to accomplish a three-step page hierarchy in Wordpress.
Here's an example of what a breadcrumb navigation might look like:
Mathematics > Algebra > Variables
I've got a page that lists all of my top-level categories:
<?php wp_list_categories('depth=1'); ?>
What I need next is to make it so when you click a category, it links you to a page that just lists all of its subcategories. By default it takes you to a page with every post in that category.
So you could select say Math on the first page, followed by a page with sub-categories like Arithmetic, Algebra, Geometry, and then when you select your sub-cat it takes you to the posts.
I'm open to using any alternative methods too if you've any ideas on a better way to do it. Using the built-in category system just seemed most appropriate.
wp_list_categories can take an argument, 'child_of', that will return a list of child categories. So, in your individual category listing page, you can use the category id of the relevant category to retrieve the children like this:
<?php $children = wp_list_categories('child_of='.$your_category->cat_ID); ?>
Further documentation for wp_list_categories can be found here: http://codex.wordpress.org/Template_Tags/wp_list_categories
I want to loop posts form different category on static page. So , I have 5 static pages , and 5 different categories. I want to loop posts from one category per one page.
The way I do it is this:
> $novo = new WP_Query('cat=3'); // 3 is category id I want display
> while($novo->have_posts()) : $novo->the_post();
>
> <!-- post model -->
>
> endwhile;
The problem with this that I don't know how to display pagination in static pages with many posts in single category.
What's the best way to make loop on static pages with easy navigation implementation?
what you usually use to make loop on static page?
Any help is appreciated :D
First of all, the question is wrong. An static page is one that DOES NOT HAVE QUERIES or receive any kind of information from other sources.
If you want to paginate a single post wich has more than one page, you should use:
<?php wp_link_pages('before=<p>&after=</p>&next_or_number=number&pagelink=page %'); ?>
If you want to paginate a page wich have N posts:
wp_pagenavi():
I'm looking for a method to put the three latest "news" from Google Blogsearch/Twitter search feeds into the bottom of category Pages. Maybe like this (assuming we're on the archive page for the "Sports" category):
What others say about "Sport":
Instapundit - Michael Jordan Comeback!
Huffington post - Michael Jordan Comeback!
Crazyguy - Michael Jordan Comeback!
So we all know that you can put
<?php include_once(ABSPATH.WPINC.'/rss.php');
wp_rss('pathtofeed.com', 3); ?>
in a template-file and it will list the latest three items of a feed.
I would like to put the path to the feed of a query to Google Blogsearch, e.g. [http://blogsearch.google.com/blogsearch_feeds?hl=en&q=sport&ie=utf-8&num=10&output=rss][1]
Works fine. But I would like to replace the sport query with the template tag for the category title - so it dynamically queries Google for a RSS-feed of sport searches. I've tried this:
<?php
include_once(ABSPATH.WPINC.'/rss.php');
wp_rss('www.blogsearch.google.com/blogsearch_feeds?hl=en&q=<?php single_cat_title() ?>&ie=utf-8&num=10&output=rss', 3);
?>
(omitted 'http' cause I can't post hyperlinks here as a new user).
But all I get is:
There was a problem with the feed, try again later.
(translated from Danish error message).
Is it the syntax?
You've got a couple of issues in that code.
The first is you have a <?php inside an already opened <?php section. Concatenation is the answer to that problem.
The second is the function single_cat_title() displays the category title by default. Meaning it "echo()"s it out. So you need to tell that function to return the value not display it.
My solution would be to add a line of code above your include there to get the category you're looking for along the lines of:
$current_category = single_cat_title("", false);
The "false" tells the function to return it as a value instead of displaying it by default, the first parameter is the prefix or the text to display before the category title.
Then concatenate the current_category variable into your include statement
You can check out that function on the Template Tags page in the Wordpress Codex.