Hello,
How to display all posts of the category in “td_block_1” module?
After click I want to open category template so I need some kind of ‘get_category_url’ to put it in the ‘href’ attribute (in file: \wp-content\themes\Newspaper\includes\shortcodes\td_block_1.php).
Please see attached file:
http://www9.zippyshare.com/v/BGrxEtmJ/file.html
or:
http://s000.tinyupload.com/index.php?file_id=65203616549010069460
Thanks in advance.
-
This topic was modified 9 years by
rdiv.
Hello,
I want to get url of current post category that is displayed in “td_block_1” module (as you can see in the screenshot). It’s a small theme modification.
After clicking on the link ‘See all news in category’ I want to open current category template (it’s default category wordpress template, it’s also built-in Newspaper theme).
There is a function ‘get_block_title’ that shows the category title.
I need to write (unless it is already built-in the Newspaper theme) a similar function, like ‘get_block_category_url’. Can you help me?
Screenshot:
http://www2.zippyshare.com/v/sKn6nxaB/file.html
Regards!
Hi,
The category is grabbed dynamically for each block as the setting can be different based on the selection you make in the category filters. The function used on all blocks to get the category can be found here: http://screencast.com/t/YGP842B66FAm
Thank you!
Thank you for your advice, it was helpful. Finaly I used “template_data_array[‘atts’][‘category_id’]” to get category_id and then “get_category_link() function”.
Everything works fine, except proper text color of my new ‘a’ elements (“See all news in category”).
I need correspondent colors for whole block (like in the screenshot). The color value for each block is taken from block settings.
So I would like to modify the code that overwrite default blocks colors elements (like block title background, border color etc., the rules are in: /themes/Newspapers/style.css) with new colors appropriate for current block. I want this code to be able to wrap also my ‘a’ element.
In which Newspaper theme file can I find the code responsible for overwritting colors in Blocks?
Screenshot:
http://pasteboard.co/cUGUQAEvf.png
or
http://www1.zippyshare.com/v/tXAppOng/file.html
Regards!
Hi,
The colors are added with css depending on the theme demo you have installed. style.css is the file you are looking for or if you use a demo, you will find the specific styling in demo.style.css in each demo in particular: http://screencast.com/t/rtdkiJaH
Thank you!